A problem with JuMP variable defined

image


i want constraint my variable Pg , how can i do?

You currently can’t do this. You need to use indexed definitions or set the bounds after creating the variable

https://github.com/jump-dev/JuMP.jl/issues/2944

1 Like

Side note: It looks like you are developing an AC OPF model. These reference implementations may be of interest,

https://github.com/lanl-ansi/PowerModelsAnnex.jl/tree/master/src/model

https://github.com/lanl-ansi/rosetta-opf