Unfeasible Constraint- Unable to figure it out
Answered#%% Run OPF
start_time = time.time()
hours = 10
for i in range(hours):
print('---Running hour, ',i)
fsthr=i+32
lsthr=i+1+32
network.lopf(network.snapshots[fsthr:lsthr],solver_name='gurobi',pyomo=False)
This is the code I am trying to run. it is giving me infeasible constraint and therefore gives me 0 as an answer. This is the error its giving me.
Solved in 0 iterations and 0.01 seconds (0.01 work units)
Infeasible or unbounded model
WARNING:pypsa.linopf:Optimization failed with status warning and termination condition infeasible or unbounded
how can I check for what constraint is not being met?
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Samin,
Please have a look at the articles below and follow the instructions explained:
- How do I resolve the error Model is infeasible or unbounded?
- How do I determine why my model is infeasible?
It seems to me that you are using a third-party solver PyPSA. Given my quick look over this solver's Github repo, it seems there is no API available for the computeIIS() method. You can consider writing the model into a file and then use the gurobipy API directly to compute an IIS.
Best regards,
Maliheh
0
Post is closed for comments.
Comments
2 comments