Pyomo example

481 views
Skip to first unread message

Stu Geza

unread,
Jan 8, 2016, 11:27:40 AM1/8/16
to Pyomo Forum
Hi All,
I am a new user and not an experienced python user, I want to use pyomo for optimization.
I tool a transportation example from pyomo website and created a python file. I tried to run it but the results were not displayed. I was not able to see any result from my run.
I have attached the python file I created and  a pdf of what I got. I think I am missing something. Can any one help me on this?
Thank you
pymo1.py
Python.pdf

David Woodruff

unread,
Jan 8, 2016, 12:36:31 PM1/8/16
to pyomo...@googlegroups.com
you had indentation errors and one place where you used "instance" even though that is not defined, so I replaced it with "model" because that is the instance in a concrete model.

--
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.

pymo1.py

Stu Geza

unread,
Jan 8, 2016, 3:18:22 PM1/8/16
to Pyomo Forum, dlwoo...@ucdavis.edu
 
 
Thank you for your help. Now, I can see the error messages. The error says could not locate 'solver'. I have attached the error message for more information
I thought solvers are installed when installing Pyomo. I got pyomo from pyomo.org. Do I need to get solvers separately. If so, where is the best place to find the solvers? Are any of the solvers free?
Thanks again for you help, I am just eager to get it going.
Solver.pdf

Siirola, John D

unread,
Jan 8, 2016, 3:28:38 PM1/8/16
to pyomo...@googlegroups.com, dlwoo...@ucdavis.edu

Pyomo does not include any solvers.  You must install them yourself.

 

Please see the Pyomo Installation Guide -- specifically section 10 -- for information on installing solvers:  https://software.sandia.gov/downloads/pub/pyomo/PyomoInstallGuide.html#Solvers

 

john

Reply all
Reply to author
Forward
0 new messages