"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?
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
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
Post is closed for comments.
Comments
4 comments