00001
00002
00003
00004
00005
00006 #ifndef ClpObjective_H
00007 #define ClpObjective_H
00008
00009
00010
00011 class ClpSimplex;
00012 class ClpModel;
00013
00019 class ClpObjective {
00020
00021 public:
00022
00024
00025
00032 virtual double * gradient(const ClpSimplex * model,
00033 const double * solution,
00034 double & offset, bool refresh,
00035 int includeLinear = 2) = 0;
00038 virtual double reducedGradient(ClpSimplex * model, double * region,
00039 bool useFeasibleCosts) = 0;
00046 virtual double stepLength(ClpSimplex * model,
00047 const double * solution,
00048 const double * change,
00049 double maximumTheta,
00050 double & currentObj,
00051 double & predictedObj,
00052 double & thetaObj) = 0;
00054 virtual double objectiveValue(const ClpSimplex * model, const double * solution) const = 0;
00056 virtual void resize(int newNumberColumns) = 0;
00058 virtual void deleteSome(int numberToDelete, const int * which) = 0;
00060 virtual void reallyScale(const double * columnScale) = 0;
00064 virtual int markNonlinear(char * which);
00066 virtual void newXValues() {}
00068
00069
00071
00072
00073 ClpObjective();
00074
00076 ClpObjective(const ClpObjective &);
00077
00079 ClpObjective & operator=(const ClpObjective& rhs);
00080
00082 virtual ~ClpObjective ();
00083
00085 virtual ClpObjective * clone() const = 0;
00090 virtual ClpObjective * subsetClone (int numberColumns,
00091 const int * whichColumns) const;
00092
00094
00096
00097
00098 inline int type() {
00099 return type_;
00100 }
00102 inline int activated() const {
00103 return activated_;
00104 }
00106 inline void setActivated(int value) {
00107 activated_ = value;
00108 }
00109
00111 inline double nonlinearOffset () const {
00112 return offset_;
00113 }
00115
00116
00117
00118 protected:
00120
00121
00122 double offset_;
00124 int type_;
00126 int activated_;
00128 };
00129
00130 #endif