public class CutHandler<T extends ModelInterface,W extends MasterData> extends Object
AbstractCutGenerator
(s) to generate inequalities of different types.Modifier and Type | Class and Description |
---|---|
protected class |
CutHandler.CHNotifier
Inner Class which notifies CHListeners
|
Modifier and Type | Field and Description |
---|---|
protected Configuration |
config
Configuration file for this class
|
protected Set<AbstractCutGenerator<T,W>> |
cutGenerators
Set of CutGenerators
|
protected org.slf4j.Logger |
logger
Logger for this class
|
Constructor and Description |
---|
CutHandler()
Creates a new CutHandler
|
Modifier and Type | Method and Description |
---|---|
void |
addCHEventListener(CHListener listener)
Adds a CHlistener
|
void |
addCutGenerator(AbstractCutGenerator<T,W> cutGenerator)
Add a new cutGenerator
|
void |
addCuts(Collection<AbstractInequality> cuts)
Add a set of inequalities from an external source.
|
void |
close()
Close the Cut Generators
|
boolean |
generateInequalities()
Generates inequalities for the master problem of the column generation model, by invoking the
generateInequalities method for each
of the registered cut generators. |
List<AbstractInequality> |
getCuts()
Gets a list of all inequalities generated by the Cut Generators
|
void |
removeCHEventListener(CHListener listener)
Removes a CHlistener
|
void |
removeCutGenerator(AbstractCutGenerator<T,W> cutGenerator)
Remove a cutGenerator
|
void |
setMasterData(W masterData)
Supply the data object containing the data from the master problem which is required by the cutGenerators to
separate valid inequalities.
|
protected final org.slf4j.Logger logger
protected final Configuration config
protected Set<AbstractCutGenerator<T extends ModelInterface,W extends MasterData>> cutGenerators
public void setMasterData(W masterData)
masterData
- Master data objectpublic void addCutGenerator(AbstractCutGenerator<T,W> cutGenerator)
cutGenerator
- cut generatorpublic void removeCutGenerator(AbstractCutGenerator<T,W> cutGenerator)
cutGenerator
- cut generatorpublic boolean generateInequalities()
generateInequalities
method for each
of the registered cut generators. Returns as soon as a single cut has been found!public void addCuts(Collection<AbstractInequality> cuts)
cuts
- Collection of inequalitiespublic List<AbstractInequality> getCuts()
public void close()
public void addCHEventListener(CHListener listener)
listener
- listenerpublic void removeCHEventListener(CHListener listener)
listener
- listenerCopyright © 2016. All rights reserved.