|
Solve |
Top Previous Next |
|
Once one believes that the model is ready in such that it makes sense to find a solution for the variables then the solve statement comes into play. The SOLVE statement causes GAMS to use a solver to optimize the model or solve the embodied system of equations.
Notes:
Solve modelname using modeltype maximizing variablename ; Solve modelname using modeltype minimizing variablename ;
and for models without objective functions is Solve modelname using modeltype; where Solve is required a modelname follows that must have already been given this name in a Model statement using is required the modeltype is one of the known GAMS model types where
models with objective functions are LP for linear programming NLP for nonlinear programming MIP for mixed integer programming MINLP for mixed integer non linear programming plus RMIP, RMINLP, DNLP, MPEC as discussed in the chapter on Model Types and Solvers.
models without objective functions are MCP for mixed complementary programming CNS for constrained nonlinear systems maximizing or minimizing is required for all optimization problems (not MCP or CNS problems) a variablename to maximize or minimize is required for all optimization problems (not MCP or CNS problems) and must match with the name of a variable defined as free or just as a variable. a ; ends the statement
a linear programming problem ("using LP"). a mixed complementary programming problem ("using MCP"). a non linear programming problem ("using NLP").
|