Hi, I have a problem regarding dual variables values obtained when using solvers ‘cbc’ or ‘highs’. Clearly the duals it shows are wrong when using ‘display contraint_name’, but when using solvers like gurobi, minos, xpress, they show the correct values. Does ‘cbc’ or ‘highs’ able to calculate duals? If so, is there another syntax that I might use for it? ( ‘display constraint_name.dual’ does not get them right also).
For example if I solve the following problem, I get theses results:
var x1 >= 0;
var x2>=0;
maximize obj : 2* x1 + 3 * x2;
subject to r1: x1+2*x2 <=5;
subject to r2: 2*x1+x2 <=4;
ampl: option solver gurobi;
ampl: model e2.mod;
ampl: solve;
Gurobi 10.0.0: Gurobi 10.0.0: optimal solution; objective 8
2 simplex iterations
ampl: display r1;
r1 = 1.33333
ampl: reset;
ampl: model e2.mod;
ampl: option solver highs;
ampl: solve;
HiGHS 1.4.0: HiGHS 1.4.0: optimal solution; objective 8
2 simplex iterations
0 barrier iterations
absmipgap=8, relmipgap=inf
ampl: display r1;
r1 = 5
ampl: display r1.dual;
**r1.dual = 5**
Thanks in advance.