Removing deprecated methods on LinearSolver.

Hello,

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.

Comments

Popular posts from this blog

Linking glpk with or-tools on unix

Changing the way we link with SCIP

Heads up, upcoming incompatibility in the CP/Routing library