/* called by: entrance ctrl of the object 'track'
) d, O; N. a4 u5 s. f& l" t*/, r1 u ]: r8 a" \# y% B( u/ o5 u
is h, p; h, n" Z/ X1 G' T3 y. v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 I5 T- Q/ ?5 g* `
do
; a C7 q0 t2 } f) F0 L Lan := rootfolder.Internal.Tools.AOLlanguage;0 `9 o. }; x; C
if current = @.Destination -- else return
( s7 R" q c% @$ L, f& ]. t$ l then! n: Y0 v, O6 z! E+ _' ]
@.Destination := void;" K& d. U7 ^! {) C% i
if @.occupied then) C' R& _6 y Q! R" R7 I. {' ]* g
part := @.cont;
" Z" T0 S$ i; p+ J$ z: _4 D* O1 n @.transpOrder := void;, z, a, s3 a4 A7 L! |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: r! V5 L8 F, ?; H I# n
@,root.eventcontroller.simTime);
8 R' M2 n& s1 N4 J+ L$ Z# j @.HasOrder := false;3 i) V# K" k ~9 y; t" T
@.DrivingHome := true;
2 z ~& q. U/ h rgManager.tryToStartTransOrder;; r7 b: x* S V$ e
if @.Destination = void9 [3 J4 k* W- T' q
then -- no transport order for vehicle @
( l' w6 ]" S/ h @.Destination :=' H: Z7 E) a' D7 p8 N2 @# C
rgManager.nearestFreeStation(@,track.~);5 H" x0 T* b* R% s, P0 f5 {
newDirection(@); 6 Y5 h: ]; a) P
if @.Destination /= void then
$ T' R! v |, A3 A7 k* J+ Y @.Destination.NumReservation :=) ?: a0 F6 S; K3 [6 r3 r
@.Destination.NumReservation + 1;0 H# W" @7 B: H$ A# _# ~+ B8 E# t
end; _! V" O& n* ^( Z
@.CurrIcon := "drivingHome";
; \1 C, `5 k& x9 w: F @.DrivingHome := true;0 a' k% o4 c6 |- J
end;2 ]3 f1 l2 ?' l2 ]: u# S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 L" t$ C* J9 V( ~7 }% b part := @.transpOrder;' K- H2 J4 u$ ^ r
part.move(@);-- load part
/ t2 m5 A% |8 ~) y/ U @.CurrIcon := "load";* X S. ~: J; V9 S! M
GlobalDistObj := part.globDestination;" e# v8 [7 B [. K
assignLObj := rgmanager.rgAssignL;
; N5 ]$ V3 p6 \2 d7 W1 a row := assignLObj.getRowNo(GlobalDistObj);
4 [( w0 ~/ ^! j0 w/ b+ u if Row = -1 then -- since 70
1 z/ k3 N V% C6 j) R/ U- ~& U$ ^ if lan=1 then
4 ~- {, ]7 R$ [$ O2 B8 @9 M% H+ K" Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 ^: O) T) R( ~+ K
to_str("in der Andockstation: \"",?.~.name,"\""));
. x2 d+ o% P: |( ]" d8 o else
+ @3 x- [7 M+ v) k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 [, a* K4 V/ V/ [% W9 \' W to_str("in docking station: \"",?.~.name,"\""));
! h+ D. Y" d7 v( Q9 q) P! t$ ] end;
0 `3 Q$ B2 T/ u3 D, r: H, [) p' o$ F else
. M+ A" l, J3 a8 `/ R5 ^' L @.Destination := assignLObj[1,row];
7 q4 @0 t4 R* Y end;
/ P4 I8 o9 {. G: s newDirection(@);' U7 y0 |; P! u8 P' g) N; D
@.HasOrder := true;) E5 x3 g& O E1 t
end;
- q R( Q* J6 A" D4 d end;$ }" I% n; j: e# {! e( d- k
end; -- of the method2 ~) u* M( }0 l
|