Loading...
Searching...
No Matches
ClpLinearObjective.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2003, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpLinearObjective_H
#define ClpLinearObjective_H
#include "ClpObjective.hpp"
//#############################################################################
class ClpLinearObjective : public ClpObjective {
public:
virtual double *gradient(const ClpSimplex *model,
const double *solution, double &offset, bool refresh,
int includeLinear = 2);
virtual double reducedGradient(ClpSimplex *model, double *region,
bool useFeasibleCosts);
virtual double stepLength(ClpSimplex *model,
const double *solution,
const double *change,
double maximumTheta,
double &currentObj,
double &predictedObj,
double &thetaObj);
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const;
virtual void resize(int newNumberColumns);
virtual void deleteSome(int numberToDelete, const int *which);
virtual void reallyScale(const double *columnScale);
ClpLinearObjective();
ClpLinearObjective(const double *objective, int numberColumns);
ClpLinearObjective(const ClpLinearObjective &);
ClpLinearObjective(const ClpLinearObjective &rhs, int numberColumns,
const int *whichColumns);
ClpLinearObjective &operator=(const ClpLinearObjective &rhs);
virtual ~ClpLinearObjective();
virtual ClpObjective *clone() const;
virtual ClpObjective *subsetClone(int numberColumns,
const int *whichColumns) const;
//---------------------------------------------------------------------------
private:
double *objective_;
int numberColumns_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpObjective.hpp
ClpLinearObjective::reallyScale
virtual void reallyScale(const double *columnScale)
Scale objective.
ClpLinearObjective::subsetClone
virtual ClpObjective * subsetClone(int numberColumns, const int *whichColumns) const
Subset clone.
ClpLinearObjective::numberColumns_
int numberColumns_
number of columns
Definition ClpLinearObjective.hpp:97
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const ClpLinearObjective &)
Copy constructor.
ClpLinearObjective::gradient
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns objective coefficients.
ClpLinearObjective::clone
virtual ClpObjective * clone() const
Clone.
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective()
Default Constructor.
ClpLinearObjective::reducedGradient
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Returns reduced gradient.Returns an offset (to be added to current one).
ClpLinearObjective::~ClpLinearObjective
virtual ~ClpLinearObjective()
Destructor.
ClpLinearObjective::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const double *objective, int numberColumns)
Constructor from objective.
ClpLinearObjective::resize
virtual void resize(int newNumberColumns)
Resize objective.
ClpLinearObjective::objectiveValue
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL).
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const ClpLinearObjective &rhs, int numberColumns, const int *whichColumns)
Subset constructor.
ClpLinearObjective::stepLength
virtual double stepLength(ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double &currentObj, double &predictedObj, double &thetaObj)
Returns step length which gives minimum of objective for solution + theta * change vector up to maxim...
ClpLinearObjective::operator=
ClpLinearObjective & operator=(const ClpLinearObjective &rhs)
Assignment operator.
ClpLinearObjective::objective_
double * objective_
Definition ClpLinearObjective.hpp:95
ClpObjective::ClpObjective
ClpObjective()
Default Constructor.
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106