Solveopt

Top  Previous  Next

This option controls the way solution values resulting from a solve are stored by GAMS as discussed in the Variables, Equations, Models and Solves chapter.  This option is used by setting

 

Option Solveopt=text;

 

where two text values are allowed

 

Mergewhich merges old values with new ones
Replacewhich replaces the old values of all equations and most variables.
Clearwhich replaces old equation information and all model included variables

 

The default text is Merge.  This is only of concern if a prior solution or starting point is resident in memory and if the sets, variables or equations in the definition of the model vary from the previously solved model or starting point.

Under merge old and new values merged together, and new values overwrite old ones but old nonzero values that do not have new counterparts are left alone.  Under replace all old values associated with a variable or equation that at least one instance of appears in a model are reset to default values before new solution values are returned.  There are some possible problems with the replace option that users should realize as discussed in wontgo.pdf but these are resolved by the clear option.