/* called by: entrance ctrl of the object 'track'0 r) m$ c( L9 {7 q* O+ j
*/: |/ V& X/ N$ X2 h1 F
is
: g3 J4 T8 d0 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 [9 w" @) [- h6 X" N* o$ e* J5 pdo7 W3 _4 R) n$ k* c/ r
Lan := rootfolder.Internal.Tools.AOLlanguage;8 O' t! l8 a' F* W/ C
if current = @.Destination -- else return
( ~7 t: E" o3 R2 k" ^( V$ u then
/ f- L! V, A+ T. V @.Destination := void;
% g c w) I7 G* h if @.occupied then
. `, `# X9 I" T. I( w8 N part := @.cont;
/ ?& O+ u+ ?# Z* k3 H8 O @.transpOrder := void;
, d$ c2 I) c$ @; }; w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) P" f1 T# H, l! ~8 j
@,root.eventcontroller.simTime);
/ n6 m3 z+ `4 \7 c4 E" U b+ B @.HasOrder := false;% m2 l' \5 G; {6 v3 p/ b, }+ ?
@.DrivingHome := true;
/ P% U" Z) d1 n' S; J% r rgManager.tryToStartTransOrder;" f/ q+ N/ o& m# G* V
if @.Destination = void
! ]3 E, D& ^+ H1 m! c9 e then -- no transport order for vehicle @# T# ~1 m1 r8 Q
@.Destination :=; r. ?9 u, W5 H4 B# ?
rgManager.nearestFreeStation(@,track.~);
' O- c% ^4 c3 S2 q" A0 l9 n" k# e newDirection(@); 1 E" H5 g7 W& L9 s; E5 E
if @.Destination /= void then
+ I3 E9 S8 f8 V% B% v @.Destination.NumReservation :=
; Y' L, X7 T2 F( P2 O; ~% z @.Destination.NumReservation + 1;
. h& x# ]6 m4 y! H end;7 \2 U* ^1 P [5 P$ S) M7 L
@.CurrIcon := "drivingHome";
: C I" p4 [, a# d/ `5 V5 m: v7 E @.DrivingHome := true;
" l4 h: E( d; a! @ [ end;& M3 ]% k6 f m: k z# o% p E5 Y9 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ?- [% `0 N4 Y part := @.transpOrder;
* o; ]5 I9 \" j {% \6 S, } r part.move(@);-- load part
" e, A& m8 G' P0 S! d& e @.CurrIcon := "load";
3 t/ d: h+ i8 i4 @# u$ [) r0 n+ | GlobalDistObj := part.globDestination;
5 ~6 f$ @" H- O9 g8 m; D% n% L: s2 s assignLObj := rgmanager.rgAssignL;
7 m3 |3 p3 H, {* { row := assignLObj.getRowNo(GlobalDistObj);
& F$ ^: E! D. G; n) V2 O if Row = -1 then -- since 70
9 o" v2 s- E D" z2 Y if lan=1 then1 I7 U: v0 t/ K( ?$ b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 n! H9 }( [# { e7 M" w
to_str("in der Andockstation: \"",?.~.name,"\""));
. q, v. Z1 {: K; U9 w+ r3 @$ G5 N else
: U7 [. C; y6 S/ w \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' e; R8 |& q" ~6 ]* x
to_str("in docking station: \"",?.~.name,"\""));
3 s0 s, H7 P4 l end;" E% d ^5 G7 i" f
else! m9 g1 r! @: v. t$ C/ i
@.Destination := assignLObj[1,row];
+ `. P. _6 B5 s! A/ T. L7 Q end;
8 Q+ U0 O- U3 `: q0 d8 I newDirection(@);% i' b; e. K- f' {7 _
@.HasOrder := true;1 x: U6 w, c/ k/ u
end;
9 A, K6 k4 R) |- d: ?( {6 j end;
' P) Z- u1 G" U- eend; -- of the method
% ?6 G6 [8 |. N- s$ U. Z |