Extracts the dual value (shadow cost) of a constraint.
dual(m, constr) dual(m, constr)
m | The model object. |
---|---|
constr | The constraint in question. |
The dual value (shadow cost) of a constraint. Returns NA
if there are integer or binary variables in the model.
#>#>#>#>#> Error in e2 * e1: invalid object (non-function) used as methodm$constraint(x >= 0.1)#>#>#>#>#> Error in e2 * e1: invalid object (non-function) used as methodm$solve()#> Error in dimnames(x) <- dn: length of 'dimnames' [1] not equal to array extentdual(m, x >= 0.1) # 1.0#> Error in e2 * e1: invalid object (non-function) used as method