-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcvrppricerscip.h
43 lines (33 loc) · 1.26 KB
/
cvrppricerscip.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef CVRPPRICERSCIP_H
#define CVRPPRICERSCIP_H
//#define SCIP_DEBUG
#include <scip/scip.h>
#include <scip/scipdefplugins.h>
#include "objscip/objscip.h"
#include "mygraphlib.h"
#include "cvrp.h"
#include "conspool.h"
#include "varpool.h"
typedef ListGraph::EdgeMap<SCIP_VAR*> EdgeSCIPVarMap;
typedef ListGraph::EdgeMap<SCIP_CONS*> EdgeSCIPConsMap;
using namespace scip;
using namespace std;
class CVRPPricerSCIP : public ObjPricer {
private:
CVRPInstance &cvrp;
NodeSCIPConsMap &nodeMap;
ConsPool *consPool;
VarPool *varPool;
void getReducedCosts(SCIP *scip, bool isFarkas);
SCIP_RETCODE pricing(SCIP* scip, bool isFarkas);
public:
CVRPPricerSCIP(SCIP *scip, CVRPInstance &cvrp, NodeSCIPConsMap &nodeMap_, ConsPool *consPool_, VarPool *varPool_);
virtual ~CVRPPricerSCIP();
/** initialization method of variable pricer (called after problem was transformed) */
virtual SCIP_DECL_PRICERINIT(scip_init);
/** reduced cost pricing method of variable pricer for feasible LPs */
virtual SCIP_DECL_PRICERREDCOST(scip_redcost);
/** farkas pricing method of variable pricer for infeasible LPs */
virtual SCIP_DECL_PRICERFARKAS(scip_farkas);
};
#endif // CVRPPRICERSCIP_H