/* called by: entrance ctrl of the object 'track'
( ?0 d& L' }- E7 L*/8 t1 W5 o2 C% y' A4 W" H- P
is
! C- }8 @5 ^9 j: [. E5 I% u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! n* Y: F/ V) x& g% @* D: xdo
4 w8 q- v: j: B* v4 C. O Lan := rootfolder.Internal.Tools.AOLlanguage;
4 w, _8 \; r, \8 w0 L if current = @.Destination -- else return
) ^9 f. S3 ^9 f then) z# h1 y3 ]+ C1 L- b
@.Destination := void;
4 A" s1 g' u$ j+ h" S; e2 I if @.occupied then
/ m- T# U! K; b2 a; W5 O part := @.cont;. W C8 s: N3 h. e) h$ N' c
@.transpOrder := void;
& ?% i2 U, k% Q r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
b; g& R) |6 _2 p2 n; ]' d @,root.eventcontroller.simTime);3 B1 }; ^9 Q/ A5 ~8 A, g
@.HasOrder := false;+ y3 y9 S8 `6 f6 |
@.DrivingHome := true;: I6 z- M# v: n
rgManager.tryToStartTransOrder;( i" ^! R3 c# r! T' \; o' ^& _0 Y
if @.Destination = void
( r' u" g: Y8 u9 A- N then -- no transport order for vehicle @
' Z6 H7 I' ]2 f- K5 j/ [ @.Destination :=) _& Y4 g- I: L
rgManager.nearestFreeStation(@,track.~);
9 E4 D; C# L; B# w5 E/ [$ U- L& t newDirection(@);
, \0 B% ?1 L& a9 H- h4 s4 X if @.Destination /= void then
% `0 l7 U5 t8 W# \/ E5 u# t @.Destination.NumReservation :=
. e* p' V- u* J9 F$ u @.Destination.NumReservation + 1;
" t' A5 I# t" S( m R2 ~) C& M" c end;0 Q7 u5 j3 e/ V! |7 m
@.CurrIcon := "drivingHome";& z. z, J" N& w; G1 }6 s; x
@.DrivingHome := true;3 X* ]5 \4 A f0 B; w' v$ Z% z7 X K
end;2 t, O" c4 G# O# }9 ]! i1 p$ G3 `- _2 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& r2 `% a: B' C& A, Y; f" p5 \! I- _
part := @.transpOrder;
# N; m$ j& J' c+ r2 P. q2 `+ D5 u part.move(@);-- load part7 b- }$ a3 G& H6 O, ]( n" s
@.CurrIcon := "load";1 ?4 I; h7 f% X) E+ f1 Y- D
GlobalDistObj := part.globDestination;, A8 g$ V0 G4 T1 ~' h5 G( J
assignLObj := rgmanager.rgAssignL;$ O( P! J8 z" w% Y( Z
row := assignLObj.getRowNo(GlobalDistObj);. y0 }3 [% P. T
if Row = -1 then -- since 70
1 R& o3 c+ Y) _2 K# I if lan=1 then* _+ ?3 @8 L4 c# Z, R& n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* T! e9 l: _: E' `- K* s
to_str("in der Andockstation: \"",?.~.name,"\""));8 Z. J" ^2 U$ n) O7 p4 d! C$ o! M
else
! E( \) N2 ^, N! J" F+ X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' j% g! Y! a# }
to_str("in docking station: \"",?.~.name,"\"")); 4 p" L; _6 j* R/ ^* l) `
end;
0 I& s. e- |7 I$ R/ b else
1 F1 U. Y! _/ K6 r$ j# \& R @.Destination := assignLObj[1,row];
# r$ J2 Y9 H x* ^2 W& \1 a* X" D end; - }* v$ `* {1 ^0 S
newDirection(@);
9 ^4 N- Z# b$ C% _, F @.HasOrder := true;( c. x2 s- m1 E. W
end;9 `( I3 I- F" i& R% V
end;
F2 h# C( a% q g0 o( aend; -- of the method
( ?: @ Z) c: |, u1 O w9 z |