Clp
1.17.11
Toggle main menu visibility
Loading...
Searching...
No Matches
Clp
src
ClpLinearObjective.hpp
Go to the documentation of this file.
1
/* $Id$ */
2
// Copyright (C) 2003, 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 ClpLinearObjective_H
7
#define ClpLinearObjective_H
8
9
#include "
ClpObjective.hpp
"
10
11
//#############################################################################
12
16
17
class
ClpLinearObjective
:
public
ClpObjective
{
18
19
public
:
21
22
27
virtual
double
*
gradient
(
const
ClpSimplex
*model,
28
const
double
*solution,
double
&offset,
bool
refresh,
29
int
includeLinear = 2);
32
virtual
double
reducedGradient
(
ClpSimplex
*model,
double
*region,
33
bool
useFeasibleCosts);
40
virtual
double
stepLength
(
ClpSimplex
*model,
41
const
double
*solution,
42
const
double
*change,
43
double
maximumTheta,
44
double
¤tObj,
45
double
&predictedObj,
46
double
&thetaObj);
48
virtual
double
objectiveValue
(
const
ClpSimplex
*model,
const
double
*solution)
const
;
50
virtual
void
resize
(
int
newNumberColumns);
52
virtual
void
deleteSome
(
int
numberToDelete,
const
int
*which);
54
virtual
void
reallyScale
(
const
double
*columnScale);
55
57
59
60
61
ClpLinearObjective
();
62
64
ClpLinearObjective
(
const
double
*objective,
int
numberColumns);
65
67
ClpLinearObjective
(
const
ClpLinearObjective
&);
71
ClpLinearObjective
(
const
ClpLinearObjective
&rhs,
int
numberColumns,
72
const
int
*whichColumns);
73
75
ClpLinearObjective
&
operator=
(
const
ClpLinearObjective
&rhs);
76
78
virtual
~ClpLinearObjective
();
79
81
virtual
ClpObjective
*
clone
()
const
;
85
virtual
ClpObjective
*
subsetClone
(
int
numberColumns,
86
const
int
*whichColumns)
const
;
87
89
90
//---------------------------------------------------------------------------
91
92
private
:
95
double
*
objective_
;
97
int
numberColumns_
;
99
};
100
101
#endif
102
103
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
104
*/
ClpObjective.hpp
ClpLinearObjective::reallyScale
virtual void reallyScale(const double *columnScale)
Scale objective.
ClpLinearObjective::subsetClone
virtual ClpObjective * subsetClone(int numberColumns, const int *whichColumns) const
Subset clone.
ClpLinearObjective::numberColumns_
int numberColumns_
number of columns
Definition
ClpLinearObjective.hpp:97
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const ClpLinearObjective &)
Copy constructor.
ClpLinearObjective::gradient
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns objective coefficients.
ClpLinearObjective::clone
virtual ClpObjective * clone() const
Clone.
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective()
Default Constructor.
ClpLinearObjective::reducedGradient
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Returns reduced gradient.Returns an offset (to be added to current one).
ClpLinearObjective::~ClpLinearObjective
virtual ~ClpLinearObjective()
Destructor.
ClpLinearObjective::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const double *objective, int numberColumns)
Constructor from objective.
ClpLinearObjective::resize
virtual void resize(int newNumberColumns)
Resize objective.
ClpLinearObjective::objectiveValue
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL).
ClpLinearObjective::ClpLinearObjective
ClpLinearObjective(const ClpLinearObjective &rhs, int numberColumns, const int *whichColumns)
Subset constructor.
ClpLinearObjective::stepLength
virtual double stepLength(ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double ¤tObj, double &predictedObj, double &thetaObj)
Returns step length which gives minimum of objective for solution + theta * change vector up to maxim...
ClpLinearObjective::operator=
ClpLinearObjective & operator=(const ClpLinearObjective &rhs)
Assignment operator.
ClpLinearObjective::objective_
double * objective_
Definition
ClpLinearObjective.hpp:95
ClpObjective::ClpObjective
ClpObjective()
Default Constructor.
ClpSimplex
This solves LPs using the simplex method.
Definition
ClpSimplex.hpp:106
Generated by
1.17.0