/* called by: entrance ctrl of the object 'track'
" X0 }) O l/ l) y*/% H* K9 r9 M( s' U5 ?( _+ ^
is
; T) }8 n) L8 K* | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 a- y( l4 Q0 _8 O3 q4 N' Ido
# \& s5 x$ B: H/ _0 D Lan := rootfolder.Internal.Tools.AOLlanguage;
/ \9 `9 W# }( P$ C- Y if current = @.Destination -- else return) ]( E {' w8 z
then/ @! G6 n- G1 l
@.Destination := void;- o" T1 D6 U$ p
if @.occupied then
7 O0 I0 }1 A b part := @.cont;
( Z9 m3 g! F- s/ W7 } @.transpOrder := void;$ e V# j6 `! @5 c- F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) z) I. @( x: B @,root.eventcontroller.simTime);
8 t+ _3 {' m" Q5 v) r* d @.HasOrder := false;
1 @* q& T* z: }7 f @.DrivingHome := true;
2 U/ X# S5 V6 J4 M rgManager.tryToStartTransOrder;
9 M: @% a! k0 p( A% r4 ? if @.Destination = void
' H# d! B, [9 B! C then -- no transport order for vehicle @
' @# m# M* Z9 [+ M0 O, x. \4 k @.Destination :=' t8 r3 @" V) v% X
rgManager.nearestFreeStation(@,track.~);
" L* M M0 B# n5 q' j! ~ newDirection(@); $ b2 ~+ I" @# ^
if @.Destination /= void then- a5 y( h" ^% ?' K
@.Destination.NumReservation :=0 `7 k: Z. u( S: S
@.Destination.NumReservation + 1;1 ~8 [- X, t( v1 `
end;
6 }$ p3 z0 ~% d6 ?: w$ l+ J @.CurrIcon := "drivingHome";% J- n, r4 f' P8 a
@.DrivingHome := true;
; o: N/ S, y$ o2 e! R/ ^. X end;, o( S( {5 V( D/ F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 g+ I C. _" Y; l0 q$ s5 X; Z part := @.transpOrder;9 q5 A9 t2 ?% n. c4 P
part.move(@);-- load part
$ } |+ B* s. m& K; O: m/ @ @.CurrIcon := "load";) s7 |2 s% |- Q( T% [
GlobalDistObj := part.globDestination;3 m" S4 s% r. T: u f# K
assignLObj := rgmanager.rgAssignL;
* K {/ ^0 H3 N V; [/ j row := assignLObj.getRowNo(GlobalDistObj);
7 Y- i* s* Y* {0 k0 _ if Row = -1 then -- since 70% V6 ]' V& @! [' A& U% j, _5 O
if lan=1 then" I: v( c. u9 U8 q! t/ r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# Q& E. @* P9 F" v- p2 u3 \
to_str("in der Andockstation: \"",?.~.name,"\"")); ]; E6 u* R, D+ t
else
: h3 N H/ X, Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 R0 H6 v/ h* I# l to_str("in docking station: \"",?.~.name,"\""));
: V" @; E7 s% p4 W" i8 j4 } end;
3 M: Z! j7 k* F9 ^' h, U( U6 O else
) E' ^3 m; o4 n! l @.Destination := assignLObj[1,row];
5 f, J) L' D0 y/ [+ P1 u0 @ end;
/ z7 Z& q+ Q) K% G$ {+ B newDirection(@);
" j, l9 g% _" H% Y @.HasOrder := true;: T8 _1 U4 ^1 ?# M. ~
end;
- P' f( |1 S4 a end;
+ Q2 t2 p8 ^" x: B: C2 [end; -- of the method' |: ~ [3 ]$ T' [
|