Ask Your Question

# Revision history [back]

### How to get step by step table in Simplex method in sagemath?

I have used the following commands to solve a linear programing problem in sagemath.

p = MixedIntegerLinearProgram(maximization=True, solver='GLPK') x = p.new_variable(nonnegative=True) p.set_objective(12x + 3x+x) p.add_constraint(10x + 2x+x <= 100) p.add_constraint(7x + 3x+2x <= 77) p.add_constraint(2x + 4*x+x <= 80) p.show() print 'The optimal value:', QQ(p.solve())

It solved and gave the answer. But I want to generate a step by step table to explain to the students.

Is there any possible way to get the step by step table? or should we have to modify the program to do so?

### How to get step by step table in Simplex method in sagemath?

I have used the following commands to solve a linear programing problem in sagemath.

p = MixedIntegerLinearProgram(maximization=True, solver='GLPK') = MixedIntegerLinearProgram(maximization=True, solver='GLPK') x = = p.new_variable(nonnegative=True) p.set_objective(12x + 3x+x) p.add_constraint(10x + 2x+x x+x <= 100) 100) p.add_constraint(7x + + 3x+2x <= 77) p.add_constraint(2x + 4*x+x 4*x+x <= 80) p.show() 80) p.show() print 'The optimal optimal value:', QQ(p.solve())

It solved and gave the answer. But I want to generate a step by step table to explain to the students.

Is there any possible way to get the step by step table? or should we have to modify the program to do so?

### How to get step by step table in Simplex method in sagemath?

I have used the following commands to solve a linear programing problem in sagemath.

p =
> MixedIntegerLinearProgram(maximization=True,
> solver='GLPK') x =
> p.new_variable(nonnegative=True)
p.set_objective(12x > p.set_objective(12*x + 3x+x)
p.add_constraint(10x 3*x+x)
> p.add_constraint(10*x + 2x+x
2*x+x
> <= 100) p.add_constraint(7x p.add_constraint(7*x +
3x+2x > 3*x+2*x <= 77)
p.add_constraint(2x > p.add_constraint(2*x + 4*x+x
> <= 80) p.show() print 'The optimal
> value:', QQ(p.solve()) 
QQ(p.solve()) 

It solved and gave the answer. But I want to generate a step by step table to explain to the students.

Is there any possible way to get the step by step table? or should we have to modify the program to do so?

### How to get step by step table in Simplex method in sagemath?

I have used the following commands to solve a linear programing problem in sagemath.

p =
> MixedIntegerLinearProgram(maximization=True,
> solver='GLPK') x =
> MixedIntegerLinearProgram(maximization=True, solver='GLPK')
>x = p.new_variable(nonnegative=True)
> p.set_objective(12*x + 3*x+x)
> p.add_constraint(10*x + 2*x+x
> <= 2*x+x<= 100) p.add_constraint(7*x +
> 3*x+2*x
>p.add_constraint(7*x +3*x+2*x <= 77)
> p.add_constraint(2*x + 4*x+x
4*x+x <= 80)
> <= 80) p.show()
> print 'The optimal
> optimal value:', QQ(p.solve())


It solved and gave the answer. But I want to generate a step by step table to explain to the students.

Is there any possible way to get the step by step table? or should we have to modify the program to do so?

### How to get step by step table in Simplex method in sagemath?

I have used the following commands to solve a linear programing problem in sagemath.

p =
> >p = MixedIntegerLinearProgram(maximization=True, solver='GLPK')
>x = p.new_variable(nonnegative=True)
> p.set_objective(12*x + 3*x+x)
> p.add_constraint(10*x + 2*x+x<= 100)
>p.add_constraint(7*x +3*x+2*x <= 77)
> p.add_constraint(2*x + 4*x+x <= 80)
> p.show()
> print 'The optimal value:', QQ(p.solve())


It solved and gave the answer. But I want to generate a step by step table to explain to the students.

Is there any possible way to get the step by step table? or should we have to modify the program to do so?