Commit bf97f8b5 authored by FAGES Francois's avatar FAGES Francois
Browse files


parent b260210b
......@@ -178,6 +178,7 @@ commands = [
......@@ -22,16 +22,22 @@ pathway(Object1, Object2):-
type(Object1, object),
type(Object2, object),
doc('Gives one reaction pathway from \\argument{Object1} to \\argument{Object2} if one exists in the directed reaction graph of the current model (for more complex queries, see next section on Computation Tree Logic model-checking).'),
pathway(Object1, Object2, Path),
reverse(Path, Reactions),
forall(member(R, Reactions), writeln(R)).
pathway(Object1, Object2, Path)
reverse(Path, Reactions),
forall(member(R, Reactions), writeln(R))
writeln('there is no pathway')
pathway(Source, Target, Path):-
path([(Source, Source)], [], [(Source, Source)], Target, Path).
path([(Source, [Source])], [], [(Source, [Source])], Target, Path).
% Dijsktra algorithm with pathway memory
path([], [], _Forward, _Target, _Path):-
path([], New, Forward, Target, Path):-
path(New, [], Forward, Target, Path).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment