/* called by: entrance ctrl of the object 'track'5 n. u' _; A8 i
*/8 z9 n( f0 y" ?1 h6 E
is
/ F: J1 i* y( K4 C% s+ Q j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ P1 k/ h6 F8 u! n- ?) }do& S4 s2 p( Y, [& X: E# i
Lan := rootfolder.Internal.Tools.AOLlanguage;" Z, s% \- A! d* V
if current = @.Destination -- else return
/ O/ \" ?/ `( w, p) d! N then- M Z$ t9 y4 Y1 g) M- B7 o
@.Destination := void;+ E- j" h9 J% ~* d. S
if @.occupied then
) ~! u' x8 j0 H# Q; A5 b6 G part := @.cont;7 K7 n9 e( N* Q: d7 V: `& C
@.transpOrder := void;
7 j- z* Y9 t" H0 C' ~8 Z* d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
i' e) J0 p8 M" g2 h" [ @,root.eventcontroller.simTime);
( f3 R. h- D" a5 o/ z# u @.HasOrder := false;
" ?( G( g+ d/ i) D1 h* i1 n6 \9 E @.DrivingHome := true;
, c5 l, L: q/ h* v6 b( w' @: f rgManager.tryToStartTransOrder;
8 X- I8 I6 A: P' t& n9 I if @.Destination = void
; V4 f) }2 L, j7 \, j) i1 \/ y then -- no transport order for vehicle @/ r; g$ I, u: }) W1 O
@.Destination :=1 d! q8 d9 c3 F" e
rgManager.nearestFreeStation(@,track.~);
3 O4 ?$ {. S T" \) { newDirection(@);
) \! w( ?, a/ N0 x; J9 a if @.Destination /= void then
7 y9 o# ^, ~- S) O @.Destination.NumReservation :=
6 e. a' B* R& ~3 M1 } @.Destination.NumReservation + 1;
, A' W* s% t4 q6 i$ t) L! J end;
5 M$ g5 x/ E5 T2 j4 t @.CurrIcon := "drivingHome";+ D' t: A1 U- |/ a4 E, c/ M# @
@.DrivingHome := true;2 P# `+ i- N2 Y& \: M1 }8 p$ I' F- Q( T
end;$ O& q l8 R/ |# d4 q% X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ J( u/ x$ i6 _4 R
part := @.transpOrder;
, i U" ~) [9 _+ ~, q) U( ~9 W0 v part.move(@);-- load part6 M: j) g4 s8 Y* W% V
@.CurrIcon := "load";
) ^2 o$ r% X" d- V- B0 L GlobalDistObj := part.globDestination;
) b+ l: s/ C! m: @( D: E assignLObj := rgmanager.rgAssignL;$ i- f `6 M8 m
row := assignLObj.getRowNo(GlobalDistObj);8 g5 W+ M" O' b S1 p+ m/ K5 x
if Row = -1 then -- since 70
4 C, r" C$ F T% Z) k if lan=1 then
! H! J9 ^: e% b5 N7 t3 l1 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, B4 E# s G4 `: a. x6 l
to_str("in der Andockstation: \"",?.~.name,"\""));, ~. q7 S0 ?' O
else7 Q) w1 R) d' e' d8 m7 \2 i4 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- A- ?; _$ \5 D; z0 Z to_str("in docking station: \"",?.~.name,"\""));
. z+ J0 V, r2 `# Q+ V% a- t end;
) _, `- Y% Z6 D9 z% T else
0 @7 o6 s- v m' \+ t) |9 U( ] @.Destination := assignLObj[1,row];
8 @" q( o+ X3 Y) R3 | end; - j" ?. W9 S. K8 D
newDirection(@);
* E) _) ` J) z5 A1 i @.HasOrder := true;
/ U! s" q5 v+ w9 z; @ end;" L: [+ E/ E1 _" V1 n0 E( z
end;
' t( _% s& |( Bend; -- of the method) }! f; I9 N M* C
|