Package edu.fiu.jtlex.data
Class GraphTCSP
java.lang.Object
edu.fiu.jtlex.data.GraphTCSP
- All Implemented Interfaces:
IGraphTCSP
public class GraphTCSP extends java.lang.Object implements IGraphTCSP
Default implementation of
IGraphTCSP.- Author:
- luisrobaina
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description org.jacop.core.StoregetStore()This method is meant to allow for getting the values held in the store.java.util.List<org.jacop.core.IntVar>solve()Makes use of JaCoP to solve the TCSP problem.java.util.List<org.jacop.core.IntVar>solveRandom()Assigns integer values to the JaCoP problems shortest solutions.java.util.List<java.util.List<org.jacop.core.IntVar>>solveRandom(int n)Assigns integer values to the JaCoP problems shortest solutions.java.util.List<java.lang.String>stringTimeLine()Returns a full string representation of the timeline.
-
Constructor Details
-
GraphTCSP
Transforms the TimeML Graph into a Temporal Constraint Satasfaction Problem. This method created two JaCoP IntVars per node, one for the start point, the other for the end point, and asserts constraints depending on the types of links in the graph.- Parameters:
TMLGraph- a partitioned TimeML graph, which therefore contains no S-Links
-
-
Method Details
-
solveRandom
public java.util.List<java.util.List<org.jacop.core.IntVar>> solveRandom(int n)Assigns integer values to the JaCoP problems shortest solutions.- Specified by:
solveRandomin interfaceIGraphTCSP- Parameters:
n- #TODO- Returns:
- #TODO
-
solveRandom
public java.util.List<org.jacop.core.IntVar> solveRandom()Assigns integer values to the JaCoP problems shortest solutions.- Specified by:
solveRandomin interfaceIGraphTCSP- Returns:
- A list of strings corresponding to the time points and the numerical value assigned to it for ordering or null if there is no solution.
-
solve
public java.util.List<org.jacop.core.IntVar> solve()Makes use of JaCoP to solve the TCSP problem.- Specified by:
solvein interfaceIGraphTCSP- Returns:
- JaCoP compatible units of the form {ID:Int}
- See Also:
- org.JaCoP.search, JaCoP <IntVar>
-
stringTimeLine
public java.util.List<java.lang.String> stringTimeLine()Returns a full string representation of the timeline. This string will only apply to the current partition.- Specified by:
stringTimeLinein interfaceIGraphTCSP- Returns:
- a full string representation of the timeline.
-
getStore
public org.jacop.core.Store getStore()This method is meant to allow for getting the values held in the store.- Specified by:
getStorein interfaceIGraphTCSP- Returns:
- jacop objects used to store IntVars
- See Also:
- JaCoP <T extends Var> , org.JaCoP.search
-