User Tools

Site Tools


gams:i_know_a_better_solution

I know a better solution

Sometimes users send us a model with the statement: the solver found a solution x with objective value z, but I know a better solution y which has objective value z*. The solver can sometimes help checking such a conjecture by fixing the variables to the proposed solution, and see if this causes any infeasibilities:

* enter data for proposed solution
PARAMETER P(I) proposed solution /
    i1 1.0
    i2 2.0
    i3 3.0 
/;

* fix variables
X.FX(I) = P(I);

* and let solver check if this is a feasible solution
SOLVE M USING MIP MINIMIZING Z;
gams/i_know_a_better_solution.txt · Last modified: 2008/10/24 12:56 by support