%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Golog axiomatization translated from PDDL domain "rcll-production-durative"
%
% Generated by PDDL parser at 2020-07-26 05:43:26 PM
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

:- discontiguous type/1.
:- discontiguous subtype/2.
:- discontiguous rel_fluent/2.
:- discontiguous fun_fluent/3.
:- discontiguous cwa/1.
:- discontiguous poss/3.
:- discontiguous causes_true/3.
:- discontiguous causes_false/3.
:- discontiguous causes/4.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Typing Axioms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

type(object).
subtype(object,A):-member(A,[robot]).
subtype(object,A):-member(A,['team-color']).
subtype(object,A):-member(A,[location]).
subtype(location,A):-member(A,[mps]).
subtype(object,A):-member(A,['mps-typename']).
subtype(object,A):-member(A,['mps-statename']).
subtype(object,A):-member(A,['mps-side']).
subtype(object,A):-member(A,['base-color']).
subtype('base-color',A):-member(A,['product-base-color']).
subtype(object,A):-member(A,['cap-color']).
subtype('cap-color',A):-member(A,['product-cap-color']).
subtype(object,A):-member(A,['ring-color']).
subtype('ring-color',A):-member(A,['product-ring-color']).
subtype(object,A):-member(A,['ds-gate']).
subtype(object,A):-member(A,['cs-operation']).
subtype(object,A):-member(A,['cs-statename']).
subtype(object,A):-member(A,[order]).
subtype(object,A):-member(A,['order-complexity-value']).
subtype(object,A):-member(A,[workpiece]).
subtype(workpiece,A):-member(A,['cap-carrier']).
subtype(object,A):-member(A,['shelf-spot']).
subtype(object,A):-member(A,['ring-num']).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Constant Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

domain(location,A):-member(A,['#start']).
domain('mps-typename',A):-member(A,['#bs','#cs','#ds','#rs']).
domain('mps-statename',A):-member(A,['#idle','#broken','#prepared','#processing','#processed','#wait-idle','#ready-at-output','#down']).
domain('mps-side',A):-member(A,['#input','#output']).
domain('base-color',A):-member(A,['#base_none']).
domain('product-base-color',A):-member(A,['#base_red','#base_black','#base_silver']).
domain('cap-color',A):-member(A,['#cap_none']).
domain('product-cap-color',A):-member(A,['#cap_black','#cap_grey']).
domain('ds-gate',A):-member(A,['#gate-1','#gate-2','#gate-3']).
domain('ring-color',A):-member(A,['#ring_none']).
domain('product-ring-color',A):-member(A,['#ring_blue','#ring_green','#ring_orange','#ring_yellow']).
domain('cs-operation',A):-member(A,['#cs_retrieve','#cs_mount']).
domain('order-complexity-value',A):-member(A,['#c0','#c1','#c2','#c3']).
domain('shelf-spot',A):-member(A,['#left','#middle','#right']).
domain('ring-num',A):-member(A,['#zero','#one','#two','#three']).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Predicate Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

rel_fluent(at(A,B,C),[A-robot,B-location,C-'mps-side']).
rel_fluent(holding(A,B),[A-robot,B-workpiece]).
rel_fluent('can-hold'(A),[A-robot]).
rel_fluent('entered-field'(A),[A-robot]).
rel_fluent('location-free'(A,B),[A-location,B-'mps-side']).
rel_fluent('robot-waiting'(A),[A-robot]).
rel_fluent('mps-type'(A,B),[A-mps,B-'mps-typename']).
rel_fluent('mps-state'(A,B),[A-mps,B-'mps-statename']).
rel_fluent('bs-prepared-color'(A,B),[A-mps,B-'product-base-color']).
rel_fluent('bs-prepared-side'(A,B),[A-mps,B-'mps-side']).
rel_fluent('rs-ring-spec'(A,B,C),[A-mps,B-'product-ring-color',C-'ring-num']).
rel_fluent('cs-can-perform'(A,B),[A-mps,B-'cs-operation']).
rel_fluent('cs-prepared-for'(A,B),[A-mps,B-'cs-operation']).
rel_fluent('cs-buffered'(A,B),[A-mps,B-'cap-color']).
rel_fluent('cs-free'(A),[A-mps]).
rel_fluent('rs-prepared-color'(A,B),[A-mps,B-'product-ring-color']).
rel_fluent('rs-filled-with'(A,B),[A-mps,B-'ring-num']).
rel_fluent('ds-prepared-gate'(A,B),[A-mps,B-'ds-gate']).
rel_fluent('rs-sub'(A,B,C),[A-'ring-num',B-'ring-num',C-'ring-num']).
rel_fluent('rs-inc'(A,B),[A-'ring-num',B-'ring-num']).
rel_fluent('order-complexity'(A,B),[A-order,B-'order-complexity-value']).
rel_fluent('order-base-color'(A,B),[A-order,B-'product-base-color']).
rel_fluent('order-ring1-color'(A,B),[A-order,B-'product-ring-color']).
rel_fluent('order-ring2-color'(A,B),[A-order,B-'product-ring-color']).
rel_fluent('order-ring3-color'(A,B),[A-order,B-'product-ring-color']).
rel_fluent('order-cap-color'(A,B),[A-order,B-'product-cap-color']).
rel_fluent('order-fulfilled'(A),[A-order]).
rel_fluent('order-gate'(A,B),[A-order,B-'ds-gate']).
rel_fluent('wp-unused'(A),[A-workpiece]).
rel_fluent('wp-usable'(A),[A-workpiece]).
rel_fluent('wp-at'(A,B,C),[A-workpiece,B-mps,C-'mps-side']).
rel_fluent('wp-base-color'(A,B),[A-workpiece,B-'base-color']).
rel_fluent('wp-ring1-color'(A,B),[A-workpiece,B-'ring-color']).
rel_fluent('wp-ring2-color'(A,B),[A-workpiece,B-'ring-color']).
rel_fluent('wp-ring3-color'(A,B),[A-workpiece,B-'ring-color']).
rel_fluent('wp-cap-color'(A,B),[A-workpiece,B-'cap-color']).
rel_fluent('wp-on-shelf'(A,B,C),[A-workpiece,B-mps,C-'shelf-spot']).
cwa(at(A,B,C)).
cwa(holding(A,B)).
cwa('can-hold'(A)).
cwa('entered-field'(A)).
cwa('location-free'(A,B)).
cwa('robot-waiting'(A)).
cwa('mps-type'(A,B)).
cwa('mps-state'(A,B)).
cwa('bs-prepared-color'(A,B)).
cwa('bs-prepared-side'(A,B)).
cwa('rs-ring-spec'(A,B,C)).
cwa('cs-can-perform'(A,B)).
cwa('cs-prepared-for'(A,B)).
cwa('cs-buffered'(A,B)).
cwa('cs-free'(A)).
cwa('rs-prepared-color'(A,B)).
cwa('rs-filled-with'(A,B)).
cwa('ds-prepared-gate'(A,B)).
cwa('rs-sub'(A,B,C)).
cwa('rs-inc'(A,B)).
cwa('order-complexity'(A,B)).
cwa('order-base-color'(A,B)).
cwa('order-ring1-color'(A,B)).
cwa('order-ring2-color'(A,B)).
cwa('order-ring3-color'(A,B)).
cwa('order-cap-color'(A,B)).
cwa('order-fulfilled'(A)).
cwa('order-gate'(A,B)).
cwa('wp-unused'(A)).
cwa('wp-usable'(A)).
cwa('wp-at'(A,B,C)).
cwa('wp-base-color'(A,B)).
cwa('wp-ring1-color'(A,B)).
cwa('wp-ring2-color'(A,B)).
cwa('wp-ring3-color'(A,B)).
cwa('wp-cap-color'(A,B)).
cwa('wp-on-shelf'(A,B,C)).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

fun_fluent('path-length'(A,B,C,D),number,[A-location,B-'mps-side',C-location,D-'mps-side']).
fun_fluent('order-delivery-begin'(A),number,[A-order]).
fun_fluent('order-delivery-end'(A),number,[A-order]).
cwa('path-length'(A,B,C,D)=E).
cwa('order-delivery-begin'(A)=B).
cwa('order-delivery-end'(A)=B).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Constraints
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Structures (Actions)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

poss('prepare-bs'(A,B,C),[A-mps,B-'mps-side',C-'product-base-color'],'mps-type'(A,'#bs')*'mps-state'(A,'#idle')).
causes_false('prepare-bs'(A,B,C),'mps-state'(A,'#idle'),true).
causes_true('prepare-bs'(A,B,C),'mps-state'(A,'#processing'),true).
causes_true('prepare-bs'(A,B,C),'bs-prepared-color'(A,C),true).
causes_true('prepare-bs'(A,B,C),'bs-prepared-side'(A,B),true).
poss('prepare-ds'(A,B,C),[A-robot,B-mps,C-'ds-gate'],at(A,B,'#input')*('mps-type'(B,'#ds')*'mps-state'(B,'#idle'))).
causes_false('prepare-ds'(A,B,C),'mps-state'(B,'#idle'),true).
causes_true('prepare-ds'(A,B,C),'mps-state'(B,'#prepared'),true).
causes_true('prepare-ds'(A,B,C),'ds-prepared-gate'(B,C),true).
poss('prepare-cs'(A,B,C),[A-robot,B-mps,C-'cs-operation'],at(A,B,'#input')*('mps-type'(B,'#cs')*('mps-state'(B,'#idle')*'cs-can-perform'(B,C)))).
causes_false('prepare-cs'(A,B,C),'mps-state'(B,'#idle'),true).
causes_true('prepare-cs'(A,B,C),'mps-state'(B,'#prepared'),true).
causes_false('prepare-cs'(A,B,C),'cs-can-perform'(B,C),true).
causes_true('prepare-cs'(A,B,C),'cs-prepared-for'(B,C),true).
poss('bs-dispense'(A,B,C,D),[A-mps,B-'mps-side',C-workpiece,D-'product-base-color'],'mps-type'(A,'#bs')*('mps-state'(A,'#processing')*('bs-prepared-color'(A,D)*('bs-prepared-side'(A,B)*('wp-base-color'(C,'#base_none')*'wp-unused'(C)))))).
causes_true('bs-dispense'(A,B,C,D),'wp-at'(C,A,B),true).
causes_false('bs-dispense'(A,B,C,D),'bs-prepared-color'(A,D),true).
causes_false('bs-dispense'(A,B,C,D),'bs-prepared-side'(A,B),true).
causes_false('bs-dispense'(A,B,C,D),'wp-base-color'(C,'#base_none'),true).
causes_true('bs-dispense'(A,B,C,D),'wp-base-color'(C,D),true).
causes_false('bs-dispense'(A,B,C,D),'wp-unused'(C),true).
causes_true('bs-dispense'(A,B,C,D),'wp-usable'(C),true).
causes_false('bs-dispense'(A,B,C,D),'mps-state'(A,'#processing'),true).
causes_true('bs-dispense'(A,B,C,D),'mps-state'(A,'#ready-at-output'),true).
poss(start('cs-mount-cap',A,B,C),[A-mps,B-workpiece,C-'cap-color'],'mps-type'(A,'#cs')*('mps-state'(A,'#processing')*('cs-buffered'(A,C)*('cs-prepared-for'(A,'#cs_mount')*('wp-usable'(B)*('wp-at'(B,A,'#input')*'wp-cap-color'(B,'#cap_none'))))))).
causes_false(start('cs-mount-cap',A,B,C),'mps-state'(A,'#processing'),true).
causes_false(start('cs-mount-cap',A,B,C),'wp-at'(B,A,'#input'),true).
poss(end('cs-mount-cap',A,B,C),[A-mps,B-workpiece,C-'cap-color'],true).
causes_true(end('cs-mount-cap',A,B,C),'mps-state'(A,'#ready-at-output'),true).
causes_true(end('cs-mount-cap',A,B,C),'wp-at'(B,A,'#output'),true).
causes_false(end('cs-mount-cap',A,B,C),'wp-cap-color'(B,'#cap_none'),true).
causes_true(end('cs-mount-cap',A,B,C),'wp-cap-color'(B,C),true).
causes_true(end('cs-mount-cap',A,B,C),'cs-can-perform'(A,'#cs_retrieve'),true).
poss(start('cs-retrieve-cap',A,B,C),[A-mps,B-'cap-carrier',C-'cap-color'],'mps-type'(A,'#cs')*('mps-state'(A,'#processing')*('cs-prepared-for'(A,'#cs_retrieve')*('wp-at'(B,A,'#input')*'wp-cap-color'(B,C))))).
causes_false(start('cs-retrieve-cap',A,B,C),'mps-state'(A,'#processing'),true).
causes_false(start('cs-retrieve-cap',A,B,C),'wp-at'(B,A,'#input'),true).
causes_false(start('cs-retrieve-cap',A,B,C),'wp-cap-color'(B,C),true).
poss(end('cs-retrieve-cap',A,B,C),[A-mps,B-'cap-carrier',C-'cap-color'],true).
causes_true(end('cs-retrieve-cap',A,B,C),'mps-state'(A,'#ready-at-output'),true).
causes_true(end('cs-retrieve-cap',A,B,C),'wp-at'(B,A,'#output'),true).
causes_true(end('cs-retrieve-cap',A,B,C),'wp-cap-color'(B,'#cap_none'),true).
causes_true(end('cs-retrieve-cap',A,B,C),'cs-buffered'(A,C),true).
causes_true(end('cs-retrieve-cap',A,B,C),'cs-can-perform'(A,'#cs_mount'),true).
poss('prepare-rs'(A,B,C,D,E,F),[A-robot,B-mps,C-'product-ring-color',D-'ring-num',E-'ring-num',F-'ring-num'],at(A,B,'#input')*('mps-type'(B,'#rs')*('mps-state'(B,'#idle')*('rs-ring-spec'(B,C,F)*('rs-filled-with'(B,D)*'rs-sub'(D,F,E)))))).
causes_false('prepare-rs'(A,B,C,D,E,F),'mps-state'(B,'#idle'),true).
causes_true('prepare-rs'(A,B,C,D,E,F),'mps-state'(B,'#prepared'),true).
causes_true('prepare-rs'(A,B,C,D,E,F),'rs-prepared-color'(B,C),true).
poss(start('rs-mount-ring1',A,B,C,D,E,F),[A-mps,B-workpiece,C-'product-ring-color',D-'ring-num',E-'ring-num',F-'ring-num'],'mps-type'(A,'#rs')*('mps-state'(A,'#processing')*('wp-at'(B,A,'#input')*('wp-usable'(B)*('wp-ring1-color'(B,'#ring_none')*('wp-cap-color'(B,'#cap_none')*('rs-prepared-color'(A,C)*('rs-ring-spec'(A,C,F)*('rs-filled-with'(A,D)*'rs-sub'(D,F,E)))))))))).
causes_false(start('rs-mount-ring1',A,B,C,D,E,F),'wp-at'(B,A,'#input'),true).
causes_false(start('rs-mount-ring1',A,B,C,D,E,F),'rs-filled-with'(A,D),true).
poss(end('rs-mount-ring1',A,B,C,D,E,F),[A-mps,B-workpiece,C-'product-ring-color',D-'ring-num',E-'ring-num',F-'ring-num'],true).
causes_false(end('rs-mount-ring1',A,B,C,D,E,F),'mps-state'(A,'#processing'),true).
causes_true(end('rs-mount-ring1',A,B,C,D,E,F),'mps-state'(A,'#ready-at-output'),true).
causes_false(end('rs-mount-ring1',A,B,C,D,E,F),'rs-prepared-color'(A,C),true).
causes_true(end('rs-mount-ring1',A,B,C,D,E,F),'wp-at'(B,A,'#output'),true).
causes_false(end('rs-mount-ring1',A,B,C,D,E,F),'wp-ring1-color'(B,'#ring_none'),true).
causes_true(end('rs-mount-ring1',A,B,C,D,E,F),'wp-ring1-color'(B,C),true).
causes_true(end('rs-mount-ring1',A,B,C,D,E,F),'rs-filled-with'(A,E),true).
poss(start('rs-mount-ring2',A,B,C,D,E,F,G),[A-mps,B-workpiece,C-'product-ring-color',D-'product-ring-color',E-'ring-num',F-'ring-num',G-'ring-num'],'mps-type'(A,'#rs')*('mps-state'(A,'#processing')*('wp-at'(B,A,'#input')*('wp-usable'(B)*('wp-ring1-color'(B,D)*('wp-ring2-color'(B,'#ring_none')*('wp-cap-color'(B,'#cap_none')*('rs-prepared-color'(A,C)*('rs-ring-spec'(A,C,G)*('rs-filled-with'(A,E)*'rs-sub'(E,G,F))))))))))).
causes_false(start('rs-mount-ring2',A,B,C,D,E,F,G),'wp-at'(B,A,'#input'),true).
causes_false(start('rs-mount-ring2',A,B,C,D,E,F,G),'rs-filled-with'(A,E),true).
poss(end('rs-mount-ring2',A,B,C,D,E,F,G),[A-mps,B-workpiece,C-'product-ring-color',D-'product-ring-color',E-'ring-num',F-'ring-num',G-'ring-num'],true).
causes_false(end('rs-mount-ring2',A,B,C,D,E,F,G),'mps-state'(A,'#processing'),true).
causes_true(end('rs-mount-ring2',A,B,C,D,E,F,G),'mps-state'(A,'#ready-at-output'),true).
causes_false(end('rs-mount-ring2',A,B,C,D,E,F,G),'rs-prepared-color'(A,C),true).
causes_true(end('rs-mount-ring2',A,B,C,D,E,F,G),'wp-at'(B,A,'#output'),true).
causes_false(end('rs-mount-ring2',A,B,C,D,E,F,G),'wp-ring2-color'(B,'#ring_none'),true).
causes_true(end('rs-mount-ring2',A,B,C,D,E,F,G),'wp-ring2-color'(B,C),true).
causes_true(end('rs-mount-ring2',A,B,C,D,E,F,G),'rs-filled-with'(A,F),true).
poss(start('rs-mount-ring3',A,B,C,D,E,F,G,H),[A-mps,B-workpiece,C-'product-ring-color',D-'product-ring-color',E-'product-ring-color',F-'ring-num',G-'ring-num',H-'ring-num'],'mps-type'(A,'#rs')*('mps-state'(A,'#processing')*('wp-at'(B,A,'#input')*('wp-usable'(B)*('wp-ring1-color'(B,D)*('wp-ring2-color'(B,E)*('wp-ring3-color'(B,'#ring_none')*('wp-cap-color'(B,'#cap_none')*('rs-prepared-color'(A,C)*('rs-ring-spec'(A,C,H)*('rs-filled-with'(A,F)*'rs-sub'(F,H,G)))))))))))).
causes_false(start('rs-mount-ring3',A,B,C,D,E,F,G,H),'wp-at'(B,A,'#input'),true).
causes_false(start('rs-mount-ring3',A,B,C,D,E,F,G,H),'rs-filled-with'(A,F),true).
poss(end('rs-mount-ring3',A,B,C,D,E,F,G,H),[A-mps,B-workpiece,C-'product-ring-color',D-'product-ring-color',E-'product-ring-color',F-'ring-num',G-'ring-num',H-'ring-num'],true).
causes_false(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'mps-state'(A,'#processing'),true).
causes_true(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'mps-state'(A,'#ready-at-output'),true).
causes_false(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'rs-prepared-color'(A,C),true).
causes_true(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'wp-at'(B,A,'#output'),true).
causes_false(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'wp-ring3-color'(B,'#ring_none'),true).
causes_true(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'wp-ring3-color'(B,C),true).
causes_true(end('rs-mount-ring3',A,B,C,D,E,F,G,H),'rs-filled-with'(A,G),true).
poss(start('move-wp-put-at-input',A,B,C,D),[A-robot,B-location,C-'mps-side',D-mps],'entered-field'(A)*(at(A,B,C)*('location-free'(D,'#input')*'mps-state'(D,'#idle')))).
causes_false(start('move-wp-put-at-input',A,B,C,D),at(A,B,C),true).
causes_true(start('move-wp-put-at-input',A,B,C,D),'location-free'(B,C),true).
causes_false(start('move-wp-put-at-input',A,B,C,D),'location-free'(D,'#input'),true).
poss(end('move-wp-put-at-input',A,B,C,D),[A-robot,B-location,C-'mps-side',D-mps],true).
causes_true(end('move-wp-put-at-input',A,B,C,D),at(A,D,'#input'),true).
poss(start('move-wp-get',A,B,C,D,E),[A-robot,B-location,C-'mps-side',D-mps,E-'mps-side'],'entered-field'(A)*(at(A,B,C)*('location-free'(D,E)*('mps-state'(D,'#ready-at-output')*'can-hold'(A))))).
causes_false(start('move-wp-get',A,B,C,D,E),at(A,B,C),true).
causes_true(start('move-wp-get',A,B,C,D,E),'location-free'(B,C),true).
causes_false(start('move-wp-get',A,B,C,D,E),'location-free'(D,E),true).
poss(end('move-wp-get',A,B,C,D,E),[A-robot,B-location,C-'mps-side',D-mps,E-'mps-side'],true).
causes_true(end('move-wp-get',A,B,C,D,E),at(A,D,E),true).
poss(start('enter-field',A,B),[A-robot,B-'team-color'],'location-free'('#start','#input')*'robot-waiting'(A)).
causes_false(start('enter-field',A,B),'location-free'('#start','#input'),true).
poss(end('enter-field',A,B),[A-robot,B-'team-color'],true).
causes_true(end('enter-field',A,B),'entered-field'(A),true).
causes_true(end('enter-field',A,B),at(A,'#start','#input'),true).
causes_false(end('enter-field',A,B),'robot-waiting'(A),true).
causes_true(end('enter-field',A,B),'can-hold'(A),true).
poss('wp-discard'(A,B),[A-robot,B-'cap-carrier'],holding(A,B)).
causes_false('wp-discard'(A,B),holding(A,B),true).
causes_false('wp-discard'(A,B),'wp-usable'(B),true).
causes_true('wp-discard'(A,B),'can-hold'(A),true).
poss(start('wp-get-shelf',A,B,C,D),[A-robot,B-'cap-carrier',C-mps,D-'shelf-spot'],at(A,C,'#input')*('wp-on-shelf'(B,C,D)*'can-hold'(A))).
causes_false(start('wp-get-shelf',A,B,C,D),'can-hold'(A),true).
causes_false(start('wp-get-shelf',A,B,C,D),'wp-on-shelf'(B,C,D),true).
poss(end('wp-get-shelf',A,B,C,D),[A-robot,B-'cap-carrier',C-mps,D-'shelf-spot'],true).
causes_true(end('wp-get-shelf',A,B,C,D),holding(A,B),true).
causes_true(end('wp-get-shelf',A,B,C,D),'wp-usable'(B),true).
poss(start('wp-get',A,B,C,D),[A-robot,B-workpiece,C-mps,D-'mps-side'],at(A,C,D)*('can-hold'(A)*('wp-at'(B,C,D)*('mps-state'(C,'#ready-at-output')*'wp-usable'(B))))).
causes_false(start('wp-get',A,B,C,D),'can-hold'(A),true).
causes_false(start('wp-get',A,B,C,D),'mps-state'(C,'#ready-at-output'),true).
poss(end('wp-get',A,B,C,D),[A-robot,B-workpiece,C-mps,D-'mps-side'],true).
causes_false(end('wp-get',A,B,C,D),'wp-at'(B,C,D),true).
causes_true(end('wp-get',A,B,C,D),holding(A,B),true).
causes_true(end('wp-get',A,B,C,D),'mps-state'(C,'#idle'),true).
poss(start('wp-put',A,B,C),[A-robot,B-workpiece,C-mps],at(A,C,'#input')*('mps-state'(C,'#prepared')*('wp-usable'(B)*holding(A,B)))).
causes_false(start('wp-put',A,B,C),holding(A,B),true).
causes_false(start('wp-put',A,B,C),'mps-state'(C,'#prepared'),true).
poss(end('wp-put',A,B,C),[A-robot,B-workpiece,C-mps],true).
causes_true(end('wp-put',A,B,C),'wp-at'(B,C,'#input'),true).
causes_true(end('wp-put',A,B,C),'can-hold'(A),true).
causes_true(end('wp-put',A,B,C),'mps-state'(C,'#processing'),true).
poss(start('wp-put-slide-cc',A,B,C,D,E),[A-robot,B-'cap-carrier',C-mps,D-'ring-num',E-'ring-num'],'mps-type'(C,'#rs')*(at(A,C,'#input')*('wp-usable'(B)*(holding(A,B)*('rs-filled-with'(C,D)*'rs-inc'(D,E)))))).
causes_false(start('wp-put-slide-cc',A,B,C,D,E),holding(A,B),true).
poss(end('wp-put-slide-cc',A,B,C,D,E),[A-robot,B-'cap-carrier',C-mps,D-'ring-num',E-'ring-num'],true).
causes_false(end('wp-put-slide-cc',A,B,C,D,E),'wp-usable'(B),true).
causes_true(end('wp-put-slide-cc',A,B,C,D,E),'can-hold'(A),true).
causes_false(end('wp-put-slide-cc',A,B,C,D,E),'rs-filled-with'(C,D),true).
causes_true(end('wp-put-slide-cc',A,B,C,D,E),'rs-filled-with'(C,E),true).
poss('fulfill-order-c0'(A,B,C,D,E,F),[A-order,B-workpiece,C-mps,D-'ds-gate',E-'product-base-color',F-'product-cap-color'],'wp-at'(B,C,'#input')*('wp-usable'(B)*('mps-type'(C,'#ds')*('mps-state'(C,'#processing')*('ds-prepared-gate'(C,D)*('order-complexity'(A,'#c0')*('order-gate'(A,D)*('order-base-color'(A,E)*('wp-base-color'(B,E)*('order-cap-color'(A,F)*('wp-cap-color'(B,F)*('wp-ring1-color'(B,'#ring_none')*('wp-ring2-color'(B,'#ring_none')*'wp-ring3-color'(B,'#ring_none')))))))))))))).
causes_true('fulfill-order-c0'(A,B,C,D,E,F),'order-fulfilled'(A),true).
causes_false('fulfill-order-c0'(A,B,C,D,E,F),'wp-at'(B,C,'#input'),true).
causes_false('fulfill-order-c0'(A,B,C,D,E,F),'ds-prepared-gate'(C,D),true).
causes_false('fulfill-order-c0'(A,B,C,D,E,F),'wp-base-color'(B,E),true).
causes_false('fulfill-order-c0'(A,B,C,D,E,F),'wp-cap-color'(B,F),true).
poss('fulfill-order-c1'(A,B,C,D,E,F,G),[A-order,B-workpiece,C-mps,D-'ds-gate',E-'product-base-color',F-'product-cap-color',G-'product-ring-color'],'wp-at'(B,C,'#input')*('wp-usable'(B)*('mps-type'(C,'#ds')*('mps-state'(C,'#processing')*('ds-prepared-gate'(C,D)*('order-complexity'(A,'#c1')*('order-gate'(A,D)*('order-base-color'(A,E)*('wp-base-color'(B,E)*('order-ring1-color'(A,G)*('wp-ring1-color'(B,G)*('order-cap-color'(A,F)*'wp-cap-color'(B,F))))))))))))).
causes_true('fulfill-order-c1'(A,B,C,D,E,F,G),'order-fulfilled'(A),true).
causes_false('fulfill-order-c1'(A,B,C,D,E,F,G),'wp-at'(B,C,'#input'),true).
causes_false('fulfill-order-c1'(A,B,C,D,E,F,G),'ds-prepared-gate'(C,D),true).
causes_false('fulfill-order-c1'(A,B,C,D,E,F,G),'wp-base-color'(B,E),true).
causes_false('fulfill-order-c1'(A,B,C,D,E,F,G),'wp-cap-color'(B,F),true).
poss('fulfill-order-c2'(A,B,C,D,E,F,G,H),[A-order,B-workpiece,C-mps,D-'ds-gate',E-'product-base-color',F-'product-cap-color',G-'product-ring-color',H-'product-ring-color'],'wp-at'(B,C,'#input')*('wp-usable'(B)*('mps-type'(C,'#ds')*('mps-state'(C,'#processing')*('ds-prepared-gate'(C,D)*('order-complexity'(A,'#c2')*('order-gate'(A,D)*('order-base-color'(A,E)*('wp-base-color'(B,E)*('order-ring1-color'(A,G)*('wp-ring1-color'(B,G)*('order-ring2-color'(A,H)*('wp-ring2-color'(B,H)*('wp-ring3-color'(B,'#ring_none')*('order-cap-color'(A,F)*'wp-cap-color'(B,F)))))))))))))))).
causes_true('fulfill-order-c2'(A,B,C,D,E,F,G,H),'order-fulfilled'(A),true).
causes_false('fulfill-order-c2'(A,B,C,D,E,F,G,H),'wp-at'(B,C,'#input'),true).
causes_false('fulfill-order-c2'(A,B,C,D,E,F,G,H),'ds-prepared-gate'(C,D),true).
causes_false('fulfill-order-c2'(A,B,C,D,E,F,G,H),'wp-base-color'(B,E),true).
causes_false('fulfill-order-c2'(A,B,C,D,E,F,G,H),'wp-cap-color'(B,F),true).
poss('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),[A-order,B-workpiece,C-mps,D-'ds-gate',E-'product-base-color',F-'product-cap-color',G-'product-ring-color',H-'product-ring-color',I-'product-ring-color'],'wp-at'(B,C,'#input')*('wp-usable'(B)*('mps-type'(C,'#ds')*('mps-state'(C,'#processing')*('ds-prepared-gate'(C,D)*('order-complexity'(A,'#c3')*('order-gate'(A,D)*('order-base-color'(A,E)*('wp-base-color'(B,E)*('order-ring1-color'(A,G)*('wp-ring1-color'(B,G)*('order-ring2-color'(A,H)*('wp-ring2-color'(B,H)*('order-ring3-color'(A,I)*('wp-ring3-color'(B,I)*('order-cap-color'(A,F)*'wp-cap-color'(B,F))))))))))))))))).
causes_true('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),'order-fulfilled'(A),true).
causes_false('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),'wp-at'(B,C,'#input'),true).
causes_false('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),'ds-prepared-gate'(C,D),true).
causes_false('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),'wp-base-color'(B,E),true).
causes_false('fulfill-order-c3'(A,B,C,D,E,F,G,H,I),'wp-cap-color'(B,F),true).


