%%% %%% Authors: %%% Christian Schulte %%% %%% Copyright: %%% Christian Schulte, 2002 %%% %%% Last change: %%% $Date: 2002/11/18 15:37:25 $ by $Author: schulte $ %%% $Revision: 1.1 $ %%% %%% Implements the Lift Agents for Lab assignment 4. %%% \insert 'Insert.oz' \insert 'WaitTime.oz' \insert 'StopAt.oz' declare local fun {LiftProcess State Message} Stop = State.stop Now = State.floor in case Message of request(floor:I dir:D answer:A) then %% YOU FILL IN HERE [] stop(floor:I) then %% YOU FILL IN HERE [] arrived(floor:I action:A) then %% YOU FILL IN HERE end end in fun {NewLift N} %% Create lift number N at floor 1 and with %% empty stoplist {NewAgent LiftProcess state(floor:1 stop:nil)} end end