/* called by: entrance ctrl of the object 'track'
! M% X1 C, v; @* v; {*/* v" ]+ g _; p2 z: b0 t. z5 [+ O
is7 Y- ?4 ^% b+ W! l5 S* O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 X9 s% l+ a% ?- C! _8 Pdo
; z% E: O% C: h5 e; w. H/ r Lan := rootfolder.Internal.Tools.AOLlanguage;
1 g0 u Y) e: X" |* H2 N if current = @.Destination -- else return# q8 u9 |5 Z8 j& B& n3 X O
then5 M( x- {4 V; W6 h) H; _' N
@.Destination := void;
% G# T n' i1 F: Z( v) H if @.occupied then5 i0 i% `4 X' v4 i p
part := @.cont;" n# k0 C/ a; D8 o+ r! J$ R, a
@.transpOrder := void;! a0 Q% G! ^7 \! ~8 }! s0 }: V/ j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- k/ q% E3 w; g) _' f! R
@,root.eventcontroller.simTime);/ D# Q8 O Y1 G0 ]7 H6 j0 I
@.HasOrder := false;
- E) a! e7 N9 K: {: u @.DrivingHome := true;6 f" B) [+ Z, z2 F
rgManager.tryToStartTransOrder;
: G; R$ u6 t3 C5 T! d; y if @.Destination = void8 p; C" R7 t- p: i3 f+ m4 b& P6 p6 q
then -- no transport order for vehicle @6 M5 e* K. ?! \; k/ r) W/ Y) R
@.Destination :=
% g2 [( W- _6 s rgManager.nearestFreeStation(@,track.~);
# H( [$ }4 W$ D* n4 p8 S) V* b newDirection(@); / C$ b/ M3 j! M6 J( g- y8 U8 z
if @.Destination /= void then
- c& B0 _6 Z0 s, {3 B @.Destination.NumReservation :=
' G4 u8 Q3 w3 Q- C# z; x @.Destination.NumReservation + 1;7 V, L M& T" f) }0 q$ p
end;
6 Q* P, H6 m: I @.CurrIcon := "drivingHome";7 k+ |1 u* e9 H3 h H
@.DrivingHome := true;4 v6 [ g9 y# ]2 {, t; B
end;
! T0 W3 u; o. V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! p2 i, z4 D& E% C part := @.transpOrder;
- K* A$ \$ B" N+ H) t part.move(@);-- load part
2 {1 R) n0 W! U) J0 B @.CurrIcon := "load";3 ^2 m: v7 @. c* e( ?- j' Q
GlobalDistObj := part.globDestination;# l; U( s. V3 C; M8 i
assignLObj := rgmanager.rgAssignL;1 x1 i: ?$ ` m( A; s& _
row := assignLObj.getRowNo(GlobalDistObj);
6 V9 Y' o, a% n/ E% g if Row = -1 then -- since 70
0 L/ ~! C" f- P& n if lan=1 then
& z: G% U$ E4 u$ u9 M0 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 r+ j t l# k" A; W" u1 b. o* k8 M1 N
to_str("in der Andockstation: \"",?.~.name,"\""));2 n6 W4 h5 F9 [% ~0 m3 s
else0 T$ F2 c7 F6 t; {% x* J7 D q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. V' G' ~( H' e. _# w; n4 B# h. h
to_str("in docking station: \"",?.~.name,"\"")); / E0 q& G2 j+ _, l. Y' R5 h
end;
; V1 e9 m6 T8 s/ m# D5 v( ? else
% S ] K8 b: }2 @7 ], b @.Destination := assignLObj[1,row];
5 N, r5 n- d3 U9 `. T end;
4 J1 w8 ?/ I! Y! u& O% M newDirection(@);
; `$ {1 e r9 w- d+ G @.HasOrder := true;. P2 s/ k- S9 c; D5 C
end;* Y3 l9 C* u- O3 ?
end;
9 ~- \! W" V: ?3 wend; -- of the method5 Z8 D. M: _+ w Y* i
|