Closed simontherien closed 2 years ago
You need to acquire a SPConstraintRef
of the desired constraint first. The easiest for a named constraint is through cap = sp[1,:cap]
, where sp
is your stochastic program instance and 1
is the stage. Relevant docs are here.
Hello, I am trying to retrieve the shadow price for a first stage constraint
@constraint(slpr_bp, cap, x_1 + x_2 <= 4 - η_hat)
as such but I get the error UndefVarError: cap not defined when callingshadow_price(cap, 1)
JuMP method (1 for first stage). Is this expected? How do I explicitly reference a named constraint of a certain stage? Thanks!