/* called by: entrance ctrl of the object 'track'3 \' q/ B0 b- j: U
*/" d% {* ?0 P1 B6 r
is: M: C( F7 |2 E# M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" S1 d+ Q' O0 n& L. }& F. k' pdo
( F1 G3 l: @$ h! l( J+ ^ C2 f Lan := rootfolder.Internal.Tools.AOLlanguage;
" V, T9 F; Z6 K8 {1 H/ S# i if current = @.Destination -- else return Z; ?4 `$ [4 Y. |1 c3 y
then; r* a/ v9 x# q/ [% c' c3 c
@.Destination := void;" z0 h, p3 [3 M9 E9 j8 ^% V
if @.occupied then N x% y( u! E/ t* o `) G
part := @.cont;
0 P0 S% z# L, k* Z @.transpOrder := void;( f N, |" D1 `! l2 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 q3 |4 f; t3 H1 d" X9 s# | @,root.eventcontroller.simTime);$ e5 |; `6 T8 M5 z) ?$ {* s
@.HasOrder := false;, u# I Q! u2 k$ n1 ]; _
@.DrivingHome := true;
8 d( d! T9 a& q+ q5 T4 ?+ `( M6 j3 F rgManager.tryToStartTransOrder;, ^" p$ ]. r2 {7 V- X
if @.Destination = void- l/ S/ k0 q) \) P# _
then -- no transport order for vehicle @% {" _. D; |8 s: K$ }) v, R
@.Destination :=
- \' f" {' J& |2 v" J* j rgManager.nearestFreeStation(@,track.~);
h/ c) @& v/ y: }3 ?4 {. z( e newDirection(@);
0 T" i/ u, s6 O9 h if @.Destination /= void then$ u/ p% [3 U1 r, g' C
@.Destination.NumReservation :=+ B8 b( A6 T# {
@.Destination.NumReservation + 1;
6 d( H' S2 ]4 K) @4 s$ t end;0 ~+ w: @. h9 [# ^( U( j" h
@.CurrIcon := "drivingHome";
( ]) E; i/ x0 h+ v* ]) } @.DrivingHome := true;
) ]% g- @6 s; k3 [" l' I end;
. Z+ i$ r7 \; Y0 @3 N z: _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 e' }( x& x& K) [ part := @.transpOrder;; H6 ]# t" K g' S3 S9 y
part.move(@);-- load part
& H/ N5 }0 d( H; u, H$ j8 k @.CurrIcon := "load";2 J0 g3 k* Z% C$ O# ?
GlobalDistObj := part.globDestination;; |+ F5 r' G! a) S! T! v
assignLObj := rgmanager.rgAssignL;9 w/ i6 t$ P3 Q; d' u
row := assignLObj.getRowNo(GlobalDistObj);3 S4 n6 `. J: R& D' N, T& w& O
if Row = -1 then -- since 70
0 r6 ]' X9 k$ o if lan=1 then' t+ \4 j, F0 i, U* m& P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& ]8 P% j( K7 p( Z
to_str("in der Andockstation: \"",?.~.name,"\"")); j4 w8 ?& m1 b/ ?8 u. i
else
! i: J6 l& H6 T3 |8 _! y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- l4 y6 d+ F/ _1 g$ C to_str("in docking station: \"",?.~.name,"\""));
u3 T8 Z- @% h end;6 I! z' D0 L+ d+ v/ f5 c2 P
else
: Y2 _+ F% b& z% G/ ^ @.Destination := assignLObj[1,row];0 p/ r- ~! |# u9 o6 K( t0 c) i
end;
; C4 J3 y$ ]7 V$ i0 ^ newDirection(@);
+ [3 c2 W. r" w" ^0 f% V @.HasOrder := true;/ ]* _! f9 f- _
end; N3 w* }! B/ ~ ~, q. y
end;1 ^5 C$ X/ l6 d: _
end; -- of the method
, w3 ^9 b$ {# U& O2 K) L |