I am setting a unit commitment model with the Discrete unit commitment option but I do not get marginal values.
I've tried several options, including relaxfixedinfeas 1, but I always get the message: "Returning a primal only solution to GAMS (marginals all set to NA)".
In addition, every time I run the DSC option I get the message: "Not enough memory resources are available to process this command" at the top of the cmd window.
I am sure that there isn't any memory issue as I have available 128 GB.
Unfortunately, this message is not included in the log file.
Is there any option to be able to trace also the marginals?
Thank you
Philip
28-01-2025, 08:20 PM (This post was last modified: 28-01-2025, 09:36 PM by Antti-L.)
>I always get the message: "Returning a primal only solution to GAMS (marginals all set to NA)".
I think that should happen only when the final LP solve fails. Without the final solve no proper marginal values are available and only NAs are returned to GAMS.
In some cases the final solve could be infeasible simply due to tolerances. In the final solve the discrete variables are fixed to integer values, and the fixed integer solution may then end up being infeasible, although before fixing those variables the MIP solution was feasible (the integrality tolerance is typically larger than the feasibility tolerance). Such a problem would thus be related to the detailed characteristics of your model. Can you post the RUN log file (*run_log.txt), to see what Cplex writes out during the solve?
I vaguely recall that there might be an option to re-define some options for the final solve (such as tolerances), which could perhaps solve your problem.
I attach 2 log files, the first one (v2_disp_duc2022_run_log.txt) is related to a small model where the Reduced MIP has 192 binaries, 0 generals, 0 SOSs, and 384 indicators and the second log file is related to a bigger problem with the Reduced MIP having 18000 binaries, 0 generals, 0 SOSs, and 720 indicators.
29-01-2025, 03:52 PM (This post was last modified: 29-01-2025, 03:56 PM by Antti-L.)
Ok, thanks for the logs.
It seems that for some reason in your cases no final solve is performed by Cplex, which explains the missing marginals. It could be that using indicator constraints might have something to do with that, but I don't really know. The design for the indicator constraints was done by PSI, so maybe they might have some experience and insights about getting the marginals when using indicator constraints. Of course you could also try using the cplex solvefinal 1 option explicitly, but it should be on by default.
Sorry for not being able to provide better help (never faced this issue before).
29-01-2025, 05:56 PM (This post was last modified: 29-01-2025, 06:33 PM by Antti-L.)
Small follow-up:
I found some old test examples for running with DUC (and indicator constraints), and I am getting the final solve performed when running those cases. Example output:
Best possible: 3970033.231802
Absolute gap: 0.000000
Relative gap: 0.000000
Therefore, I think the issue cannot be related to using indicator constraints. Instead it might actually be a GAMS issue. Concerning the message: " Returning a primal only solution to GAMS (marginals all set to NA)."
This message clearly comes from the GAMS link for Cplex, and the GAMS links have, in fact, been having several issues with handling the Cplex solution statuses correctly. So, one possibility is that your problem could be related to those issues.
Do you happen to have some older or newer versions of GAMS that you could test with? If you like, I could also test your model with my GAMS version, to see if it performs the final solve here. For doing that test, just provide me with the *.DD and *.RUN files (for the smaller case you mentioned above).
29-01-2025, 07:07 PM (This post was last modified: 29-01-2025, 07:21 PM by Antti-L.)
Thanks.
And yes, my test confirmed my hypothesis. By running your model with my GAMS version, the final solve was performed by Cplex, and thus the marginals were reported normally. Consequently, it seems that there is basically nothing we can do to help you here with that issue, other than to suggest either upgrading or downgrading your GAMS.
>I have tried with Versions 4.6.3, 4.7.8 and 4.8.3.
Those are not GAMS version numbers. They look like TIMES versions; but the issue is with GAMS. Your version appears to be GAMS 33.2, so suggest to try e.g. with some older versions.
And yes, my test confirmed my hypothesis. By running your model with my GAMS version, the final solve was performed by Cplex, and thus the marginals were reported normally. Consequently, it seems that there is basically nothing we can do to help you here with that issue, other than to suggest either upgrading or downgrading your GAMS.
>I have tried with Versions 4.6.3, 4.7.8 and 4.8.3.
Those are not GAMS version numbers. They look like TIMES versions; but the issue is with GAMS. Your version appears to be GAMS 33.2, so suggest to try e.g. with some older versions.
Sure, 4.6.3, 4.7.8 and 4.8.3 are TIMES versions. And of course you referred to GAMS versions. I couldn't believe of GAMS issue (?) but only for TIMES' source issue. I am sorry for the misunderstanding.