.row, .col files

90 views
Skip to first unread message

jose santiago rodriguez

unread,
Jun 12, 2015, 12:53:33 AM6/12/15
to pyomo...@googlegroups.com
Hi,

I am wondering how can i get .row and .col files in promo to determine the order of variables in the generated nl file.

Thanks,
Santiago

Carl Laird

unread,
Jun 12, 2015, 1:00:26 AM6/12/15
to pyomo...@googlegroups.com
I believe the option is symbolic_solver_labels.

Regards,

Carl D. Laird
Associate Professor, School of Chemical Engineering, Purdue University
Ph: 765.494.0085



--
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.
For more options, visit https://groups.google.com/d/optout.

simon...@gmail.com

unread,
Jun 12, 2015, 2:14:33 AM6/12/15
to pyomo...@googlegroups.com
I wanted to solve a nl-problem using pyome + couenne solver once and identiffied the following steps:

1) Create model with pyomo 

2) run in commandline: 
- pyomo model.py --save-model model.nl --symbolic-solver-labels
   creates: 
- model.nl (file) 
- Row-file (variable names)
- Column-fule (constraint names) 
3) Run e.g. couenne on nl-file 
        - couenne -s model.nl 
   gives solution file: 
- model.sol
4) Combine informations in model.sol and Row-file for postprocessing
Python Script

At the end i came up with a linear model, thats why step 4) never happend. Depending on the solver the ouput format might look different i guess. 

Siirola, John D

unread,
Jun 12, 2015, 11:36:28 AM6/12/15
to pyomo...@googlegroups.com

For the record (/archives), you can always run couenne directly (combining your steps 2 & 3):

 

                pyomo model.py --solver=couenne  --symbolic-solver-labels  --keepfiles

 

The keepfiles option will keep pyomo from deleting the .nl, .row, .col, .sol, and .log [solver output] files.  The names are automatically (and randomly) generated in the system temp directory, so they can be a bit tricky to hunt down.  The solution is to create an empty directory where you want pyomo to store all its temporary files:

 

                mkdir foo

                pyomo model.py  --solver=couenne --symbolic-solver-labels  --keepfiles --tempdir foo

 

That way, the directory should end up with exactly 5 files and you can easily sort things out by the file extension.

 

john

--

jose santiago rodriguez

unread,
Jun 12, 2015, 6:22:02 PM6/12/15
to pyomo...@googlegroups.com
Thanks for all the comments,

John I am running everything from a python script and i would like to use that temporary directory option. How can I do that from python without using the pyomo command. Moreover, how do i list all pyomo options? 

Thanks again,
Santiago

Siirola, John D

unread,
Jun 13, 2015, 11:39:54 AM6/13/15
to pyomo...@googlegroups.com
I think this should work:

   from pyutilib.services import TempfileManager
   TempfileManager.tempdir = "/path/to/my/dir"

To get options for the Pyomo command (or runph or runef) you can add the "--help" option. The catch is that the available options depend on the command (e.g. "solve" or "convert") and the solver you choose. So, to get then options available when solving. A model with gurobi you would run:

   pyomo solve --solver gurobi --help

John
Reply all
Reply to author
Forward
0 new messages