Main Page
Classes
Files
File List
File Members
opt
build
coinor-vol
coinor-vol-1.1.7
Vol
examples
Volume-LP
lp.h
Go to the documentation of this file.
1
#ifndef __LP_H__
2
#define __LP_H__
3
4
#include <cfloat>
5
#include <string>
6
#include <fstream>
7
8
#include "
VolVolume.hpp
"
9
#include "
lpc.h
"
10
11
using
std::string;
12
13
//#############################################################################
14
15
// parameters controlled by the user
16
class
LP_parms
{
17
public
:
18
string
fdata
;
// file with the data
19
string
dualfile
;
// file with an initial dual solution
20
string
dual_savefile
;
// file to save final dual solution
21
string
primal_savefile
;
// file to save primal integer solution
22
int
h_iter
;
// number of times that the primal heuristic will be run
23
// after termination of the volume algorithm
24
double
var_ub
;
// upper bound for the variables
25
26
LP_parms
(
const
char
* filename);
27
~LP_parms
() {}
28
};
29
30
//#############################################################################
31
32
class
LP_data_and_hook
:
public
VOL_user_hooks
{
// original data for LP
33
public
:
34
VOL_lp
lp_pb
;
// lp data
35
VOL_dvector
rhs
;
// right hand side
36
VOL_ivector
ix
;
// best integer feasible solution so far
37
double
icost
;
// value of best integer feasible solution
38
public
:
39
LP_data_and_hook
() :
icost
(DBL_MAX) {}
40
virtual
~LP_data_and_hook
() {}
41
42
public
:
43
// for all hooks: return value of -1 means that volume should quit
44
// compute reduced costs
45
int
compute_rc
(
const
VOL_dvector
& u,
VOL_dvector
& rc);
46
// solve relaxed problem
47
int
solve_subproblem
(
const
VOL_dvector
& u,
const
VOL_dvector
& rc,
48
double
& lcost,
VOL_dvector
& x,
VOL_dvector
&v,
49
double
& pcost);
50
// primal heuristic
51
// return DBL_MAX in heur_val if feas sol wasn't/was found
52
int
heuristics
(
const
VOL_problem
& p,
53
const
VOL_dvector
& x,
double
& heur_val);
54
};
55
56
//#############################################################################
57
58
#endif
Generated on Tue Mar 1 2016 22:28:24 by
1.8.4