Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions core/loop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
*--------------------------------------------------------------------------
*** solveoptions
*--------------------------------------------------------------------------
option limcol = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was about how many lines of equations are displayed, right?
will removing it have any effect on the debug runs that are automatically started after 2 infes? (just making sure we don't get full.lst files that are suddenly 20 times as large as before :-)

option limrow = 0;
hybrid.optfile = 1;
hybrid.holdfixed = 1;
hybrid.scaleopt = 1;
option savepoint = 0;
option resLim = 3e6;
option solprint = off;
o_modelstat = 100;
remindgamsmodel.optfile = 1;
remindgamsmodel.holdfixed = 1;
remindgamsmodel.scaleopt = 1;
option limcol = 0;
option limrow = 0;
option savepoint = 0;
option resLim = 3e6;
option solprint = off;
o_modelstat = 100;

$ifthen.calibrate "%CES_parameters%" == "calibrate" !! CES_parameters
$ifthen.subsectors "%industry%" == "subsectors" !! industry
!! Calibrating industry/subsectors lead to random infeasibilities on the order
!! of 1e-15. Relaxing this attribute a little solves this problem.
hybrid.tolinfeas = 1e-14;
remindgamsmodel.tolinfeas = 1e-14;
$endif.subsectors
$endif.calibrate

Expand Down
4 changes: 2 additions & 2 deletions core/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*** MODEL HYBRID
***------------------------------------------------------------------------------
***------------------------------------------------------------------------------
*** definition of model hybrid
model hybrid /all/;
*** definition of model remindgamsmodel
model remindgamsmodel /all/;

***------------------------------------------------------------------------------
***------------------------------------------------------------------------------
Expand Down
26 changes: 13 additions & 13 deletions modules/80_optimization/nash/solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*** SOF ./modules/80_optimization/nash/solve.gms

regi(all_regi) = NO;
hybrid.solvelink = 3; !! activate multiple-CPU mode for GAMS
hybrid.optfile = 9;
remindgamsmodel.solvelink = 3; !! activate multiple-CPU mode for GAMS
remindgamsmodel.optfile = 9;

if(cm_nash_mode eq 1,
hybrid.solvelink = 0; !! activate single-CPU mode for GAMS
remindgamsmodel.solvelink = 0; !! activate single-CPU mode for GAMS
);

loop (all_regi,
Expand Down Expand Up @@ -50,29 +50,29 @@ $endif.repeatNonOpt
logfile.nd = sm_tmp2;
);

solve hybrid using nlp maximizing vm_welfareGlob;
solve remindgamsmodel using nlp maximizing vm_welfareGlob;

if(cm_nash_mode eq 1,
p80_repy_thisSolitr(all_regi,"solvestat") = hybrid.solvestat;
p80_repy_thisSolitr(all_regi,"modelstat") = hybrid.modelstat;
p80_repy_thisSolitr(all_regi,"resusd") = hybrid.resusd;
p80_repy_thisSolitr(all_regi,"objval") = hybrid.objval;
p80_repy_thisSolitr(all_regi,"solvestat") = remindgamsmodel.solvestat;
p80_repy_thisSolitr(all_regi,"modelstat") = remindgamsmodel.modelstat;
p80_repy_thisSolitr(all_regi,"resusd") = remindgamsmodel.resusd;
p80_repy_thisSolitr(all_regi,"objval") = remindgamsmodel.objval;
if (p80_repy_thisSolitr(all_regi,"modelstat") eq 2,
p80_repyLastOptim(all_regi,"objval") = p80_repy(all_regi,"objval");
);
);

regi(all_regi) = NO;
p80_handle(all_regi) = hybrid.handle;
p80_handle(all_regi) = remindgamsmodel.handle;
); !! close regi loop

if(cm_nash_mode eq 2,
repeat
loop (all_regi$handlecollect(p80_handle(all_regi)),
p80_repy_thisSolitr(all_regi,"solvestat") = hybrid.solvestat;
p80_repy_thisSolitr(all_regi,"modelstat") = hybrid.modelstat;
p80_repy_thisSolitr(all_regi,"resusd") = hybrid.resusd;
p80_repy_thisSolitr(all_regi,"objval") = hybrid.objval;
p80_repy_thisSolitr(all_regi,"solvestat") = remindgamsmodel.solvestat;
p80_repy_thisSolitr(all_regi,"modelstat") = remindgamsmodel.modelstat;
p80_repy_thisSolitr(all_regi,"resusd") = remindgamsmodel.resusd;
p80_repy_thisSolitr(all_regi,"objval") = remindgamsmodel.objval;

if (p80_repy_thisSolitr(all_regi,"modelstat") eq 2,
p80_repyLastOptim(all_regi,"objval") = p80_repy_thisSolitr(all_regi,"objval");
Expand Down
6 changes: 3 additions & 3 deletions modules/80_optimization/negishi/solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*** | Contact: [email protected]
*** SOF ./modules/80_optimization/negishi/solve.gms

hybrid.optfile = s80_cnptfile;
remindgamsmodel.optfile = s80_cnptfile;

*** -------------------------------------------------------------------
*** SOLVE statement
Expand All @@ -16,8 +16,8 @@ if (execError > 0,
abort "at least one execution error occured, abort.gdx written";
);

solve hybrid using nlp maximizing vm_welfareGlob;
o_modelstat = hybrid.modelstat;
solve remindgamsmodel using nlp maximizing vm_welfareGlob;
o_modelstat = remindgamsmodel.modelstat;

*this parameter is especially useful in nash mode
pm_SolNonInfes(regi) = 0;
Expand Down
8 changes: 4 additions & 4 deletions modules/80_optimization/testOneRegi/solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*** | Contact: [email protected]
*** SOF ./modules/80_optimization/testOneRegi/solve.gms

hybrid.optfile = 9;
$IF %cm_quick_mode% == "on" hybrid.optfile = 6;
remindgamsmodel.optfile = 9;
$IF %cm_quick_mode% == "on" remindgamsmodel.optfile = 6;

***reduce the problem to one region
regi(all_regi) = NO;
Expand Down Expand Up @@ -42,9 +42,9 @@ if (cm_keep_presolve_gdxes eq 1,
logfile.nd = sm_tmp2;
);

solve hybrid using nlp maximizing vm_welfareGlob;
solve remindgamsmodel using nlp maximizing vm_welfareGlob;

o_modelstat = hybrid.modelstat;
o_modelstat = remindgamsmodel.modelstat;
display o_modelstat;

***helper parameter to access regional solution status
Expand Down
Loading