Veda2.0 Released!


Issues in Scaling the Model
#1
Hi, 

I am working on a model that runs fine from 2020 to 2024, but after that it shows infeasibility. I tried changing the demand and supply, but I am not able to understand what the issue is. I am attaching the lst, QA check, and run files. It would be great if anyone could help me here. 

Thank you, 
Anuradha


Attached Files
.zip   Q.zip (Size: 45.18 KB / Downloads: 2)
Reply
#2
Cplex detects the infeasibility alreday in the presolve phase:

Row 'c182065' infeasible, all entries at implied bounds.
Presolve time = 0.08 sec. (86.87 ticks)

--- LP status (3): infeasible.
--- Cplex Time: 0.09sec (det. 87.57 ticks)

You should use the "names yes" option to get a more informative report, telling you where the infeasibility is, and then you can correct your model accordingly.

In the listing file, your current cplex.opt is shown to be read as follows:
>>  scaind 1
>>  rerun yes
>>  iis yes
*** Value Error line 3: Integer expected, for option "iis" saw "yes"
*** Value Error line 3:    Option ignored
>>  lpmethod 4
>>  baralg 1
>>  barcrossalg 0
>>  barorder 0
>>  THREADS=7
>>  aggind 3
>>  Names no
>>  advind=0

As you see, you are using "Names no", which prevents Cplex from giving a more informative infeasibility report. If you would want to know where the infeasibility is, please change that.  You should also change the option "iis yes" to "iis 1" to make it understandable by all Cplex versions.
Reply
#3
Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?
Reply
#4
(28-04-2025, 03:33 PM)Anuradha Wrote: Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?

Hi Anuradha,

You can refer to the link below
Summary of CPLEX Options
Reply
#5
(28-04-2025, 04:25 PM)Ravinder Wrote:
(28-04-2025, 03:33 PM)Anuradha Wrote: Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?

Hi Anuradha,

You can refer to the link below
Summary of CPLEX Options

Thanks, Ravinder! I tried changing the settings in the cplex.opt file in the GAMS folder, but even after saving the file, the changes are not reflected in it. I tried doing it several times and restarting the laptop but the changes are not saved. Can you please guide here? Thanks
Reply
#6
(29-04-2025, 11:13 AM)Anuradha Wrote:
(28-04-2025, 04:25 PM)Ravinder Wrote:
(28-04-2025, 03:33 PM)Anuradha Wrote: Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?

Hi Anuradha,

You can refer to the link below
Summary of CPLEX Options

Thanks, Ravinder! I tried changing the settings in the cplex.opt file in the GAMS folder, but even after saving the file, the changes are not reflected in it. I tried doing it several times and restarting the laptop but the changes are not saved. Can you please guide here? Thanks
Hi Anuradha,

You can find the cplex.opt file in the following path: \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\
Reply
#7
(29-04-2025, 11:21 AM)Ravinder Wrote:
(29-04-2025, 11:13 AM)Anuradha Wrote:
(28-04-2025, 04:25 PM)Ravinder Wrote:
(28-04-2025, 03:33 PM)Anuradha Wrote: Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?

Hi Anuradha,

You can refer to the link below
Summary of CPLEX Options

Thanks, Ravinder! I tried changing the settings in the cplex.opt file in the GAMS folder, but even after saving the file, the changes are not reflected in it. I tried doing it several times and restarting the laptop but the changes are not saved. Can you please guide here? Thanks
Hi Anuradha,

You can find the cplex.opt file in the following path: \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\
Hi Ravinder, 

Please see the attached link. I change the settings in GAMS, save it, but then when I open it again, it does not reflect the changes. A few times the changes were saved for some time, but upon running the model, the lst file doesn't reflect the changes.


Attached Files
.docx   cplex.docx (Size: 680.37 KB / Downloads: 2)
Reply
#8
(29-04-2025, 02:41 PM)Anuradha Wrote:
(29-04-2025, 11:21 AM)Ravinder Wrote:
(29-04-2025, 11:13 AM)Anuradha Wrote:
(28-04-2025, 04:25 PM)Ravinder Wrote:
(28-04-2025, 03:33 PM)Anuradha Wrote: Thanks for your prompt response! Can you please guide me on how to change these settings? Is there an article I can follow?

Hi Anuradha,

You can refer to the link below
Summary of CPLEX Options

Thanks, Ravinder! I tried changing the settings in the cplex.opt file in the GAMS folder, but even after saving the file, the changes are not reflected in it. I tried doing it several times and restarting the laptop but the changes are not saved. Can you please guide here? Thanks
Hi Anuradha,

You can find the cplex.opt file in the following path: \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\
Hi Ravinder, 

Please see the attached link. I change the settings in GAMS, save it, but then when I open it again, it does not reflect the changes. A few times the changes were saved for some time, but upon running the model, the lst file doesn't reflect the changes.

Hi Anuradha,

The Issue is in "iis yes" setting.



As @Antti suggested
You should change the option "
iis yes" to "iis 1" to make it understandable by all Cplex versions.

More Info available here.

Reply
#9
Yes, that’s what I did. I changed both iis and names to 1, saved the file, but the change doesn’t work when I reopen the file or run the model.
Reply
#10
@Anuradha: I think you are right, I am also seeing VEDA overwriting the cplex.opt in \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\ each time when running the model.  Therefore, edits to it indeed seem to be lost. @Ravinder: Should one edit the cplex.opt in some other location?  Maybe in AppData?  Perhaps you could even allow editing the file from the Run Manager?
Reply
#11
(29-04-2025, 03:12 PM)Antti-L Wrote: @Anuradha: I think you are right, I am also seeing VEDA overwriting the cplex.opt in \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\ each time when running the model.  Therefore, edits to it indeed seem to be lost. @Ravinder: Should one edit the cplex.opt in some other location?  Maybe in AppData?  Perhaps you could even allow editing the file from the Run Manager?

Yes, @Antti. The 'cplex.opt' file is read from the path: \{Model_Name}\AppData\SolverOptFiles\.

If the file is not found in the AppData directory, it will be loaded from \Resources\Solver_opt_files\, and during the case run, this 'cplex.opt' file will be copied to \GAMS_WrkTIMES\{Study_Name}\{Model_Name}\.


@Anuradha, please edit file located at \{Model_Name}\AppData\SolverOptFiles\


Note: Double-click your case before running it. If the Solver Option is set to "CPLEX," update the cplex.opt file accordingly; otherwise, modify the solver option file based on your selected solver. See the below image for your reference.

[+] 1 user Likes Ravinder's post
Reply
#12
Hi,

So changing it in the App directory worked. I am attaching the lst file, run log, and QA log. Please have a look and let me know why the scaling issue is happening. Thanks again so much!


Attached Files
.zip   Q.zip (Size: 44.27 KB / Downloads: 1)
Reply
#13
Ok, so now you are getting a much clearer report in the *run_log and in the listing file:

Row 'EQ_CUMFLO('R0N','IMPELC',ACT,2020,2200)' infeasible, all entries at implied bounds.

Number of equations in conflict: 1
fixed: EQ_CUMFLO('R0N','IMPELC',ACT,2020,2200) = 0

Number of variables in conflict: 6
lower: VAR_ACT('R0N',2020,2020,'IMPELC',ANNUAL) > 56.89
lower: VAR_ACT('R0N',2021,2021,'IMPELC',ANNUAL) > 57.9283
lower: VAR_ACT('R0N',2025,2025,'IMPELC',ANNUAL) > 62.0816
lower: VAR_ACT('R0N',2030,2030,'IMPELC',ANNUAL) > 67.2733
lower: VAR_ACT('R0N',2035,2035,'IMPELC',ANNUAL) > 72.4649
upper: VAR_CUMFLO('R0N','IMPELC',ACT,2020,2200) < 60

This tells you that you have a cumulative upper bound on the activity of the IMPELC process in region R0N, and that constraint becomes infeasible when you are extending the horizon.  You can also see that you have defined lower bounds on the annual activity of this process.  It seems obvious that those lower bounds are in conflict with the cumulative upper bound.

For you as the modeler (?), I think it should be easy for you to find where that cumulative constraint is specified, and why.  I can only suggest to relax that constraint (or the lower bounds) and try running again.  If this is the only infeasibility, the model should run fine after relaxing that constraint, but it is possible that there could also be some other constraints reported infeasible after relaxing this conflict, and in that case you should try fixing any such other infeasibilities reported.

(Note that the cumulative constraint is scaled by 10, and so your cumulative bound is probably 600.)
[+] 1 user Likes Antti-L's post
Reply
#14
Thanks! Let me revise the lower bounds and see.
Reply
#15
(29-04-2025, 06:33 PM)Anuradha Wrote: Thanks again to you both! Changing the bounds and removing the constraint helped in the scaling. 
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  meaning of NCAP in a simple test model Enya 2 197 02-04-2025, 03:33 PM
Last Post: Antti-L
  Running TIMES model on linux HPC cluster LucasRM 7 3,695 21-01-2025, 11:13 PM
Last Post: AKanudia
  Demo model on CCS [email protected] 0 238 12-12-2024, 07:35 PM
Last Post: [email protected]
  VEDA2 Results Tables Issues Antti-L 3 678 12-09-2024, 02:30 PM
Last Post: Antti-L
  Unexpected error in model run BSR 2 728 17-07-2024, 07:07 PM
Last Post: BSR
  Model geographical expansion stevenss 0 483 17-05-2024, 02:36 PM
Last Post: stevenss
  Generating _Trade_Links for multi-regional model kushagra 4 1,292 03-04-2024, 07:29 PM
Last Post: kushagra
  Model Infeasible Question VanessaDing 4 1,528 14-03-2024, 07:47 PM
Last Post: Antti-L
  Long model generation time Kristina.Haaskjold 8 2,014 12-02-2024, 02:35 PM
Last Post: Kristina.Haaskjold
  troubleshooting power price issues Mahmoud 19 7,500 15-07-2023, 12:18 AM
Last Post: Antti-L

Forum Jump:


Users browsing this thread: 1 Guest(s)