Removing deprecated methods on LinearSolver.


Some methods on the MPSolver class have been deprecated for some times now.
These are:

// *** DEPRECATED ***
// Setters and getters for the objective. Please call
// Objective().Getter() and MutableObjective()->Setter() instead.
double objective_value() const;
double best_objective_bound() const;
void ClearObjective();
void SetObjectiveCoefficient(const MPVariable* const var, double coeff);
void SetObjectiveOffset(double value);
void AddObjectiveOffset(double value);
void SetOptimizationDirection(bool maximize);
void SetMinimization() { SetOptimizationDirection(false); }
void SetMaximization() { SetOptimizationDirection(true); }
bool Maximization() const;
bool Minimization() const;

For C++, please use the above fix (calling Objective() or MutableObjective()).

For Python, Java, .NET, there is only Objective (no MutableObjective).
I have ported all examples in the distribution following this change.

I am sorry as this will break you project. But I hope everybody agrees that keeping a minimal API is worth it.


Popular posts from this blog

September release of or-tools

Changing the way we link with SCIP

Heads up, upcoming incompatibility in the CP/Routing library