Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpAmplObjective.hpp
Go to the documentation of this file.
1 /* $Id: ClpAmplObjective.hpp 1899 2013-04-09 18:12:08Z stefan $ */
2 // Copyright (C) 2007, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef ClpAmplObjective_H
7 #define ClpAmplObjective_H
8 
9 #include "ClpObjective.hpp"
10 #include "CoinPackedMatrix.hpp"
11 
12 //#############################################################################
13 
19 
20 public:
21 
23 
24 
31  virtual double * gradient(const ClpSimplex * model,
32  const double * solution, double & offset, bool refresh,
33  int includeLinear = 2);
35 
37  virtual double reducedGradient(ClpSimplex * model, double * region,
38  bool useFeasibleCosts);
45  virtual double stepLength(ClpSimplex * model,
46  const double * solution,
47  const double * change,
48  double maximumTheta,
49  double & currentObj,
50  double & predictedObj,
51  double & thetaObj);
53  virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
54  virtual void resize(int newNumberColumns) ;
56  virtual void deleteSome(int numberToDelete, const int * which) ;
58  virtual void reallyScale(const double * columnScale) ;
62  virtual int markNonlinear(char * which);
63 
65  virtual void newXValues() ;
67 
68 
70 
73 
75  ClpAmplObjective(void * amplInfo);
76 
80 
83 
85  virtual ~ClpAmplObjective ();
86 
88  virtual ClpObjective * clone() const;
89 
91 
93  double * linearObjective() const;
96 
97  //---------------------------------------------------------------------------
98 
99 private:
102  double offset_;
106  double * objective_;
108  double * gradient_;
110 };
111 
112 #endif
113 
virtual ~ClpAmplObjective()
Destructor.
virtual void newXValues()
Say we have new primal solution - so may need to recompute.
void * amplObjective_
Ampl info.
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Resize objective.
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns gradient.
virtual void resize(int newNumberColumns)
Resize objective.
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...
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
Objective Abstract Base Class.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
Ampl Objective Class.
virtual void reallyScale(const double *columnScale)
Scale objective.
double * objective_
Objective.
double * linearObjective() const
Linear objective.
virtual int markNonlinear(char *which)
Given a zeroed array sets nonlinear columns to 1.
ClpAmplObjective()
Default Constructor.
virtual ClpObjective * clone() const
Clone.
ClpAmplObjective & operator=(const ClpAmplObjective &rhs)
Assignment operator.
double * gradient_
Gradient.
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL)