I am trying to test ampl with a very simple 3 variables and 3 constraints
linear program. The model is very simple and can be solved by hand.
This is my model (example.mod)
minimize valor: a + 12*b;
subject to r1: 13*a+2*b+12*c <= 5;
subject to r2: a + c >= 1;
subject to r3: 15*a-2*b = 14;
I want to use cplex to compute a ray of feasible solutions.
If I load the model in ampl, solve it using cplex and display the unbounded directions I get the following:
2 dual simplex iterations (2 in phase I)
ampl: display _varname, _var, _var.unbdd;
: _varname _var _var.unbdd :=
But it is easy to see that the point (0,-7.5,1) does not satisfy the third restriction, and that (0,-7.5,1)+t(-1,-7.5,1) is NOT a ray of feasible solutions.
However, if I enter the command solve again, I get a different (correct) ray of feasible solutions (0,-7.5,1)+t(-1,-7.5,1).
0 simplex iterations (0 in phase I)
ampl: display _varname, _var, _var.unbdd;
: _varname _var _var.unbdd :=
Do you know what is going on?