/* called by: entrance ctrl of the object 'track'
7 l) C' T6 N# E0 s7 n# g% a! D*/
. X+ U8 H( w8 s! N) Pis
2 w! f: x1 d8 a, M; C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' O7 i, q6 z* _* s* F* vdo
( P. e. Z7 I9 A2 b9 M& E1 E$ P Lan := rootfolder.Internal.Tools.AOLlanguage;
& _. f* a' F2 ?% U% q if current = @.Destination -- else return
: ]! o. \9 V- F+ X5 x' t then
1 e) x) P' Y% b' J6 D: Y @.Destination := void;' V0 ~* Y3 v* K, r" t/ I
if @.occupied then
7 g% j$ @) ~1 Z- s part := @.cont;% v2 o& q$ j! K( [- m
@.transpOrder := void;$ E F& r5 S; y% H! R" g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ O7 r/ K* s( r8 N/ Y8 v1 U9 g
@,root.eventcontroller.simTime);
4 n- v% [( M; E) d: d$ k1 a @.HasOrder := false;& f6 Y6 N2 s- R. y
@.DrivingHome := true;! r& Q0 x1 T9 C" r
rgManager.tryToStartTransOrder;
+ m3 A! |1 D: S$ S4 Q( r; Q" Y if @.Destination = void
$ d" k% v2 [$ ?% F) v then -- no transport order for vehicle @- K$ }. P: K- F( [# m! }
@.Destination :=
" [2 q. \* I* o- b( S5 C! D, ]* i0 n rgManager.nearestFreeStation(@,track.~);: z1 D% r/ _& x4 L- }8 a0 o: ?* k
newDirection(@);
3 N) X4 b8 K) J- }! u3 z6 g v if @.Destination /= void then4 t/ k" \& o( i2 _8 X
@.Destination.NumReservation :=4 y: d6 \4 R! b5 T
@.Destination.NumReservation + 1;
2 G2 B% L3 n. [$ ? end;& w+ d( v, \" @4 W4 O# Q% c
@.CurrIcon := "drivingHome";
1 o/ [" }3 C; \; K R" \+ E1 \' g @.DrivingHome := true;
- C `" M' ]8 U4 @6 \ end;, Y/ @6 P. S! L4 ]" y6 W- \1 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ `, `* }' B* @
part := @.transpOrder;" L$ r5 y: i( j; q7 `
part.move(@);-- load part; o8 T/ ]/ r1 d$ y+ Z3 a
@.CurrIcon := "load";: G: |9 O* r2 S8 |+ Y
GlobalDistObj := part.globDestination;9 H. p; c- p& n2 S: Y
assignLObj := rgmanager.rgAssignL;
% j0 z# f, t' ^- x9 i% ~ row := assignLObj.getRowNo(GlobalDistObj);
E/ D- T. w+ t4 f$ Z if Row = -1 then -- since 70& W8 A, a7 m7 i; g( k" W% x! l
if lan=1 then
& U x* B2 Y2 M) j+ ~4 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ s, U( n' G. Z8 T2 r H
to_str("in der Andockstation: \"",?.~.name,"\"")); T/ q7 a8 v2 n6 y
else
8 p& ?1 x$ }; _; q! d; b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
}, Q' I$ N0 @3 H5 E3 l: A- h: M2 J+ ` to_str("in docking station: \"",?.~.name,"\"")); ' @8 T4 A/ U' ?" H3 h" D
end;4 U; K7 v) J4 r3 ]
else
" M. y( G2 w! [1 }; } @.Destination := assignLObj[1,row];% A% a% K% x8 k. n% _' t3 `
end; , y' R9 W! ~+ D- `3 s l9 y
newDirection(@);$ @5 _: u/ z' f2 J k6 Y! ]2 s$ N) B
@.HasOrder := true;
% o. n1 }; N* M6 r end; _7 \4 H0 N+ X' x3 H( t0 F4 @
end;
; z' |& p- J0 z0 {( J# d: @end; -- of the method
1 M0 |4 g# |. X |