Cbc  2.10.5
 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 2465 2019-01-03 19:26:52Z unxusr $ */
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:
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 */
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:106
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)