public class AllenIntervalNetworkUtilities
extends java.lang.Object
| Constructor and Description |
|---|
AllenIntervalNetworkUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static AllenIntervalNetworkSolver |
clone(AllenIntervalNetworkSolver oldSolver,
Variable[] intervals,
Constraint[] constraints,
int newSize)
Creates a clone of an
AllenIntervalNetworkSolver. |
static AllenIntervalNetworkSolver |
createReducedCopy(AllenIntervalNetworkSolver oldSolver,
AllenInterval[] intervals)
Creates a "reduced copy" of an
AllenIntervalNetworkSolver. |
static AllenIntervalNetworkSolver |
createReducedCopy(AllenIntervalNetworkSolver oldSolver,
AllenInterval[] intervalsInOut,
int additionalCapactity)
Creates a "reduced copy" of an
AllenIntervalNetworkSolver. |
public static AllenIntervalNetworkSolver clone(AllenIntervalNetworkSolver oldSolver, Variable[] intervals, Constraint[] constraints, int newSize)
AllenIntervalNetworkSolver. This is done by copying the high level AllenIntervalConstraints,
thus, care should be exercised when using this function together with createReducedCopy(org.metacsp.multi.allenInterval.AllenIntervalNetworkSolver, org.metacsp.multi.allenInterval.AllenInterval[]),
since this function discards the high-level constraints (by translating them into SimpleDistanceConstraints).oldSolver - the AllenIntervalNetworkSolver that should be cloned.intervals - An array of AllenIntervals that should be re-mapped. The references to the in this array will be replaced
with their corresponding AllenIntervals in the cloned AllenIntervalNetworkSolver. (All AllenIntervals in the old
AllenIntervalNetworkSolver will be cloned regardless of the contents of this array.)newSize - The new desired size of the network or 0 if the network should be minimizedAllenIntervalNetworkSolver.public static AllenIntervalNetworkSolver createReducedCopy(AllenIntervalNetworkSolver oldSolver, AllenInterval[] intervals)
AllenIntervalNetworkSolver. The reduced copy contains a subset
of intervals from the original and their temporal properties are equivalent. The reduced copy does not
contain the constraints from the original however, these are replaced with lower-level SimpleDistanceConstraints.oldSolver - the solver that should be copied.intervals - The intervals of interest in the old solver, each AllenInterval reference in this array will
be replaced with a corresponding reference to its copy in the new AllenIntervalNetworkSolver.AllenIntervalNetworkSolver.public static AllenIntervalNetworkSolver createReducedCopy(AllenIntervalNetworkSolver oldSolver, AllenInterval[] intervalsInOut, int additionalCapactity)
AllenIntervalNetworkSolver. The reduced copy contains a subset
of intervals from the original and their temporal properties are equivalent. The reduced copy does not
contain the constraints from the original however, these are replaced with lower-level SimpleDistanceConstraints.oldSolver - the solver that should be copied.intervalsInOut - The intervals of interest in the old solver, each AllenInterval reference in this array will
be replaced with a corresponding reference to its copy in the new AllenIntervalNetworkSolver.additionalCapactity - additional capacity for creating new intervals in the new solver.AllenIntervalNetworkSolver.