Class STN
java.lang.Object
gov.nasa.jpl.aerie.scheduler.solver.stn.STN
Representation of a simple temporal network (Dechter, Meiri, and Pearl, 1991).
Set of timepoint variables with linear constraints between them
Classical constraint programming setting where
- Each variable has a domain
- We want to propagate the constraints to find a solution to the problem or ensure there is not one
To solve the constraints, we use bellman-ford algorithm.
if a negative cycle is detected during propagation, the network is infeasible
otherwise, the new variable domains are updated and can be queried. Domains here represent the flexibility associated
with each timepoint.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBeforeCst(String tp1, String tp2) tp1 is before tp2 equivalent to the constraint tp1 --- [0, +inf] ---> tp2 Maps to two edges in a distance graph i --- +inf ---> j i <--- -0 --- j we can remove the first one and keep only the second onevoidvoidaddTimepoint(String tp) doublegets the weight on link a-->bvoidremoveTimepoint(String tp1) toDOT()booleanupdate()
-
Constructor Details
-
STN
public STN()
-
-
Method Details
-
toDOT
-
addBeforeCst
tp1 is before tp2 equivalent to the constraint tp1 --- [0, +inf] ---> tp2 Maps to two edges in a distance graph i --- +inf ---> j i <--- -0 --- j we can remove the first one and keep only the second one -
removeTimepoint
-
addDurCst
-
getDurCst
-
addTimepoint
-
update
public boolean update() -
getDist
gets the weight on link a-->b
-