wouterbles / pyaugmecon

An AUGMECON based multi-objective optimization solver for Pyomo.
Other
23 stars 8 forks source link

Any plan to add other solver like CBC? #20

Open shuaiwang88 opened 6 months ago

shuaiwang88 commented 6 months ago

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

wouterbles commented 5 months ago

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 commented 5 months ago

awesome thanks!

shuaiwang88 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

@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 commented 1 month ago

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 commented 1 month ago

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