Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClpAmplObjective.hpp
Go to the documentation of this file.
1 /* $Id$ */
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 
18 class ClpAmplObjective : public ClpObjective {
19 
20 public:
22 
23 
30  virtual double *gradient(const ClpSimplex *model,
31  const double *solution, double &offset, bool refresh,
32  int includeLinear = 2);
34 
36  virtual double reducedGradient(ClpSimplex *model, double *region,
37  bool useFeasibleCosts);
44  virtual double stepLength(ClpSimplex *model,
45  const double *solution,
46  const double *change,
47  double maximumTheta,
48  double &currentObj,
49  double &predictedObj,
50  double &thetaObj);
52  virtual double objectiveValue(const ClpSimplex *model, const double *solution) const;
53  virtual void resize(int newNumberColumns);
55  virtual void deleteSome(int numberToDelete, const int *which);
57  virtual void reallyScale(const double *columnScale);
61  virtual int markNonlinear(char *which);
62 
64  virtual void newXValues();
66 
68 
71 
73  ClpAmplObjective(void *amplInfo);
74 
78 
81 
83  virtual ~ClpAmplObjective();
84 
86  virtual ClpObjective *clone() const;
87 
89 
91  double *linearObjective() const;
94 
95  //---------------------------------------------------------------------------
96 
97 private:
100  double offset_;
104  double *objective_;
106  double *gradient_;
108 };
109 
110 #endif
111 
112 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
113 */
ClpAmplObjective
Ampl Objective Class.
Definition: ClpAmplObjective.hpp:18
ClpAmplObjective::objective_
double * objective_
Objective.
Definition: ClpAmplObjective.hpp:104
ClpAmplObjective::ClpAmplObjective
ClpAmplObjective()
Default Constructor.
ClpAmplObjective::gradient_
double * gradient_
Gradient.
Definition: ClpAmplObjective.hpp:106
ClpAmplObjective::newXValues
virtual void newXValues()
Say we have new primal solution - so may need to recompute.
ClpAmplObjective::markNonlinear
virtual int markNonlinear(char *which)
Given a zeroed array sets nonlinear columns to 1.
ClpAmplObjective::amplObjective_
void * amplObjective_
Ampl info.
Definition: ClpAmplObjective.hpp:102
ClpAmplObjective::gradient
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns gradient.
ClpAmplObjective::offset_
double offset_
Definition: ClpAmplObjective.hpp:100
ClpAmplObjective::clone
virtual ClpObjective * clone() const
Clone.
ClpAmplObjective::resize
virtual void resize(int newNumberColumns)
ClpAmplObjective::stepLength
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...
ClpAmplObjective::linearObjective
double * linearObjective() const
Linear objective.
ClpAmplObjective::operator=
ClpAmplObjective & operator=(const ClpAmplObjective &rhs)
Assignment operator.
ClpAmplObjective::~ClpAmplObjective
virtual ~ClpAmplObjective()
Destructor.
ClpAmplObjective::reallyScale
virtual void reallyScale(const double *columnScale)
Scale objective.
ClpAmplObjective::objectiveValue
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL)
ClpAmplObjective::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
ClpAmplObjective::reducedGradient
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Resize objective.