sasoptpy.Model.get_objective_value¶
-
Model.
get_objective_value
(self)[source]¶ Returns the optimal objective value
- Returns
- objective_valuefloat
Optimal objective value at current solution
Notes
This method should be used for getting the objective value after solve.
In order to get the current value of the objective after changing variable values, you can use
m.get_objective().get_value()
.
Examples
>>> m.solve() >>> print(m.get_objective_value()) 42.0