/* called by: entrance ctrl of the object 'track'9 u+ k1 k3 v% \1 B. ?
*/* x7 f& s" E) C" E/ Q7 C
is
8 s" i# J. `( S' ?2 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ T1 ^+ n, S6 ?& ?& @5 u H! l
do
) C& s' d$ A5 {. E+ m7 Y" F Lan := rootfolder.Internal.Tools.AOLlanguage;" H6 [. K$ Y- D4 l
if current = @.Destination -- else return
! R$ ]! {3 c( L9 c) T* H" e then
# T9 Z7 f6 t! l4 Y% T' |/ ] @.Destination := void;
5 }8 h) [, X2 F6 e+ j' b) p3 G9 k if @.occupied then9 ]3 J) T8 G2 c. N; k
part := @.cont;4 f. o2 T |4 t- w; _
@.transpOrder := void;9 @" }! ?7 _5 Y7 M( A2 y" D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# n. ?! `& [8 X }% b/ d( m# X! R @,root.eventcontroller.simTime);
* e1 L+ `- Z7 E @.HasOrder := false;
8 g3 o9 p4 c2 o @.DrivingHome := true;
$ [: o0 I$ i& u& i; T rgManager.tryToStartTransOrder;+ m2 o4 a$ N2 u: t9 }
if @.Destination = void! s) ]! l2 I$ [: u2 Z
then -- no transport order for vehicle @8 V9 f; s8 ?- r5 I2 L( k) x) z$ C
@.Destination :=4 F& F# y5 A a1 P; o8 X4 b8 c
rgManager.nearestFreeStation(@,track.~);
$ ]* H6 s( z. S$ m newDirection(@);
5 n4 ?, w$ r3 L( M, h5 a if @.Destination /= void then- d6 H% e) B R; F W- F
@.Destination.NumReservation := y: d) l* q5 E; r% e; y* k- L* j
@.Destination.NumReservation + 1; g) M$ Q& x" y2 s, E: G, z G4 _
end;
3 J1 V# R2 ~! W* U @.CurrIcon := "drivingHome";
# i: I3 F+ S* R9 }* R$ a @.DrivingHome := true;
, @, @4 s5 `) G0 l. w/ ^1 D3 } end;/ J) e- i3 C* C L1 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- Z& \3 u8 j; J. f) p' R) v' L
part := @.transpOrder;# Y8 `- u v9 s. F7 w
part.move(@);-- load part9 p* x0 O/ ^7 Z$ x
@.CurrIcon := "load";; q# e5 t6 F8 a7 n* q+ P% I3 G
GlobalDistObj := part.globDestination;
3 S; W- ~1 I: |. I4 ` assignLObj := rgmanager.rgAssignL;
! t. n, F% I" c! x row := assignLObj.getRowNo(GlobalDistObj);
; T2 k( G2 }6 g2 b1 d if Row = -1 then -- since 70, y# L1 k" x* `- g7 V& r
if lan=1 then6 s: C# H/ J m# i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 a x7 |% G$ \" `/ N to_str("in der Andockstation: \"",?.~.name,"\""));
2 }( C' N0 I5 Y+ P+ N: H else
& R) C' ?, V% \6 [& C. q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 o% I9 o$ F5 O* z! Z8 [7 }( I to_str("in docking station: \"",?.~.name,"\"")); ' H# l& ~ w8 o
end;
2 t/ f1 i; X/ j! d else. a; C( x1 r% j9 U# d' F ~! @4 Q
@.Destination := assignLObj[1,row];
3 \# U! e! s( T) K7 Y end;
1 F& ]$ @8 Q4 T# Y: ~: a# W ? F: P newDirection(@);
# O1 e9 Q5 z1 b5 P- y @.HasOrder := true;
7 J' D+ {- O3 `0 U end;
5 L3 h( S' O, ?( r4 \' q- J: J( A end;9 g" z$ x+ _) Z, l/ }& S- |- o q& |
end; -- of the method6 w* B' X6 B, G
|