T
- type of model dataU
- type of columnV
- type of pricing problempublic abstract class AbstractPricingProblemSolver<T,U extends AbstractColumn<T,V>,V extends AbstractPricingProblem<T>> extends Object implements Callable<Void>, BranchingDecisionListener
Modifier and Type | Field and Description |
---|---|
protected List<U> |
columns
Columns generated
|
protected Configuration |
config
Configuration file
|
protected T |
dataModel
Data model
|
protected org.slf4j.Logger |
logger
Logger for this class
|
protected String |
name
Name of the pricing problem solver
|
protected double |
objective
Objective of pricing problem (best column)
|
protected V |
pricingProblem
Pricing problem
|
protected boolean |
pricingProblemInfeasible
Boolean indicating whether the pricing problem could be solved.
|
protected long |
timeLimit
Time by which the algorithm needs to be finished.
|
Constructor and Description |
---|
AbstractPricingProblemSolver(T dataModel,
V pricingProblem)
Creates a new solver instance for a particular pricing problem
|
Modifier and Type | Method and Description |
---|---|
void |
branchingDecisionPerformed(BranchingDecision bd)
Method invoked when a branching decision is executed.
|
void |
branchingDecisionReversed(BranchingDecision bd)
Method invoked when a branching decision is reversed due to backtracking in the Branch-and-Price tree
|
Void |
call()
Method needed for parallelization.
|
abstract void |
close()
Close the pricing problem and perform cleanup
|
protected abstract List<U> |
generateNewColumns()
Generates one or more new columns with negative reduced cost.
|
double |
getBound()
Returns a bound on the objective of the pricing problem.
|
List<U> |
getColumns()
Returns the list of negative reduced cost columns generated by the solver
|
String |
getName()
Returns the name of the pricing problem
|
double |
getObjective()
Returns the cost of the most negative reduced cost column.
|
boolean |
pricingProblemIsFeasible()
Returns whether the pricing problem is feasible.
|
protected abstract void |
setObjective()
Method which sets the objective of the Pricing Problem.
|
void |
setTimeLimit(long timeLimit)
Set time limit (future point in time).
|
protected void |
solve()
Solves the pricing problem.
|
protected final org.slf4j.Logger logger
protected final Configuration config
protected String name
protected final T dataModel
protected final V extends AbstractPricingProblem<T> pricingProblem
protected long timeLimit
protected double objective
protected List<U extends AbstractColumn<T,V>> columns
protected boolean pricingProblemInfeasible
public Void call() throws Exception
protected void solve() throws TimeLimitExceededException
TimeLimitExceededException
- TimeLimitExceededExceptionprotected abstract List<U> generateNewColumns() throws TimeLimitExceededException
TimeLimitExceededException
- thrown when timelimit is exceededpublic String getName()
public void setTimeLimit(long timeLimit)
timeLimit
- future point in time (System.currentTimeMillis() + runtime
)public double getObjective()
protected abstract void setObjective()
public double getBound()
public List<U> getColumns()
public boolean pricingProblemIsFeasible()
public abstract void close()
public void branchingDecisionPerformed(BranchingDecision bd)
branchingDecisionPerformed
in interface BranchingDecisionListener
bd
- branching decisionpublic void branchingDecisionReversed(BranchingDecision bd)
branchingDecisionReversed
in interface BranchingDecisionListener
bd
- branching decisionCopyright © 2016. All rights reserved.