Fortgeschrittenenpraktikum
|
Class representing pricing problem After each iteration of the master problem, the scip_redcost
method is called.
More...
#include <pricer.h>
Classes | |
class | PricerData |
Problem data class for the pricing problem. More... | |
Public Member Functions | |
SegmentPricer (SCIP *scip, Graph &g_, std::vector< Graph::vertex_descriptor > master_nodes, std::vector< SCIP_CONS * > partitioning_cons, SCIP_CONS *num_segments_cons) | |
Constructor for the pricer class. More... | |
SCIP_DECL_PRICERINIT (scip_init) | |
Set up pricer This replaces variables and constraints by their counterparts in the transformed problem. | |
SCIP_RETCODE | setupVars (SCIP *scip_pricer, Graph::vertex_descriptor t) |
Add variables \(x_s\) for each superpixel \(s\in\mathcal{S}\) to the pricing problem represented by scip_pricer | |
virtual | SCIP_DECL_PRICERREDCOST (scip_redcost) |
Reduced cost pricing method of variable pricer for feasible LPs Solves the pricing problem for each master node \(t\in T\). More... | |
std::pair< SCIP_Real, std::vector< Graph::vertex_descriptor > > | heuristic (SCIP *scip, Graph::vertex_descriptor master_node, SCIP_Real lambda) |
SCIP_RETCODE | addPartitionVarFromPricerSCIP (SCIP *scip, SCIP *scip_pricer, SCIP_SOL *sol, Graph::vertex_descriptor t) |
Calls addPartitionVar with the vector of all superpixels \(s\) for which \(x_s = 1\). | |
SCIP_RETCODE | addPartitionVar (SCIP *scip, Graph::vertex_descriptor master_node, std::vector< Graph::vertex_descriptor > superpixels) |
Adds a new segment variable to the master problem This also adds the variable to the appropriate existing constraints. | |
Class representing pricing problem After each iteration of the master problem, the scip_redcost
method is called.
This method should generate a new column with negative reduced costs and add it to the problem.
SegmentPricer::SegmentPricer | ( | SCIP * | scip, |
Graph & | g_, | ||
std::vector< Graph::vertex_descriptor > | master_nodes, | ||
std::vector< SCIP_CONS * > | partitioning_cons, | ||
SCIP_CONS * | num_segments_cons | ||
) |
Constructor for the pricer class.
scip | master SCIP instance |
g_ | the graph of superpixels |
master_nodes | master nodes of all segments |
|
virtual |
Reduced cost pricing method of variable pricer for feasible LPs Solves the pricing problem for each master node \(t\in T\).
If the reduced costs are negative, i.e.
\[-\sum_{s\in\mathcal{S}} x_s\cdot\mu_s + \sum_{s\in\mathcal{S}} x_s\cdot|y_t-y_s| < \lambda,\]
the generated segment consisting of all superpixels \(s\) for which \(x_s = 1\) is added to the master problem.