From 0f039f083748e211adf991c57877b69cb0a4f6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Fri, 17 Nov 2017 17:43:44 +0100 Subject: [PATCH] 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. --- encodings/sequential-horizon.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encodings/sequential-horizon.lp b/encodings/sequential-horizon.lp index fe28989..7c6d84b 100644 --- a/encodings/sequential-horizon.lp +++ b/encodings/sequential-horizon.lp @@ -48,7 +48,7 @@ caused(Variable, Value, T) :- modified(Variable, 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