Hi, i need help creating a custom reified constraint. Given the following program, whereby the predicate existsPath/3 tells, if there exists a path between two nodes in a graph with the paths given in a List called PathList. :-lib(propia). :-lib(fd). :- export struct( path(sourceNode,targetNode,distance,edgesPassed)). existsPath(X,Y,PathList) :- member(path{sourceNode:X,targetNode:Y},PathList) infers fd. a possible call of the program would be: Y#::["X","Y","K","L","I"], existsPath("X",Y, [path{sourceNode:"X",targetNode:"K"}, path{sourceNode:"X",targetNode:"I"}]). Now I need to create a reified version of that constraint, looking something like: existsPath(X,Y,PathList,B) but I don't know how to do that. I would be really happy if someone could help me with this problem. Best regards, PhilippReceived on Thu Apr 08 2010 - 15:48:09 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST