You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running on an up-to-date pypsa-usa environment. Update via conda env update -f envs/environment.yaml
The Issue
When using highs in the cluster/simplify network scripts, an error is thrown by pyomo. If only highs is passed to the SolverFactory, the following error is thrown:
opt=po.SolverFactory("highs")
opt.solve(m)
Solver (asl) did not exit normally
File "/home/trevor/master/pypsa-usa/workflow/scripts/cluster_network.py", line 247, in distribute_clusters
results = opt.solve(m)
^^^^^^^^^^^^
File "/home/trevor/master/pypsa-usa/workflow/scripts/cluster_network.py", line 317, in busmap_for_n_clusters
n_clusters = distribute_clusters(
^^^^^^^^^^^^^^^^^^^^
File "/home/trevor/master/pypsa-usa/workflow/scripts/cluster_network.py", line 379, in clustering_for_n_clusters
busmap = busmap_for_n_clusters(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/trevor/master/pypsa-usa/workflow/scripts/simplify_network.py", line 278, in<module>
clustering = clustering_for_n_clusters(
^^^^^^^^^^^^^^^^^^^^^^^^^^
pyomo.common.errors.ApplicationError: Solver (asl) did not exit normally
If you pass the solver appsi_highs, as described by pyomo with the command pyomo help --solvers, the following error is raised:
Thanks for the patch, @ktehranchi! I agree with pushing this to master. You okay if I reopen this though, as the patch doesnt address the underlying problem of highs not being used for the cluster network?
Agreed- i also had an issue with pyomo on my cluster runs this week... it wasn't reading my gurobi license correctly, so i might take this on and replace pyomo with linopy soon
Checklist
master
branchpypsa-usa
environment. Update viaconda env update -f envs/environment.yaml
The Issue
When using highs in the cluster/simplify network scripts, an error is thrown by pyomo. If only
highs
is passed to theSolverFactory
, the following error is thrown:If you pass the solver
appsi_highs
, as described by pyomo with the commandpyomo help --solvers
, the following error is raised:Steps To Reproduce
Expected Behavior
The clustering optimization should run via
ipopt
ifhighs
is selected for the quadratic optimizationpypsa-usa/workflow/scripts/cluster_network.py
Lines 186 to 252 in a056649
Error Message
No response
Anything else?
The
pypsa-eur
team updated their clustering to use linopy; would be nice to follow their implementation and allow us to drop thepyomo
dependencyhttps://github.com/PyPSA/pypsa-eur/blob/51f8c2935ae3f80b15ad0ab71708ad006ad49da9/scripts/cluster_network.py#L172-L230
The text was updated successfully, but these errors were encountered: