/* called by: entrance ctrl of the object 'track'
2 `5 s) M4 W7 W1 K# A5 u$ d*/
- w5 N% J- x2 Q+ \is
3 a/ g/ C" v, N6 C" u3 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ X l0 ]! T' ~9 Q( H1 @6 F3 ^
do5 O/ m" B7 U; y- C' N
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 A% K6 U; u" T3 d7 b if current = @.Destination -- else return
7 C" S; e5 e; C/ n9 A# Q then
% n) n: Y# z/ _& h& f' c @.Destination := void;
j# \% d. ~. e f if @.occupied then/ r; i, p& @ Z8 x7 N& _% M
part := @.cont;
- H; l: ~' T4 r @.transpOrder := void;
. Y: c0 C2 v- ~9 w% j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 g7 x) q" ]! C7 Z: Z/ e E @,root.eventcontroller.simTime);
4 W+ f/ a% k% g4 h6 e1 H2 e. h @.HasOrder := false;5 i6 l, U% @ L8 |. C7 J
@.DrivingHome := true;" C, w1 f! d* K- ]! ]
rgManager.tryToStartTransOrder;7 t" G* o( s; f
if @.Destination = void3 V8 h" F' y c; `9 T
then -- no transport order for vehicle @
- X8 X7 N/ W! D: _: V @.Destination :=
3 y( w. V/ C* y rgManager.nearestFreeStation(@,track.~);
2 E9 E0 E: Y& L# I$ [ @2 H* _0 d newDirection(@);
3 R* Z; M" a3 V if @.Destination /= void then& m6 t% R' I1 L. o; M
@.Destination.NumReservation :=
# j1 J, Q* {5 V" Y5 X @.Destination.NumReservation + 1;5 L, N2 s. ]' s
end;
. `: z+ ~/ e, b& W/ N @.CurrIcon := "drivingHome";
, l' K3 F0 g a$ [. O+ t0 d @.DrivingHome := true;
/ ], R9 k$ L8 H2 ^ end;2 `- D2 d, o# ?6 q1 S( Z8 `& F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. b4 ^8 X7 N6 ?1 B$ C9 g- }/ E' c part := @.transpOrder;
( A/ F) G" D9 l7 f/ _7 F; }8 g part.move(@);-- load part: _' M& P- c e# Z
@.CurrIcon := "load";! L2 a4 w5 v, [5 l* B
GlobalDistObj := part.globDestination;
$ n$ c. x+ R$ z! m% [ ^# Y assignLObj := rgmanager.rgAssignL;
; Z4 r9 u8 ^. T1 ]& n5 L5 E row := assignLObj.getRowNo(GlobalDistObj);; q5 h9 f% S% `2 a
if Row = -1 then -- since 70
- ]4 A+ V! D2 t! p1 A% [ if lan=1 then
2 Z3 v, ]) I/ e( j( E! [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), v; y9 R1 y/ R, w0 y
to_str("in der Andockstation: \"",?.~.name,"\""));7 P1 j$ n9 I. b$ ^$ `1 E- _6 V1 I
else1 c2 i. k1 F8 o+ X7 X, d0 P: C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ l \# {8 X$ R4 u+ ^6 H- v
to_str("in docking station: \"",?.~.name,"\"")); & C. f5 _1 G7 s) i8 l0 w z
end;2 \% s% u2 w" g1 W; C6 c
else. b9 G% y9 k$ l8 z! X+ [: s3 U! @
@.Destination := assignLObj[1,row];, r7 P4 n2 ~) p+ z- G) p
end; ( Y5 D/ ]! e9 k# K1 S. q# s
newDirection(@);
6 X8 J) {( D" u @.HasOrder := true;
, P# Z. {5 I& W' z5 o1 z end;: p$ t" L, W# ^+ A* M( ]
end;( a0 B A; y* T' d
end; -- of the method
( V {( U6 E# v' D- r* ^ |