Cbc
2.10.13
Toggle main menu visibility
Loading...
Searching...
No Matches
Cbc
src
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
17
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
¤tObj,
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
69
70
ClpAmplObjective
();
71
73
ClpAmplObjective
(
void
*amplInfo);
74
77
ClpAmplObjective
(
const
ClpAmplObjective
&rhs);
78
80
ClpAmplObjective
&
operator=
(
const
ClpAmplObjective
&rhs);
81
83
virtual
~ClpAmplObjective
();
84
86
virtual
ClpObjective *
clone
()
const
;
87
89
91
92
double
*
linearObjective
()
const
;
94
95
//---------------------------------------------------------------------------
96
97
private
:
100
double
offset_
;
102
void
*
amplObjective_
;
104
double
*
objective_
;
106
double
*
gradient_
;
108
};
109
110
#endif
111
112
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
113
*/
model
CbcModel * model() const
Return model.
Definition
CbcObject.hpp:252
ClpAmplObjective::objective_
double * objective_
Objective.
Definition
ClpAmplObjective.hpp:104
ClpAmplObjective::ClpAmplObjective
ClpAmplObjective()
Default Constructor.
ClpAmplObjective::reallyScale
virtual void reallyScale(const double *columnScale)
Scale objective.
ClpAmplObjective::ClpAmplObjective
ClpAmplObjective(void *amplInfo)
Constructor from ampl info.
ClpAmplObjective::operator=
ClpAmplObjective & operator=(const ClpAmplObjective &rhs)
Assignment operator.
ClpAmplObjective::reducedGradient
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Resize objective.
ClpAmplObjective::offset_
double offset_
Definition
ClpAmplObjective.hpp:100
ClpAmplObjective::newXValues
virtual void newXValues()
Say we have new primal solution - so may need to recompute.
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::markNonlinear
virtual int markNonlinear(char *which)
Given a zeroed array sets nonlinear columns to 1.
ClpAmplObjective::clone
virtual ClpObjective * clone() const
Clone.
ClpAmplObjective::~ClpAmplObjective
virtual ~ClpAmplObjective()
Destructor.
ClpAmplObjective::linearObjective
double * linearObjective() const
Linear objective.
ClpAmplObjective::gradient_
double * gradient_
Gradient.
Definition
ClpAmplObjective.hpp:106
ClpAmplObjective::ClpAmplObjective
ClpAmplObjective(const ClpAmplObjective &rhs)
Copy constructor .
ClpAmplObjective::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...
ClpAmplObjective::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in 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::resize
virtual void resize(int newNumberColumns)
Generated by
1.17.0