/* called by: entrance ctrl of the object 'track'
1 C% H: l9 R- ]; X- P+ V*/
! h; H' d/ C2 his$ B2 a: z8 {6 o7 s6 I. B' g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& D4 v8 D2 |# w( }1 T8 d/ L \2 Tdo
! _ G* {; g. f. f4 r6 s& S, O$ B Lan := rootfolder.Internal.Tools.AOLlanguage;& Z. _( a2 p+ V' ?+ G
if current = @.Destination -- else return, D& O- f; T: b/ o4 l2 B
then
' F4 B* G' y: y3 f @.Destination := void;
, G2 ?( U6 U: a) E& [ if @.occupied then
* D5 K! | \' v+ L+ Y! d! X part := @.cont;
6 e0 p% ]0 i, h @.transpOrder := void;
7 @# R \9 J1 U: @/ l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: |! e# K9 A# W: E$ O( ^$ z! p
@,root.eventcontroller.simTime);
1 n4 f8 a' r: C. w) H: e' z4 m @.HasOrder := false;8 q1 q. D9 ~* E2 E/ m5 u u7 [
@.DrivingHome := true;
# J0 T3 I8 d' G2 ]6 C rgManager.tryToStartTransOrder;
; D; k% o0 V6 f& ^( _% k( T if @.Destination = void5 u' a) y+ }! Z7 ^( k1 t
then -- no transport order for vehicle @
5 i* P9 x5 t, b @.Destination :=
. }8 R4 l. k# R/ i4 @5 A& V rgManager.nearestFreeStation(@,track.~);3 g8 w# B5 _ o1 I
newDirection(@);
] Y2 \- u6 v+ ~, y- U" S" I if @.Destination /= void then
% H2 x9 U |% y/ r6 H: x @.Destination.NumReservation :=
3 r) f K* G7 ^& k1 I @.Destination.NumReservation + 1;" }' j2 S3 E5 |. w9 R/ C
end;
( C! [" H4 d# S8 ]0 R! `/ q T6 E3 M @.CurrIcon := "drivingHome";6 a+ L. y J% {$ O3 i+ N7 M" V
@.DrivingHome := true;
8 ~( a) v! S! t0 _ end;1 S0 ?1 B6 q# I+ ]: N* R% V; g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; i: |: H' Z' E+ E3 n( ]; U3 v part := @.transpOrder;
7 @ n) w/ j( \ part.move(@);-- load part
3 o' [4 f' i. {" V$ b9 j @.CurrIcon := "load";1 a: L1 S8 C8 A9 T' H+ ^
GlobalDistObj := part.globDestination;0 W! r4 w5 S9 h% |3 V
assignLObj := rgmanager.rgAssignL;
2 M1 q% \# i1 f+ C6 a1 Q/ d row := assignLObj.getRowNo(GlobalDistObj);4 ?8 p: s0 C3 ^
if Row = -1 then -- since 70
, F# O2 `6 z- |5 }; |7 F! R0 P if lan=1 then* W; Z/ j( O f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 V/ }. N+ `: F% o9 ]3 |4 M
to_str("in der Andockstation: \"",?.~.name,"\""));. c. t& {$ h/ T$ d0 ~# @
else
$ M( C5 g5 D$ Q' @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 X2 r8 b* h7 F6 g8 o6 @
to_str("in docking station: \"",?.~.name,"\""));
) J; L* C( v* t2 C end;" c: ~* T' Z( Y7 ^
else
: I' h" y5 N6 |6 y- i; f2 ` @.Destination := assignLObj[1,row];& ]# R/ i+ G- h5 }
end; 0 C( Y( t% m; M( G e
newDirection(@);9 }: d% @$ d; l& t; f9 ]* r
@.HasOrder := true;
( a4 h- ?5 t# p# d8 T7 X* V end;
/ E/ y5 g: X! J* Y end;. l) v6 E: d2 m: J5 D! j
end; -- of the method6 Q( u' T* S) _! i" `
|