coin-Bcp
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Bcp-1.4.4
Bcp
examples
MCF-3
include
MCF3_var.hpp
Go to the documentation of this file.
1
#ifndef MCF3_var_hpp
2
#define MCF3_var_hpp
3
4
#include "
CoinPackedVector.hpp
"
5
#include "
BCP_buffer.hpp
"
6
#include "
BCP_var.hpp
"
7
8
/*---------------------------------------------------------------------------*/
9
10
// A var describing a column of the master problem, that is a flow for a
11
// commodity.
12
13
// For the variables the upper bound is 1, but we set it to 2 so there
14
// will never be a variable out of basis at its upper bound. That would kill
15
// column generation. The convexity constraint will take care of keeping these
16
// variables under 1.
17
18
class
MCF3_var
:
public
BCP_var_algo
{
19
public
:
20
int
commodity
;
21
CoinPackedVector
flow
;
22
double
weight
;
23
24
public
:
25
MCF3_var
(
int
com,
const
CoinPackedVector
& f,
double
w) :
26
BCP_var_algo
(
BCP_ContinuousVar
, w, 0, 2),
27
commodity
(com),
28
flow
(f.getNumElements(), f.getIndices(), f.getElements(), false),
29
weight
(w) {}
30
MCF3_var
(
BCP_buffer
& buf);
31
~MCF3_var
() {}
32
33
void
pack
(
BCP_buffer
& buf)
const
;
34
};
35
36
void
MCF3_pack_var
(
const
BCP_var_algo
* var,
BCP_buffer
& buf);
37
BCP_var_algo
*
MCF3_unpack_var
(
BCP_buffer
& buf);
38
39
#endif
MCF3_var::~MCF3_var
~MCF3_var()
Definition:
MCF3_var.hpp:31
MCF3_pack_var
void MCF3_pack_var(const BCP_var_algo *var, BCP_buffer &buf)
MCF3_var::pack
void pack(BCP_buffer &buf) const
MCF3_var
Definition:
MCF3_var.hpp:18
CoinPackedVector.hpp
BCP_var.hpp
MCF3_var::weight
double weight
Definition:
MCF3_var.hpp:22
MCF3_unpack_var
BCP_var_algo * MCF3_unpack_var(BCP_buffer &buf)
MCF3_var::MCF3_var
MCF3_var(int com, const CoinPackedVector &f, double w)
Definition:
MCF3_var.hpp:25
MCF3_var::commodity
int commodity
Definition:
MCF3_var.hpp:20
MCF3_var::flow
CoinPackedVector flow
Definition:
MCF3_var.hpp:21
BCP_ContinuousVar
Continuous variable.
Definition:
BCP_enum.hpp:167
BCP_var_algo
This is the class from which the user should derive her own algorithmic variables.
Definition:
BCP_var.hpp:277
CoinPackedVector
Sparse Vector.
Definition:
CoinPackedVector.hpp:123
BCP_buffer
This class describes the message buffer used for all processes of BCP.
Definition:
BCP_buffer.hpp:39
BCP_buffer.hpp
Generated by
1.8.5