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

'Appertizer' from docs is not working for gurobi #49

Open
Paulnkk opened this issue Oct 20, 2024 · 0 comments
Open

'Appertizer' from docs is not working for gurobi #49

Paulnkk opened this issue Oct 20, 2024 · 0 comments

Comments

@Paulnkk
Copy link

Paulnkk commented Oct 20, 2024

Hey,

the 'Appetizer' from https://entmoot.readthedocs.io/en/master/#appetizer is not working for gurobi and I get the following error message (I am using Gurobi Optimizer version 11.0.0):

Set parameter Username
Academic license - for non-commercial use only - expires 2024-12-06
Error reading LP format file /var/folders/sn/xxr4rfmj23100534fjn99hv80000gn/T/tmpyl586zz9.pyomo.lp at line 13
Malformed term in expression
Neighboring tokens: " np.float64(-0.2) x5 -1 x6 +1 x7 = "

Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/Users/PaulKandora/opt/anaconda3/envs/cubo_py310/lib/python3.10/site-packages/pyomo/solvers/plugins/solvers/GUROBI_RUN.py", line 66, in gurobi_run
    model = read(model_file)
            ^^^^^^^^^^^^^^^^
  File "src/gurobipy/gurobi.pxi", line 3779, in gurobipy.read
  File "src/gurobipy/gurobi.pxi", line 117, in gurobipy.gurobi.read
gurobipy.GurobiError: Unable to read file
Traceback (most recent call last):
  File "/Users/PaulKandora/PyCharm_projects/cubo/competition/entmoot_test.py", line 30, in <module>
    res = opt_pyo.solve(enting)
  File "/Users/PaulKandora/opt/anaconda3/envs/cubo_py310/lib/python3.10/site-packages/entmoot/optimizers/pyomo_opt.py", line 114, in solve
    opt.solve(opt_model, tee=verbose)
  File "/Users/PaulKandora/opt/anaconda3/envs/cubo_py310/lib/python3.10/site-packages/pyomo/opt/base/solvers.py", line 627, in solve
    raise ApplicationError("Solver (%s) did not exit normally" % self.name)
pyomo.common.errors.ApplicationError: Solver (gurobi) did not exit normally
ERROR: Solver (gurobi) returned non-zero return code (1)
ERROR: See the solver log above for diagnostic information.

How can I resolve this issue ?

Thanks in advance and best regards,

Paul

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

1 participant