00001
00002
00003 #ifndef ClpObjective_H
00004 #define ClpObjective_H
00005
00006
00007
00008 class ClpSimplex;
00009 class ClpModel;
00010
00016 class ClpObjective {
00017
00018 public:
00019
00021
00022
00029 virtual double * gradient(const ClpSimplex * model,
00030 const double * solution,
00031 double & offset,bool refresh,
00032 int includeLinear=2)=0;
00035 virtual double reducedGradient(ClpSimplex * model, double * region,
00036 bool useFeasibleCosts)=0;
00043 virtual double stepLength(ClpSimplex * model,
00044 const double * solution,
00045 const double * change,
00046 double maximumTheta,
00047 double & currentObj,
00048 double & predictedObj,
00049 double & thetaObj)=0;
00051 virtual void resize(int newNumberColumns) = 0;
00053 virtual void deleteSome(int numberToDelete, const int * which) = 0;
00055 virtual void reallyScale(const double * columnScale) =0;
00059 virtual int markNonlinear(char * which);
00061
00062
00064
00065
00066 ClpObjective();
00067
00069 ClpObjective(const ClpObjective &);
00070
00072 ClpObjective & operator=(const ClpObjective& rhs);
00073
00075 virtual ~ClpObjective ();
00076
00078 virtual ClpObjective * clone() const = 0;
00083 virtual ClpObjective * subsetClone (int numberColumns,
00084 const int * whichColumns) const;
00085
00087
00089
00090
00091 inline int type()
00092 { return type_;};
00094 inline int activated() const
00095 {return activated_;};
00097 inline void setActivated(int value)
00098 {activated_=value;};
00099
00101 inline double nonlinearOffset () const
00102 { return offset_;};
00104
00105
00106
00107 protected:
00109
00110
00111 double offset_;
00113 int type_;
00115 int activated_;
00117 };
00118
00119 #endif