Cbc
2.10.13
Toggle main menu visibility
Loading...
Searching...
No Matches
Cbc
src
ClpConstraintAmpl.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 ClpConstraintAmpl_H
7
#define ClpConstraintAmpl_H
8
9
#include "ClpConstraint.hpp"
10
11
//#############################################################################
12
16
17
class
ClpConstraintAmpl
:
public
ClpConstraint {
18
19
public
:
21
22
29
virtual
int
gradient
(
const
ClpSimplex *
model
,
30
const
double
*solution,
31
double
*
gradient
,
32
double
&functionValue,
33
double
&offset,
34
bool
useScaling =
false
,
35
bool
refresh =
true
)
const
;
37
virtual
void
resize
(
int
newNumberColumns);
39
virtual
void
deleteSome
(
int
numberToDelete,
const
int
*which);
41
virtual
void
reallyScale
(
const
double
*columnScale);
45
virtual
int
markNonlinear
(
char
*which)
const
;
49
virtual
int
markNonzero
(
char
*which)
const
;
51
virtual
void
newXValues
();
53
55
56
57
ClpConstraintAmpl
();
58
60
ClpConstraintAmpl
(
int
row,
void
*amplInfo);
61
64
ClpConstraintAmpl
(
const
ClpConstraintAmpl
&rhs);
65
67
ClpConstraintAmpl
&
operator=
(
const
ClpConstraintAmpl
&rhs);
68
70
virtual
~ClpConstraintAmpl
();
71
73
virtual
ClpConstraint *
clone
()
const
;
75
77
78
virtual
int
numberCoefficients
()
const
;
80
inline
const
int
*
column
()
const
81
{
82
return
column_
;
83
}
84
85
inline
const
double
*
coefficient
()
const
86
{
87
return
coefficient_
;
88
}
89
90
91
//---------------------------------------------------------------------------
92
93
private
:
96
void
*
amplInfo_
;
98
int
*
column_
;
100
double
*
coefficient_
;
102
int
numberCoefficients_
;
104
};
105
106
#endif
107
108
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
109
*/
model
CbcModel * model() const
Return model.
Definition
CbcObject.hpp:252
ClpConstraintAmpl::numberCoefficients_
int numberCoefficients_
Number of coefficients in gradient.
Definition
ClpConstraintAmpl.hpp:102
ClpConstraintAmpl::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraintAmpl::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraintAmpl::amplInfo_
void * amplInfo_
Definition
ClpConstraintAmpl.hpp:96
ClpConstraintAmpl::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraintAmpl::gradient
virtual int gradient(const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const
Fills gradient.
ClpConstraintAmpl::ClpConstraintAmpl
ClpConstraintAmpl(int row, void *amplInfo)
Constructor from ampl.
ClpConstraintAmpl::coefficient_
double * coefficient_
Coefficients.
Definition
ClpConstraintAmpl.hpp:100
ClpConstraintAmpl::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.
ClpConstraintAmpl::ClpConstraintAmpl
ClpConstraintAmpl()
Default Constructor.
ClpConstraintAmpl::coefficient
const double * coefficient() const
Coefficients.
Definition
ClpConstraintAmpl.hpp:85
ClpConstraintAmpl::column_
int * column_
Column.
Definition
ClpConstraintAmpl.hpp:98
ClpConstraintAmpl::ClpConstraintAmpl
ClpConstraintAmpl(const ClpConstraintAmpl &rhs)
Copy constructor .
ClpConstraintAmpl::~ClpConstraintAmpl
virtual ~ClpConstraintAmpl()
Destructor.
ClpConstraintAmpl::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintAmpl::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintAmpl::markNonlinear
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonampl columns to 1.
ClpConstraintAmpl::newXValues
virtual void newXValues()
Say we have new primal solution - so may need to recompute.
ClpConstraintAmpl::column
const int * column() const
Columns.
Definition
ClpConstraintAmpl.hpp:80
ClpConstraintAmpl::operator=
ClpConstraintAmpl & operator=(const ClpConstraintAmpl &rhs)
Assignment operator.
Generated by
1.17.0