Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request(image): add support for Pyomo along with Couenne and Bonmin optimizers #86

Open
bryanpaget opened this issue Mar 15, 2022 · 1 comment

Comments

@bryanpaget
Copy link

bryanpaget commented Mar 15, 2022

Description of Request

I'd like to make a request (on behalf of an AAW client) for a custom image for Pyomo which is a mathematical optimization package for Python. I've made this request because it is difficult to install some of the custom optimization algorithms (Couenne and Bonmin in particular). More information about these optimizers can be found here: COIN-OR.

Pyomo is easy to install through Conda but there are a couple of optimizers the user wants that are more difficult to install.

What Have I Done So Far

I have followed the instructions found here on https://www.pyomo.org/installation, which for brevity's sake involves:

conda install -c conda-forge pyomo matplotlib networkx
                 numpy openpyxl pandas pint pymysql pyodbc pyro4
                 scipy sympy xlrd pyomo.solvers ipopt glpk coincbc coinbonmin 

I also install pyomo via pip.

pip install 'pyomo[optional]'

I was unable to install pyomo.extras from Anaconda but that package has not been updated for 3 years.

Results

I was able to install Pyomo, but Couenne is not included with the above. Couenne requires manual compilation.

Compilation of Couenne

I attempted a compilation of Couenne (following instructions from https://github.com/coin-or/Couenne) using Conda's installation location as the installation prefix. This did not work. I could just be missing something. :-) Compilation finishes successfully but Couenne is not found in the path.

git clone https://github.com/coin-or/Couenne
cd Couenne
cd ThirdParty      # Read INSTALL.* file in each subdirectory and get third party software
cd ..
mkdir build
cd build
../configure -C --prefix=/opt/conda       # original instructions say to do ../configure -C
make
make install

Next Steps

  • Is this worth building a custom image?
  • We can test the installation of Couenne with this notebook. We can then change the following line
    opt = SolverFactory("glpk") to use Couenne or Bonmin.

References

@bryanpaget bryanpaget changed the title request(image): add support for Pyomo, Pulp along with Couenne and Bonmin optimizers request(image): add support for Pyomo along with Couenne and Bonmin optimizers Mar 15, 2022
@bryanpaget bryanpaget self-assigned this May 3, 2022
@bryanpaget
Copy link
Author

I've run into a networking obstacle and cannot finish building this image. I have uploaded the (WIP) Dockerfile for Pyomo here: https://github.com/bryanpaget/aaw-contrib-containers/blob/pyomo/pyomo/Dockerfile.

Additionally, the following Dockerfile https://github.com/coin-or-tools/optimization-suite-docker may be enough to get COIN-OR optimization tools running for some applications. I tested the coin-or-tools image and it does indeed run Couenne (one of the requested optimizers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant