-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For Nash: after infeasibilities continue in debug mode before aborting #1636
Conversation
…itch from parallel to debug mode at runtime)
…consecutive failures was reached in at least one region.
… of "debug","parallel") in the remaining places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, see below.
main.gms, start.R and start_bundle_coupled.R look good.
By the way: Wasn't there the idea to move the switch definitions to a different file anyway at some point to avoid all this redundant work in the standalone templates that are unusable anyway?
core/loop.gms
Outdated
***this disables solprint in cm_nash_mode=debug case by default. It is switched on in case of infes in nash/solve.gms | ||
*RP* for faster debugging, turn solprint immediately on | ||
$IF %cm_nash_mode% == "debug" option solprint = on ; | ||
*** This disables solprint in cm_nash_mode=1 (debug) case by default. It is switched on in case of infes in nash/solve.gms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't get the comment. Setting solprint to on
disables it by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lazy commenting.
diff --git a/core/loop.gms b/core/loop.gms
index a7758ac..d57b3f7 100644
--- a/core/loop.gms
+++ b/core/loop.gms
@@ -63,7 +63,8 @@ if( (cm_startyear gt 2005),
*** SOLVE
***--------------------------------------------------------------------------
***this disables solprint in cm_nash_mode=debug case by default. It is switched on in case of infes in nash/solve.gms
-$IF %cm_nash_mode% == "debug" option solprint = off ;
+*RP* for faster debugging, turn solprint immediately on
+$IF %cm_nash_mode% == "debug" option solprint = on ;
o_modelstat = 100;
loop(sol_itr$(sol_itr.val <= c_solver_try_max),
(You will have to look on the Gitlab repo.)
Purpose of this PR
For Nash only:
So far, REMIND aborted after the maximum number of consecutive infeasibilities/failures (
cm_abortOnConsecFail
) was reached in at least one region. Now, it switches from parallel to serial (debug) mode after the maximum number was reached and tries to solve (only the infeasible regions, see #1522). If all regions become magically feasible in the debug mode, it continues in parallel mode. If not, it finally aborts. All this is done within GAMS, not in R, to keep the full information from the previous nash and solver iteration. However, this also means that for the duration of the debug mode, which only runs on one core, the other cores are idle.Type of change
Checklist:
remind2
where it was neededforbiddenColumnNames
in readCheckScenarioConfig.R in case the PR leads to deprecated switchesFAIL 0
in the output ofmake test
)CHANGELOG.md
has been updated correctlyFurther information (optional):