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

    Constructors 
    Constructor Description
    GraphTCSP​(IGraph TMLGraph)
    Transforms the TimeML Graph into a Temporal Constraint Satasfaction Problem.
  • Method Summary

    Modifier and Type Method Description
    org.jacop.core.Store getStore()
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphTCSP

      public GraphTCSP​(IGraph TMLGraph)
      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:
      solveRandom in interface IGraphTCSP
      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:
      solveRandom in interface IGraphTCSP
      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:
      solve in interface IGraphTCSP
      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:
      stringTimeLine in interface IGraphTCSP
      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:
      getStore in interface IGraphTCSP
      Returns:
      jacop objects used to store IntVars
      See Also:
      JaCoP <T extends Var> , org.JaCoP.search