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
Hi - is there any way to access the underlying PowerModels JuMP model either after instantiation or solving? I would like either to see the model on screen or write it to an LP file?
The text was updated successfully, but these errors were encountered:
The simplest way is to pass in a JuMP model from your context like this,
using PowerModels; using JuMP; using Ipopt
m = Model()
result = run_dc_opf("some_case.m", Ipopt.Optimizer, jump_model=m)
Once this command is complete you can do things like,
println(m)
write_to_file(m, "model.lp")
Note that println will always work, the output of write_to_file depends on the type of model you generate with run_opf and not all models may be supported.
In this case you solve the model and then look at the model after. There are more complex workflows where you build the JuMP model without solving it. For example,
Hi - is there any way to access the underlying PowerModels JuMP model either after instantiation or solving? I would like either to see the model on screen or write it to an LP file?
The text was updated successfully, but these errors were encountered: