00001
00002
00003
00004
00005
00006 #ifndef ClpAmplObjective_H
00007 #define ClpAmplObjective_H
00008
00009 #include "ClpObjective.hpp"
00010 #include "CoinPackedMatrix.hpp"
00011
00012
00013
00018 class ClpAmplObjective : public ClpObjective {
00019
00020 public:
00021
00023
00024
00031 virtual double * gradient(const ClpSimplex * model,
00032 const double * solution, double & offset, bool refresh,
00033 int includeLinear = 2);
00035
00037 virtual double reducedGradient(ClpSimplex * model, double * region,
00038 bool useFeasibleCosts);
00045 virtual double stepLength(ClpSimplex * model,
00046 const double * solution,
00047 const double * change,
00048 double maximumTheta,
00049 double & currentObj,
00050 double & predictedObj,
00051 double & thetaObj);
00053 virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
00054 virtual void resize(int newNumberColumns) ;
00056 virtual void deleteSome(int numberToDelete, const int * which) ;
00058 virtual void reallyScale(const double * columnScale) ;
00062 virtual int markNonlinear(char * which);
00063
00065 virtual void newXValues() ;
00067
00068
00070
00071
00072 ClpAmplObjective();
00073
00075 ClpAmplObjective(void * amplInfo);
00076
00079 ClpAmplObjective(const ClpAmplObjective & rhs);
00080
00082 ClpAmplObjective & operator=(const ClpAmplObjective& rhs);
00083
00085 virtual ~ClpAmplObjective ();
00086
00088 virtual ClpObjective * clone() const;
00089
00091
00092
00093
00094 double * linearObjective() const;
00096
00097
00098
00099 private:
00102 double offset_;
00104 void * amplObjective_;
00106 double * objective_;
00108 double * gradient_;
00110 };
00111
00112 #endif
00113