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
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