%%% %%% Authors: %%% Christian Schulte %%% %%% Copyright: %%% Christian Schulte, 2002 %%% %%% Last change: %%% $Date: 2002/11/18 15:37:25 $ by $Author: schulte $ %%% $Revision: 1.1 $ %%% %%% Implements the Floor Agent for Lab assignment 4. %%% declare local proc {Select As B} %% B is the currently best lift %% As are the not yet checked lifts case As of nil then %% YOU FILL IN HERE [] A|Ar then if A.time < B.time then %% Inform that lift agent does not get the job... B.status = reject {Select Ar A} else %% YOU FILL IN HERE end end end fun {FloorProcess State Message} Floor = State.floor Lifts = State.lifts in case Message of press(Dir) then %% YOU FILL IN HERE end State end in fun {NewFloor N Lifts} %% Create floor agent at floor N {NewAgent Floorprocess state(floor:N lifts:Lifts)} end end