/* called by: entrance ctrl of the object 'track'
- B2 U" b# Q5 N' H4 x/ b% t*/7 z9 T; F& ?* s
is
+ J* _7 i5 v/ G. c9 [3 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 a! W& W; \% y$ _9 M% g
do* M9 c1 J$ t% m' }1 T6 A% Y
Lan := rootfolder.Internal.Tools.AOLlanguage;; m2 A0 R) J2 s+ F+ ^& B$ X( n3 t! i) G
if current = @.Destination -- else return; Q: n, [0 o& u: q9 S8 H M7 x4 ?" X
then" N6 y" Q- n( X7 k" }: V
@.Destination := void;
" u' e% p+ |$ X0 ~* ?$ c$ t if @.occupied then. F! P( r; A: I. X
part := @.cont;
: X! y2 U0 t* k& Z$ F! n6 l+ Q% y# r @.transpOrder := void;
( v& Y" [- w( ?: B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* q$ S- i; G" { @,root.eventcontroller.simTime);
( V" m- W, z' M/ n( u @.HasOrder := false;
/ E6 J8 c% {0 _- C @.DrivingHome := true;
' W$ e- ^0 h8 t6 M rgManager.tryToStartTransOrder;" F2 _( r5 n% D$ q4 U
if @.Destination = void6 F( Q; W) a; y. X
then -- no transport order for vehicle @
' I- i4 `7 V5 H8 Y @.Destination :=
% I8 O; z$ B1 X* Y/ r0 K* q rgManager.nearestFreeStation(@,track.~);$ U3 \7 i$ p" `+ P
newDirection(@); 2 G2 w- X7 g% \* z4 H5 P( F
if @.Destination /= void then
) H( w" F, z+ ] @.Destination.NumReservation :=) ?, T5 O, n; v7 a
@.Destination.NumReservation + 1;# s: P# E5 @& L+ E
end;; N) j3 z3 p9 o; w o7 m
@.CurrIcon := "drivingHome"; ^. {1 V8 D0 y5 `
@.DrivingHome := true;- c! t* I% h2 \8 V
end;/ t' ~) `% d3 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, o" s! X" v: {9 r
part := @.transpOrder;6 j9 W/ |* K% L% z) c
part.move(@);-- load part
9 h+ `1 z- m) O2 ]- V @.CurrIcon := "load";. U* E$ j1 U" [( M* m
GlobalDistObj := part.globDestination;
7 T0 e% ?9 ]# x- d assignLObj := rgmanager.rgAssignL;
$ T; q2 z- W: G3 P9 m row := assignLObj.getRowNo(GlobalDistObj);' y; J X+ P; ~5 O7 X
if Row = -1 then -- since 70' Z4 z, @4 s0 d1 o# A- F
if lan=1 then* y. {- b8 T, _2 z8 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ o0 q3 ^, C0 ^2 \" z9 [ to_str("in der Andockstation: \"",?.~.name,"\""));$ _% g# m( u6 I% A
else7 t/ C3 D: ]: u, S# L7 Q6 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& Z* v$ s1 Y) C, q/ J1 y to_str("in docking station: \"",?.~.name,"\""));
9 _6 S3 p8 e" I0 P+ W' H; Z end;3 c! j* P7 [% U) |/ `
else
7 C' N6 Y2 U) @8 |6 s& v. ?. U/ W @.Destination := assignLObj[1,row];
# F) i/ v5 B$ u; Y( s0 ? end; : E% o2 D7 r, j) o; y# z
newDirection(@);# I! T5 Y* q- p; I) a( V
@.HasOrder := true;
4 J$ h1 K6 s" B end;
2 M, X$ `5 v$ f9 W end;
: V8 z- v5 Y$ S* @5 T5 i1 Uend; -- of the method
5 y$ F$ `; A5 g% z |