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

Any plan to add other solver like CBC? #20

Open
shuaiwang88 opened this issue Jan 6, 2024 · 7 comments
Open

Any plan to add other solver like CBC? #20

shuaiwang88 opened this issue Jan 6, 2024 · 7 comments

Comments

@shuaiwang88
Copy link

shuaiwang88 commented Jan 6, 2024

Since gurobi is not open source, do you have any plan to support free solver like cbc?

@shuaiwang88 shuaiwang88 changed the title Any plan to add other solver like CBC Any plan to add other solver like CBC? Jan 6, 2024
@wouterbles
Copy link
Owner

It is already possible to use other solvers, I should probably update the docs/readme to reflect that.

Any solver that is supported by Pyomo should work. I have personally only tested 'glpk' (open source). You can see an example of that here: https://github.com/wouterbles/pyaugmecon/blob/main/tests/ga/test_three_objectives.py

@shuaiwang88
Copy link
Author

awesome thanks!

@shuaiwang88
Copy link
Author

Hi, I am tying to use https://github.com/ERGO-Code/HiGHS where the solver name is SolverFactory('appsi_highs'), with trouble running the example you provided
image

@wouterbles
Copy link
Owner

From the error this looks like an issue with the Pyomo solver interface, not direclty an issue with PyAUGMECON. Could you try to use Pyomo directly (so without pyaugmecon) with the HiGHS solver and let me know if this results in the same error?

@shuaiwang88
Copy link
Author

shuaiwang88 commented Jan 26, 2024

@wouterbles Hello, I created a multi-objective problem using highs which runs in colab: https://colab.research.google.com/drive/1u0OCZEHb2k2goecS9M7Dry-gkQH3fZia
Feel free to modify the code or adding the PyAUGMECON part.
Thanks.

@shuaiwang88
Copy link
Author

shuaiwang88 commented May 9, 2024

still does not work. How do I pass the executable like this:

SolverFactory('cbc',executable='C:\Users\swang\Documents\software\cbc\bin\cbc')

for highs, the below is the right way:
solver = SolverFactory('appsi_highs')

so not sure what's wrong by setting the solver_name to 'appsi_highs', which is listed in:
pyomo help --solvers

@shuaiwang88
Copy link
Author

shuaiwang88 commented May 10, 2024

I run the code in https://gist.github.com/shuaiwang88/81df452663081029550620ce09f5cab7
using glpk, cbc, Gurobi and all failed due to various reasons.

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

No branches or pull requests

2 participants