1 | initial version |
What about this?
sage: m = Matrix([[1,2,3],[4,5,6],[7,8,9]])
sage: p = MixedIntegerLinearProgram()
sage: x = p.new_variable(real=True, nonnegative=True)
sage: p.add_constraint(m*x <= 1)
sage: p.show()
Maximization:
Constraints:
x_0 + 2.0 x_1 + 3.0 x_2 <= 1.0
4.0 x_0 + 5.0 x_1 + 6.0 x_2 <= 1.0
7.0 x_0 + 8.0 x_1 + 9.0 x_2 <= 1.0
Variables:
x_0 is a continuous variable (min=0.0, max=+oo)
x_1 is a continuous variable (min=0.0, max=+oo)
x_2 is a continuous variable (min=0.0, max=+oo)