/* called by: entrance ctrl of the object 'track'
3 `+ X1 T% y* l5 W) C- O*/* r9 y3 Z! j% ]* b
is
) O* @! N$ e: x( _& |! X part, GlobalDistObj, assignLObj:object;row,Lan:integer;( O6 [5 H; Q$ _2 d0 v6 B; c
do
$ ?$ p# V4 Z. l1 M Lan := rootfolder.Internal.Tools.AOLlanguage;$ B3 Z2 F8 f: m, t! D) A
if current = @.Destination -- else return
- g$ O; v3 F0 q" K then0 G) E* O7 _3 V& A1 y# ? G
@.Destination := void;
7 G" n) t8 N, u9 A3 n# p1 P( n if @.occupied then5 n4 b+ d4 @- e" s' W/ F0 c
part := @.cont;) k) B' F' X0 O' x! Z# D7 V
@.transpOrder := void;& P/ A$ K( m) f3 b2 v# c* ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 S4 P2 a9 [) g1 b/ w$ i# d
@,root.eventcontroller.simTime);9 m$ c. D9 j& U5 b1 d1 `
@.HasOrder := false;
, {4 ^0 L( U1 [" D3 u* P9 n @.DrivingHome := true;0 ^' b% o A1 Q% m5 ~9 g _
rgManager.tryToStartTransOrder;
. k* H3 O5 C) H) k& ^) G% ^# j if @.Destination = void
; T2 D H! M$ O8 j% y2 o9 [4 n then -- no transport order for vehicle @
+ J! ?) `! n1 s4 Y- j( d8 ` @.Destination :=
/ q* H+ l* i! w/ O v4 w! ` rgManager.nearestFreeStation(@,track.~);
3 z' q# \7 u8 ?/ M newDirection(@);
* o1 I3 D9 @ d7 k if @.Destination /= void then
& m: x `- z% W) F: r8 \ @.Destination.NumReservation :=
" G4 k( t: t1 F @.Destination.NumReservation + 1;' ?6 O) Q$ F0 G* G# `1 @; ?
end;
1 S- E. t. Y; Q; F9 j* P @.CurrIcon := "drivingHome";) H: C& k# ^2 i3 i# o5 o0 V
@.DrivingHome := true;
9 w; j3 t& b7 V2 z8 M+ E0 ?; L; F end;; L3 c+ X" q2 g, h9 R% r+ ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ g- S8 N7 j! c/ }: f) R+ p6 E
part := @.transpOrder;
5 d1 D& F0 t; ]0 h0 S! S( r part.move(@);-- load part
2 p- P2 Q9 w& L" B @.CurrIcon := "load";
5 [' H- ]' Z8 q7 Z GlobalDistObj := part.globDestination;
( @+ H. `* Z% `" i9 }1 H assignLObj := rgmanager.rgAssignL;9 D2 D) Y( K1 S2 O
row := assignLObj.getRowNo(GlobalDistObj);& Q6 d" Y3 G8 L, l1 B
if Row = -1 then -- since 70
1 d1 {- k8 q, @- W( d8 l! b if lan=1 then* m8 s! C, \. D+ Q7 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- _" B [ F& h
to_str("in der Andockstation: \"",?.~.name,"\""));9 Q$ ^& d! E% U" `( y
else" N- l$ b- _8 V( w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* X( H: ?0 v: H to_str("in docking station: \"",?.~.name,"\""));
. F: }- k3 {% [: s. b/ K. A# R+ U end;
6 h6 o4 { e& t! Z; ~' n) Z else! Z2 H7 E& t5 f* t' X* {& C
@.Destination := assignLObj[1,row];
- r7 R1 U) W4 `# T8 A( J end;
8 i! \- X7 y( S/ E newDirection(@);
2 B1 ~5 n4 X$ ], X' ] @.HasOrder := true;, q, G' l, F- w" {
end;/ {" Y" M) D5 w% @
end;! V4 ^, |( r0 b& Z* K8 a5 t
end; -- of the method
0 Z8 T5 Y# Z* I G( \6 @ |