/* called by: entrance ctrl of the object 'track'
! {# u8 N4 d4 V, _) a6 [2 x*/
3 i1 ]6 R. x# Ris
2 _! U1 B! B: r; h% Q3 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 ^6 _4 _- a. K1 F I9 o
do
/ `# V4 {9 B- r; L Lan := rootfolder.Internal.Tools.AOLlanguage; H" j/ ~; U* M
if current = @.Destination -- else return* f! B0 h! Y4 U2 h' G" o) C
then
8 O2 N( k6 E1 ^. u4 X9 d2 U- D8 ~ @.Destination := void;/ I- @0 _+ m1 G) y, ^# [: D
if @.occupied then
3 }7 `9 h( a1 C( w part := @.cont;$ J) [, N! U' d* s) |( f2 {1 w
@.transpOrder := void;
2 V% d9 O. x* B' n( R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 p; _$ z, E0 u" d6 f* J( u% {) q
@,root.eventcontroller.simTime);
/ }) M: ^* f7 H# ^ @.HasOrder := false;1 L l7 }$ O1 x
@.DrivingHome := true;9 K: ~: F j# x8 e3 v4 B! F9 B2 a
rgManager.tryToStartTransOrder;, W9 X- t. M+ m( p
if @.Destination = void4 s5 R* y& ?) c4 _# M
then -- no transport order for vehicle @5 {- w" d& Y, B6 m2 ? W# x
@.Destination :=- n) s& v! c- c" g1 `, K0 C
rgManager.nearestFreeStation(@,track.~);
) k# {. d# T& f+ I+ i$ s: k. W newDirection(@);
( ^" U1 Y" z( g R1 t' E) J if @.Destination /= void then
! a4 e& Y8 q4 t$ D @.Destination.NumReservation :=
) n+ ^& m; d' n; E; L @.Destination.NumReservation + 1;
: M/ ]: `% {. f6 r end;* A" D# f U& I7 ^8 h3 ^
@.CurrIcon := "drivingHome";8 d5 u; p. Y! L, U. a) h+ P, C
@.DrivingHome := true;( r$ \2 v1 j: o7 Z# E! l
end;
0 |* E: Y/ a! G$ b$ ?% L else -- the vehicle @ is empty, both vehicle and part are in the same dock station, H8 d! N. q$ @* G# F9 u
part := @.transpOrder;8 V) D, n& f0 u( @. h( x
part.move(@);-- load part! ]2 f) S J v% i2 g: J
@.CurrIcon := "load";/ A6 Q3 u' t# o# E( a( n
GlobalDistObj := part.globDestination;
3 A" q4 `0 b4 K4 X7 K9 \+ H- e3 t$ f assignLObj := rgmanager.rgAssignL;) D* \; Q& X& n1 v s9 _1 h$ p
row := assignLObj.getRowNo(GlobalDistObj);
8 S; O' @5 J. m5 V1 l if Row = -1 then -- since 70
" L' L# e1 f( W$ \3 r if lan=1 then
+ M3 W6 E% @2 g8 b, h' x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) B# @' G" K1 p# x3 N to_str("in der Andockstation: \"",?.~.name,"\""));* X! U# y( @" g1 F
else0 q6 w0 p P+ h$ N) F& @5 T% }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' v, Z0 X9 b9 E) W3 H: l
to_str("in docking station: \"",?.~.name,"\""));
e8 l# v4 ?8 B5 D- }% B) X5 O end;7 D8 q2 `4 O0 L" w% g" y" o, I" K
else
6 T5 _& J7 \0 k1 K; a: J @.Destination := assignLObj[1,row];
/ g+ D; q$ b- o7 z end; ) S4 l/ y" v9 \3 [6 Y# [$ E9 |
newDirection(@);, p& v- O/ Q$ Y' j4 ^( I
@.HasOrder := true;
2 c: Y2 j( I3 Y5 B9 {0 D end;6 l& v+ B ?; u2 b( W, i
end;. P/ x( E1 P% e0 e2 L
end; -- of the method0 F! j L+ O m1 T
|