Veda2.0 Released!


write out LP file?
#1
Hello,
I am currently debugging my TIMES model and I would like to inspect the LP file generated by CPLEX. Is there a way to configure VEDA so that CPLEX writes out the LP file during the solving process?
Thank you in advance for your help!
Best regards,
   Dylan.
Reply
#2
I am not a VEDA expert, but including the attached scenario file into your model run should work.
I have tested it myself and it works well for me. It edits the cplex.opt file for you. The LP file written out is named mymodel.lp.


Attached Files
.xlsx   Scen_Writelp.xlsx (Size: 9.33 KB / Downloads: 4)
[+] 2 users Like Antti-L's post
Reply
#3
WOW! That's a great solution Antti Smile. If you are not a Veda expert then I don't know who is. I wouldn't have been able to think of this elegant solution. But I am happy that Veda enables such creativity, when mastered.

Dylan, some unsolicited advice: unless your model is really simple, this may not be the most efficient route to debug. I would be happy to exchange a few ideas if you share some details of the issue you are facing.
Reply
#4
Thank you very much for your answer Antti - it will help me a lot. 

Regarding your advice Amit, I understand that looking into the LP is not the easiest way to solve my issue, but I am afraid I might not have any other solution. 

I can explain the issue, but since I cannot share any files of my model due to confidentiality reasons, I am not sure someone will be able to help. Still, let's give it a try.

I have a process (let's called it PROC1) which takes 1 PJ of a commodity (COM1) as input and produces 1 PJ of another commodity (COM2) as output. 
I have also constrained PROC1 to produce at least 10 PJ of COM2 in each region of my model. 
When I run VEDA no warning appear, and in the RES or Browse I can see that PROC1 correctly consumes 1 PJ of COM1 and produces 1 PJ of COM2
However, when I solve the model, VAR_FOut of PROC1 is indeed at least 10 PJ everywhere for COM2 but VAR_Fin of COM1 does not match the COM2 output quantity, even though it should. 
My guess, is that PROC1 is somehow constrained elsewhere, but after checking all the files in my model and I haven't been able to find where. That's why I would like to see what Cplex sees, to reverse-engineer my issue. 
If you have any advice, I would really appreciate it!  Smile 

Best regards,   
Dylan.
Reply
#5
which attribute have you used to link COM1 and COM2 in PROC1? Efficiency, Input..?
Reply
#6
(Yesterday, 12:51 PM)AKanudia Wrote: which attribute have you used to link COM1 and COM2 in PROC1? Efficiency, Input..?

Here is a fake screenshot of my SubRes file but with exactly the same structure.


Attached Files Thumbnail(s)
   
Reply
#7
The problem is in the PCG. It should basically never be NRG (unless a storage or IRE process), because it would then include both outputs and inputs. Just fix that and you should be ok with the issue. I would think COM2 would the right PCG.
[+] 2 users Like Antti-L's post
Reply
#8
In a quarter century of TIMES modeling, I’ve never needed to go beyond the tools that the TIMES/Veda ecosystem provides for debugging:
  • Veda Items view for reviewing input data and topology

  • Dummy imports to identify most infeasibilities

  • QA_Check.log for diagnostic checks of input

  • Veda sync logs to confirm data transfer integrity

  • LST files for infeasibilities not handled by dummy imports


Especially for those newer to TIMES or coming from environments where low-level solver debugging is common (e.g., open-source LP solvers or custom LP models):
It’s far more productive to rely on the data management and QA systems built into the TIMES framework. The complexity of the TIMES formulation means that inspecting raw MPS or LP files can actually make debugging much harder than it needs to be.
Reply
#9
Thank you both for your replies. Antti's answer helps me to solve my issue and thanks for sharing your debugging tips Amit.

Have a nice day!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  VEDA: Issues when synchronizing scenario file KristofferEML 4 592 14-05-2025, 08:05 PM
Last Post: KristofferEML
  TIMES-Macro-MSA MSADDF.DD file UNDF Enya 7 1,322 16-12-2024, 06:06 PM
Last Post: Enya
  Subres File [email protected] 1 447 10-12-2024, 08:51 AM
Last Post: KanORS-AssistGPT
  Is there a way to adjust to the VTrun.cmd file generated when pressing solve in Veda? kristofferand 24 13,102 22-05-2024, 09:20 AM
Last Post: AKanudia
  CCS retrofit file documentation ejin 3 3,204 07-07-2022, 04:22 AM
Last Post: Antti-L
  Copying data from B-Y template to new excel file Kristina.Haaskjold 3 3,931 17-09-2021, 04:33 PM
Last Post: Kristina.Haaskjold
  Timeslice order in the ts.dd file DOlih 2 3,134 16-07-2021, 03:36 AM
Last Post: DOlih
  VAR_CAP info in vd-file but not in gdx-file, why? kristofferand 3 4,096 19-03-2021, 02:32 PM
Last Post: Antti-L
  Update a LIFETIME of technology by Scenario file ? JozefO 25 29,125 07-02-2021, 10:24 PM
Last Post: Antti-L
  Import of processes from BY file faulted Lukas 6 7,176 15-10-2020, 02:23 AM
Last Post: Lukas

Forum Jump:


Users browsing this thread: 1 Guest(s)