Class TSPTWInstance
java.lang.Object
es.urjc.etsii.grafo.io.Instance
es.urjc.etsii.grafo.tsptw.model.TSPTWInstance
- All Implemented Interfaces:
Comparable<Instance>
-
Field Summary
Fields inherited from class Instance
LOAD_TIME_NANOS -
Constructor Summary
ConstructorsConstructorDescriptionTSPTWInstance(String suggestedName, int n, double[][] distance, int[] windowStart, int[] windowEnd, boolean isSymmetric) -
Method Summary
Modifier and TypeMethodDescriptionintHow should instances be ordered, when listing and solving them.doubledist(int a, int b) double[][]int[]intgetWindowEnd(int a) int[]intgetWindowStart(int a) booleanintn()Methods inherited from class Instance
customProperties, equals, getId, getPath, getProperty, getPropertyOrDefault, getUniquePropertiesKeys, hashCode, resetProperties, setPath, setProperty, toString
-
Constructor Details
-
TSPTWInstance
public TSPTWInstance(String suggestedName, int n, double[][] distance, int[] windowStart, int[] windowEnd, boolean isSymmetric)
-
-
Method Details
-
compareTo
How should instances be ordered, when listing and solving them. If not implemented, defaults to lexicographic sort by instance name- Specified by:
compareToin interfaceComparable<Instance>- Overrides:
compareToin classInstance- Parameters:
other- the other instance to be compared against this one- Returns:
- comparison result
-
n
public int n() -
dist
public double dist(int a, int b) -
getWindowStart
public int getWindowStart(int a) -
getWindowEnd
public int getWindowEnd(int a) -
isSymmetric
public boolean isSymmetric() -
getDistance
public double[][] getDistance() -
getWindowStart
public int[] getWindowStart() -
getWindowEnd
public int[] getWindowEnd()
-