/* called by: entrance ctrl of the object 'track'
$ ~8 t2 x" T/ w) J- |- c$ C*/1 N0 f" P i- X0 k1 u5 Y! l
is
& _& @" L1 p+ f0 {, x! k" E1 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! Q: f3 s5 T7 A) N5 |& Udo
; g2 Y3 F7 i6 B1 T2 G0 E% m Lan := rootfolder.Internal.Tools.AOLlanguage;4 G, t; k+ e" Y" \
if current = @.Destination -- else return
) |" @& F5 g. c( l' t6 [ then
% q0 G# M. ^- v; z @.Destination := void;2 e- J: T. v& d: b4 N& |: ]
if @.occupied then6 @- j2 o' R- r5 \& [# ?
part := @.cont;
, `* I/ x" H7 s. R) i+ H1 M @.transpOrder := void;- {8 r$ b- ]/ [4 h' S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! @, F& N2 {$ D, H( D* J( e1 L
@,root.eventcontroller.simTime);
9 ^2 c8 B5 z0 J4 H! z @.HasOrder := false;
3 t" O w3 O, R d/ W. n @.DrivingHome := true;; H7 R9 ~2 @* C+ l; \1 u k2 `
rgManager.tryToStartTransOrder;6 ^; {' @3 F/ [3 R7 V# [
if @.Destination = void) g' e) | u r- H
then -- no transport order for vehicle @
6 J9 e+ y0 `. H2 ? @.Destination :=$ y F8 R; m- @0 f f4 p
rgManager.nearestFreeStation(@,track.~);
7 c! e9 l V. ], L. g newDirection(@);
% H1 f" j+ v) d1 `% n- k if @.Destination /= void then
8 s$ K' L9 C. ^7 A& L" N- o$ N2 t @.Destination.NumReservation :=0 x2 F" B' T: u% Q% X
@.Destination.NumReservation + 1;
' p" E! |& W" L, g2 w end;2 ]: U+ m8 z7 Q2 H
@.CurrIcon := "drivingHome";: C8 L/ k9 W) E! A; u( e( K
@.DrivingHome := true;0 Q" l% W, S% q3 Z9 s
end;2 N7 G3 J3 U/ r+ i/ s6 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: j, o: S+ E g+ T' W, o% ^% K part := @.transpOrder;; f Y2 Q5 x: g4 L/ |
part.move(@);-- load part* a1 X$ y' _/ k6 @7 {
@.CurrIcon := "load"; ~* p5 G# s7 s
GlobalDistObj := part.globDestination;
1 b+ O% Q' g1 f9 x/ d assignLObj := rgmanager.rgAssignL;0 T6 A# E, _1 g/ p/ W
row := assignLObj.getRowNo(GlobalDistObj);
& r! L* c5 D: ~& J/ d if Row = -1 then -- since 704 p8 I$ N7 `$ j. x0 u2 C
if lan=1 then3 z: n. g# x f% A- Y! w6 g$ m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, j& A7 Q" |8 n9 r/ y1 T5 b to_str("in der Andockstation: \"",?.~.name,"\""));; {1 z6 @5 V5 Q3 s6 j: X
else
4 n) [# j: m/ v; x2 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! }3 d% e, s' K" J, o+ E to_str("in docking station: \"",?.~.name,"\""));
2 i; M3 j- T9 C5 K) u8 a: G2 N: K end;, z2 s6 n9 Z, q/ x) O A
else! P8 K& M, g4 N* @. P
@.Destination := assignLObj[1,row];! x3 a6 b: @! n2 M
end;
9 D8 E6 Z ?5 P+ q m3 r( ]/ ]' | newDirection(@);
& e$ E$ A$ W) D4 D, g @.HasOrder := true;
0 ^/ u1 L% X9 N# ~ h5 e end;1 B s& U7 K U( T
end;
: M; v9 e7 s9 q: L, oend; -- of the method' g" R8 e2 a: \5 g- u5 r. E
|