/* called by: entrance ctrl of the object 'track'
# `/ _8 n) p1 q7 |& d*/1 ]6 R9 \" p( u& X
is
4 t0 Y; W7 t. ^3 A3 l& f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ Z' n% S; \. @4 F5 Jdo# t) [. ~ B2 u# W. Q/ U9 `
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ b( L4 b5 D( k5 G4 U" C4 y" v# \ if current = @.Destination -- else return
3 N w: u+ C) A6 M then" d' t1 s: L$ Q$ c5 f3 P
@.Destination := void; x' x. P, z4 k x9 H0 H- U
if @.occupied then( z* {- A; Y% b7 G% {5 p- ]- E" r
part := @.cont;
4 G8 [7 Z) [ u5 P% A5 ^ @.transpOrder := void;/ n& Z0 m6 G$ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 I7 q! `9 R, O6 M% C- y @,root.eventcontroller.simTime);
( r% J5 a! h! R! { @.HasOrder := false;) @+ W5 Y" K1 Z7 C9 i
@.DrivingHome := true;) P- e: o$ S+ u! K B
rgManager.tryToStartTransOrder;
1 E5 t0 y# k" l( L0 v: F0 r if @.Destination = void
# ?- U2 N* s) h$ m then -- no transport order for vehicle @
" S8 e: L2 I7 V$ V) ]( d6 ?' Z( ] @.Destination :=1 a8 m7 a: l) p# `4 p; [
rgManager.nearestFreeStation(@,track.~);
# D5 X/ T3 d& F$ }/ x newDirection(@); 7 N* b: O* O7 c; B) J: \
if @.Destination /= void then
4 b& U6 i+ O) V; I1 X4 _( L @.Destination.NumReservation :=
# s+ P6 y" v% D# B* Y9 Q( V; x @.Destination.NumReservation + 1;
3 s: c; t V9 j8 d3 e5 v+ n& {8 L end;
7 ?* J7 H' s2 T: q @.CurrIcon := "drivingHome";) ? c7 D2 M7 O2 a4 k' m: |; k
@.DrivingHome := true;
% |; D& Y5 [4 a' Y end;
. h' J- G6 m. M& I8 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station( O$ x3 u$ J1 x9 T, k
part := @.transpOrder;
. Q, P, s- b, O O2 \ part.move(@);-- load part
! p, I& x& ]1 @ @.CurrIcon := "load";( p; c$ p# ~* i, ]
GlobalDistObj := part.globDestination;
) L2 M+ E( d* J1 q assignLObj := rgmanager.rgAssignL;
8 P7 N% r( Y5 r! F+ w) A row := assignLObj.getRowNo(GlobalDistObj);
$ |+ Q" E/ H H+ s& M, M if Row = -1 then -- since 70' U ~9 c! i( K- v3 U+ ^0 p
if lan=1 then
; {5 f! u% K: n" o5 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 c& u3 G: |6 n/ L* s5 w" p5 }
to_str("in der Andockstation: \"",?.~.name,"\""));
I- Q5 F# N. f- ? else
. y5 F: e- S$ R. d9 u4 g5 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& `+ c3 J& E/ Z) p @: D- y- f* m to_str("in docking station: \"",?.~.name,"\""));
: W9 \, V8 [: M X end;
( `0 z8 C* j5 |6 b else
! Q: m$ Z* U- @# l4 D- c @.Destination := assignLObj[1,row];: B5 f4 J; I! D4 R/ }+ c4 o
end; 9 b/ U8 f5 f5 U. r" ]. t3 x& O
newDirection(@);
& p7 F! t9 Q6 ] @.HasOrder := true;
5 }7 B" I- R+ R5 Q# m5 J end;
( ]/ n4 O; q4 e end;/ f; k% t, {; V1 R/ C6 ~9 Z. S
end; -- of the method
% l% A# P' K8 L6 R- a ~ |