57 const vector< vector<SCIP_VAR*> >&
p_arc_var,
58 const vector< vector<SCIP_CONS*> >&
p_arc_con,
85 for (
int i = 0;
i < num_nodes(); ++
i)
87 for (
int j = 0;
j <
i; ++
j)
93 for (
int i = 1;
i < num_nodes(); ++
i)
122 for (
int j = 0;
j <
i; ++
j)
141 for (
int j = 0;
j <
i; ++
j)
162 for (
int j = 0;
j <
i; ++
j)
171 for (
int j = 0;
j <
i; ++
j)
180 for (
int j = 0;
j <
i; ++
j)
189 for (
int j = 0;
j <
i; ++
j)
267 for (list<int>::const_iterator
it =
tour.begin();
it !=
tour.end(); ++
it)
290 for (list<int>::const_iterator
it =
tour.begin();
it !=
tour.end(); ++
it)
298 for (list<int>::const_iterator
it =
tour.begin();
it !=
tour.end(); ++
it)
322static const SCIP_Real
eps = 1
e-9;
329 PQUEUE_KEY() : demand(0), length(0.0) {}
334 if (
l1.demand <
l2.demand )
336 if (
l1.demand >
l2.demand )
338 if (
l1.length <
l2.length-
eps )
353struct NODE_TABLE_DATA
357 PQUEUE::pqueue_item queue_item;
359 NODE_TABLE_DATA( ) : length(0.0), predecessor(-1), queue_item(
NULL ) {}
363typedef std::map< NODE_TABLE_KEY, NODE_TABLE_DATA >
NODE_TABLE;
374 const vector< vector<SCIP_Real> >& length,
395 while ( !
PQ.empty() )
398 queue_item =
PQ.top();
453 PQ.remove( (*it)->second.queue_item );
ObjPricerVRP(SCIP *scip, const char *p_name, const int p_num_nodes, const int p_capacity, const vector< int > &p_demand, const vector< vector< int > > &p_distance, const vector< vector< SCIP_VAR * > > &p_arc_var, const vector< vector< SCIP_CONS * > > &p_arc_con, const vector< SCIP_CONS * > &p_part_con)
SCIP_RETCODE pricing(SCIP *scip, bool isfarkas) const
bool have_edge(const int i, const int j) const
SCIP_RETCODE add_tour_variable(SCIP *scip, const list< int > &tour) const
SCIP_CONS * arc_con(const int i, const int j) const
int demand(const int i) const
double find_shortest_tour(const vector< vector< double > > &length, list< int > &tour) const
SCIP_CONS * part_con(const int i) const
C++ wrapper for variable pricer.
Constraint handler for linear constraints in their most general form, .
SCIP_Real SCIPgetDualsolLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetDualfarkasLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddPricedVar(SCIP *scip, SCIP_VAR *var, SCIP_Real score)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
class for priority queues
#define SCIP_DECL_PRICERINIT(x)
#define SCIP_DECL_PRICERREDCOST(x)
#define SCIP_DECL_PRICERFARKAS(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS