pyaugmecon icon indicating copy to clipboard operation
pyaugmecon copied to clipboard

Any plan to add other solver like CBC?

Open shuaiwang88 opened this issue 2 years ago • 7 comments

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

shuaiwang88 avatar Jan 06 '24 00:01 shuaiwang88

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

wouterbles avatar Jan 18 '24 15:01 wouterbles

awesome thanks!

shuaiwang88 avatar Jan 21 '24 14:01 shuaiwang88

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

shuaiwang88 avatar Jan 22 '24 18:01 shuaiwang88

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?

wouterbles avatar Jan 24 '24 10:01 wouterbles

@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 avatar Jan 26 '24 02:01 shuaiwang88

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 avatar May 09 '24 23:05 shuaiwang88

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

shuaiwang88 avatar May 10 '24 01:05 shuaiwang88