Installing CBC Solver

6,933 views
Skip to first unread message

Taner Cokyasar

unread,
May 8, 2018, 4:12:25 PM5/8/18
to Pyomo Forum
Hi,

I have used Gurobi via Python for a long time, yet, now, I have to use a free solver for non-commercial usage issues. I checked many available options and saw CyLP. As I am familiar with Python, I thought using this solver and modeling environment could be easy. Yet, I failed in the first step and could not install CBC which is the required solver for CyLP. Since I failed, I ended up finding this forum and now asking your help to install CBC. Basically, I do not know where I will type the commands given in Step 1 of CyLP web page. Meanwhile, I read the Pyomo Documentation by considering to use Pyomo instead of CyLP. Yet, it also requires me to install a solver. Since I may have questions during the modeling process, I would prefer using Pyomo instead of CyLP.

Considering all this poorly written story, can you please suggest me what kind of solver and modeling tool I should use and how I can obtain them? I use a Win 10 PC with Python 2.7, Anaconda, and Jupyter Notebook installed.

Thanks,
Taner

Siirola, John D

unread,
May 8, 2018, 4:27:34 PM5/8/18
to pyomo...@googlegroups.com
Since you are already using anaconda, the easiest way to get Pyomo and CBC is:

conda install -c conda-forge pyomo coincbc

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

Taner Cokyasar

unread,
May 8, 2018, 4:31:33 PM5/8/18
to Pyomo Forum
Thanks for response, John, but it did not work. Here is the logs:

C:\Users\Taner>conda install -c conda-forge pyomo coincbc
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - coincbc

Current channels:


To search for alternate channels that may provide the conda package you're
looking for, navigate to


and use the search bar at the top of the page.

Santiago rodriguez

unread,
May 8, 2018, 4:50:30 PM5/8/18
to Pyomo Forum
If you just need an open source MILP/LP solver try glpk. I believe the channel you are trying to use for cbc only supports linux and osx but this one for glpk seems to have binaries for windows.

conda install -c conda-forge glpk 

Taner Cokyasar

unread,
May 8, 2018, 4:53:41 PM5/8/18
to Pyomo Forum
Yep, it works. I have already installed glpk. I found this example. What do we write additionally to the provided code to solve the problem and get the results? Can you give me a quick intro?

Thanks,

Bynum, Michael Lee

unread,
May 8, 2018, 4:55:15 PM5/8/18
to pyomo...@googlegroups.com
There is extensive documentation online to help you get started with Pyomo. See pyomo.org.

Michael
Reply all
Reply to author
Forward
0 new messages