"setObjectiveN()" Sensitivity Information for each objective function unit
Answered
for example
single objective function
When using "setObjective", the sensitivity information is displayed as follows.
for constr in model.getConstrs():
print(f"{constr.ConstrName}: Slack={constr.Slack}, Pi={constr.Pi}")
I use "setObjectiveN()".
This is because there are multiple objective functions.
How do I print that information in this case?
-
Hi,
In the documentation of multiple objectives, we have:
We haven't attempted to generalize the notions of dual solutions or simplex bases for continuous multi-objective models, so you can't query attributes such as Pi, RC, VBasis, or CBasis for multi-objective solutions. Because of this, we've concluded that the most consistent result to return for attribute IsMIP is 1.
You can query the attribute Slack as before on each linear constraint.
Best regards,
Maliheh
0 -
Thank you
One more question.
Can't I use SARHSLow or SARHSUp too?
0 -
No, the attributes related to sensitivity information are only available for basic solutions. Since there is no notion of a basic solution in continuous multi-objective models, these attributes cannot be queried.
Best regards,
Maliheh
0
Please sign in to leave a comment.
Comments
3 comments