Hi,
I have a bunch of inequations and I would like to know if there is a solution. What is the simplest way to achieve this in Sage ? I tried using MILP and Polyhedron without success... In an ideal world, I would also like to optimize some quadratic function (in order for the solution to be nicer).
Here is a sample and simple example with only one inequality (other constraints are equalities) where I reproduced the output of MILP:
Constraints:
2.0 <= x_0 + x_7 + x_8 <= 2.0
2.0 <= x_1 + x_2 <= 2.0
2.0 <= x_3 + x_5 + x_9 <= 2.0
2.0 <= x_4 + x_6 <= 2.0
1.0 <= x_0 + x_2 + x_9 <= 1.0
1.0 <= x_5 + x_6 + x_8 <= 1.0
0.0 <= x_2 + x_6 <= 1.0
Variables:
x_0 is a continuous variable (min=0.0, max=1.0)
x_1 is a continuous variable (min=0.0, max=1.0)
x_2 is a continuous variable (min=0.0, max=1.0)
x_3 is a continuous variable (min=0.0, max=1.0)
x_4 is a continuous variable (min=0.0, max=1.0)
x_5 is a continuous variable (min=0.0, max=1.0)
x_6 is a continuous variable (min=0.0, max=1.0)
x_7 is a continuous variable (min=0.0, max=1.0)
x_8 is a continuous variable (min=0.0, max=1.0)
x_9 is a continuous variable (min=0.0, max=1.0)
There are plenty of solutions, one is
x0 = x2 = x5 = x6 = x8 = 1/3
x1 = x4 = 5/3
x3 = x7 = 4/3
Thanks