Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

random order of the lp file

30 views
Skip to first unread message

arg...@gmail.com

unread,
Sep 17, 2024, 12:19:10 PM9/17/24
to Pyomo Forum
I have run my model with the same case study in two consecutive runs and the lp file written witth modelname.write( symbolic-solver_labels=True) is not always the same, the terms in the constraints are reordered.
Have anybody have this behavior? Any way to avoid it?
Andrés

Siirola, John

unread,
Sep 17, 2024, 1:48:21 PM9/17/24
to pyomo...@googlegroups.com

Andrés,

 

The Pyomo solver interfaces go to pretty significant lengths to ensure that for deterministic import, the model should be emitted to the solver in a deterministic manner.  There are two things that might be going on:

  • You have found a determinism bug in the writer
  • You are not generating your model in a deterministic manner.  This is usually the result of iterating over python `set` objects (which are not guaranteed to be deterministic).

 

Unfortunately, there is little more we can tell you unless you can share a (hopefully minimal) example so we can reproduce the behavior you are observing.

 

Best regards,

John

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyomo-forum/7efc8725-8b96-48f8-9e76-6ef90f4c4059n%40googlegroups.com.

Andres Ramos

unread,
Sep 18, 2024, 7:05:14 AM9/18/24
to pyomo...@googlegroups.com
Hi John,
Thanks a lot for your answer.
I am using the model openTEPES (https://opentepes.readthedocs.io/en/latest/index.html) that can be installed as a library with
pip install openTEPES
and it will install the model in the site-packages folder. Then run in a python console
openTEPES_Main
When running, the solver to select is whatever you have already installed (openTEPES doesn't install by default any solver) and the test case to select is the 9n, but for making it smaller substitute with the files of the message the corresponding ones downloaded in the 9n folder.
I am annexing also the lp files obtained in two consecutive runs and the gurobi log files.
Regards
Andrés


De: 'Siirola, John' via Pyomo Forum <pyomo...@googlegroups.com>
Enviado: martes, 17 de septiembre de 2024 19:48
Para: pyomo...@googlegroups.com <pyomo...@googlegroups.com>
Asunto: RE: [EXTERNAL] random order of the lp file
 
oT_Data_Duration_9n.csv
oT_Data_RESEnergy_9n.csv
openTEPES_gurobi_9n.log
openTEPES_gurobi_9n_.log
openTEPES_9n_2030_sc01_st1.lp
openTEPES_9n_2030_sc01_st1_.lp

Andres Ramos

unread,
Sep 18, 2024, 11:55:58 AM9/18/24
to pyomo...@googlegroups.com
John,
Dheepak Krishnamurthy from EPRI proposes to convert all the pyomo sets we have define as ordered=False to ordered=True and he has tested the change and it works
Andrés

De: 'Siirola, John' via Pyomo Forum <pyomo...@googlegroups.com>
Enviado: martes, 17 de septiembre de 2024 19:48
Para: pyomo...@googlegroups.com <pyomo...@googlegroups.com>
Asunto: RE: [EXTERNAL] random order of the lp file
 
Reply all
Reply to author
Forward
0 new messages