User Tools

Site Tools


I know a better solution

Sometimes the solver found an optimal solution x with objective value z, but one believes that there is a better solution y which has objective value z*. There are different ways to look at such a situation:

  1. For models with discrete variables or global solvers in general, make sure you have set option optCR=0; so the solver looks indeed for the global solution.
  2. If you solve with a local solver this situation is a possibility for non-convex models. Select a global solver or use a better starting point to overcome this.
  3. Your better solution is not a solution. You can have the solver or GAMS check your conjecture by either fixing the variables to the proposed solution (e.g. x.FX(i,j) = …;) or set the variable level (e.g. x.L(i,j) = …;). In the former case the solver either accepts your solution or reports infeasible. In the latter case, the equation listing has some INFES markers. Make sure to use set limRow to see all equations and tolInfRep to filter the small 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
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/i_know_a_better_solution.txt · Last modified: 2020/05/18 14:58 by Michael Bussieck