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

cbc solver doesn't dispatch the battery #193

Open
kbrunik opened this issue Aug 17, 2023 · 4 comments
Open

cbc solver doesn't dispatch the battery #193

kbrunik opened this issue Aug 17, 2023 · 4 comments
Assignees
Labels
bug Something isn't working dependencies

Comments

@kbrunik
Copy link
Collaborator

kbrunik commented Aug 17, 2023

Simulating` system with dispatch optimization...
         0 % complete
ERROR: Solver (cbc) returned non-zero return code (-6)
Traceback (most recent call last):
  File "baseline.py", line 862, in <module>
    testing()
  File "baseline.py", line 817, in testing
    run_simulations(location=location, output_level=0, verbose=True, show_plots=False, save_plots=False)
  File "baseline.py", line 691, in run_simulations
    hopp_results =          run_hopp(hopp_site,
  File "baseline.py", line 384, in run_hopp
    hybrid_plant.simulate(hopp_scenario["Useful Life"])
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/hybrid_simulation.py", line 720, in simulate
    self.simulate_power(project_life, lifetime_sim)
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/hybrid_simulation.py", line 630, in simulate_power
    self.dispatch_builder.simulate_power()
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 387, in simulate_power
    self.simulate_with_dispatch(t)
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 475, in simulate_with_dispatch
    self.solve_dispatch_model(start_time, n_days)
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 117, in solve_dispatch_model
    solver_results = self.cbc_solve()
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 233, in cbc_solve
    return HybridDispatchBuilderSolver.cbc_solve_call(self.pyomo_model,
  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 225, in cbc_solve_call
    results = solver.solve(pyomo_model, options=solver_options.constructed)
  File "/Users/kbrunik/opt/anaconda3/envs/storage/lib/python3.8/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 (cbc) did not exit normally
@kbrunik
Copy link
Collaborator Author

kbrunik commented Aug 17, 2023

Issue found on branch: https://github.com/NREL/HOPP/tree/feature/offshore-h2

@dguittet
Copy link
Collaborator

Can you run this with logging?

Modify the line

  File "/Users/kbrunik/github/forked/HOPP/hopp/simulation/technologies/dispatch/hybrid_dispatch_builder_solver.py", line 225, in cbc_solve_call
    results = solver.solve(pyomo_model, options=solver_options.constructed)

to

    results = solver.solve(pyomo_model, options=solver_options.constructed, tee=True)

You should see a bunch of text starting with:

Welcome to the CBC MILP Solver 
Version: 2.10.10 
Build Date: Jun  7 2023 
...

@camirmas camirmas added bug Something isn't working dependencies labels Nov 1, 2023
@camirmas
Copy link
Collaborator

camirmas commented Nov 1, 2023

Bringing this back up as I've just encountered it too, should we pin the version to 2.10.8 until we figure this out? We know that version works

@dguittet
Copy link
Collaborator

dguittet commented Nov 7, 2023

@camirmas can you share the error output?

camirmas added a commit to camirmas/HOPP that referenced this issue Nov 22, 2023
The conda build is not currently working, so I've removed it from
the install instructions for now. Also, as per [ref NREL#193] I've updated the install instructions
to use a pinned version of `coin-or-cbc`.
camirmas added a commit that referenced this issue Nov 27, 2023
* Bump version to 2.1.0

* Update README

The conda build is not currently working, so I've removed it from
the install instructions for now. Also, as per [ref #193] I've updated the install instructions
to use a pinned version of `coin-or-cbc`.

* Re-run example notebooks
@camirmas camirmas mentioned this issue Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies
Projects
None yet
Development

No branches or pull requests

5 participants