Go to the documentation of this file.00001
00002
00003
00004 #ifndef ClpObjective_H
00005 #define ClpObjective_H
00006
00007
00008
00009 class ClpSimplex;
00010 class ClpModel;
00011
00017 class ClpObjective {
00018
00019 public:
00020
00022
00023
00030 virtual double * gradient(const ClpSimplex * model,
00031 const double * solution,
00032 double & offset, bool refresh,
00033 int includeLinear = 2) = 0;
00036 virtual double reducedGradient(ClpSimplex * model, double * region,
00037 bool useFeasibleCosts) = 0;
00044 virtual double stepLength(ClpSimplex * model,
00045 const double * solution,
00046 const double * change,
00047 double maximumTheta,
00048 double & currentObj,
00049 double & predictedObj,
00050 double & thetaObj) = 0;
00052 virtual double objectiveValue(const ClpSimplex * model, const double * solution) const = 0;
00054 virtual void resize(int newNumberColumns) = 0;
00056 virtual void deleteSome(int numberToDelete, const int * which) = 0;
00058 virtual void reallyScale(const double * columnScale) = 0;
00062 virtual int markNonlinear(char * which);
00064 virtual void newXValues() {}
00066
00067
00069
00070
00071 ClpObjective();
00072
00074 ClpObjective(const ClpObjective &);
00075
00077 ClpObjective & operator=(const ClpObjective& rhs);
00078
00080 virtual ~ClpObjective ();
00081
00083 virtual ClpObjective * clone() const = 0;
00088 virtual ClpObjective * subsetClone (int numberColumns,
00089 const int * whichColumns) const;
00090
00092
00094
00095
00096 inline int type() {
00097 return type_;
00098 }
00100 inline int activated() const {
00101 return activated_;
00102 }
00104 inline void setActivated(int value) {
00105 activated_ = value;
00106 }
00107
00109 inline double nonlinearOffset () const {
00110 return offset_;
00111 }
00113
00114
00115
00116 protected:
00118
00119
00120 double offset_;
00122 int type_;
00124 int activated_;
00126 };
00127
00128 #endif