Excluding derived variables from inertia.

In the example encoding, derived variables were accidentally included in
the inertia rule, as this only checked the position of the parameter.
This commit fixes this by only allowing common variables (and not
derived ones) within the inertia rule.
This commit is contained in:
2017-11-17 17:43:44 +01:00
parent 9d04996b0a
commit 0f039f0837

View File

@@ -48,7 +48,7 @@ caused(Variable, Value, T) :-
modified(Variable, T) :- caused(Variable, Value, T). modified(Variable, T) :- caused(Variable, Value, T).
holds(Variable, Value, T) :- caused(Variable, Value, T). holds(Variable, Value, T) :- caused(Variable, Value, T).
holds(Variable, Value, T) :- holds(Variable, Value, T - 1), not modified(Variable, T), time(T). holds(variable(V), Value, T) :- holds(variable(V), Value, T - 1), not modified(variable(V), T), time(T).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Variables and mutex groups % Variables and mutex groups