/* called by: entrance ctrl of the object 'track'* L5 q9 @2 S* ~
*/; Y3 T; t0 G% w7 @. _
is# p. D% I% n6 I! I$ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 z* S( y, C4 F5 w0 Mdo8 H* U& q+ o9 U8 U5 b2 O; @
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 R0 _# C2 L( y+ w' |5 L if current = @.Destination -- else return
6 f( J0 x: I1 b* i+ w# O then
" p/ \. L& D* u @.Destination := void;
6 f5 @4 M! d5 b4 f if @.occupied then
% N& l" T2 L+ j3 j% J4 p) o: C w part := @.cont;
% t+ V& T+ Q9 Z6 h, { @.transpOrder := void;$ U- ~6 y& k* \6 r" [6 p5 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 v0 d3 m G& O! O6 Y: W @,root.eventcontroller.simTime);2 q$ D V4 D5 b* X
@.HasOrder := false;
+ T0 m! ]/ l/ r$ P @.DrivingHome := true;8 r C+ x4 }& L; Z/ l5 R
rgManager.tryToStartTransOrder;/ }" z0 Y. g9 m! N
if @.Destination = void
: m' k3 I" |0 E! I3 r then -- no transport order for vehicle @
: A( r: s0 c5 @/ J8 w @.Destination :=% N2 `3 l, A: V! O0 s7 ]3 n
rgManager.nearestFreeStation(@,track.~);' v; d3 }1 B' W# R) o
newDirection(@); 1 s; C) X+ ^+ w+ N0 h. B% z8 L% L' C
if @.Destination /= void then
+ Q( v9 [1 H- h' s! R; t3 W8 B @.Destination.NumReservation :=6 ?* h9 H; @8 }% ~) Z8 N
@.Destination.NumReservation + 1;
M9 b) I% U4 T/ V5 ~8 ~+ b: c end;
+ j$ c' O0 j1 l3 `4 j @.CurrIcon := "drivingHome";
% D6 p( ~1 z& G- a3 U! r2 G& O @.DrivingHome := true;( ?1 r) ~: b$ `: f& P4 ?
end;
8 `6 y! x0 g8 @- h& L3 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 L8 B- Z0 _; M1 V' Y2 j: k" j part := @.transpOrder;
$ b7 f9 f0 L: S/ b part.move(@);-- load part( W4 p3 N* P, W* t4 v- n
@.CurrIcon := "load";
; A" @. F5 M6 G# t, a; E GlobalDistObj := part.globDestination;
0 S: ~+ B3 m. {6 y9 z assignLObj := rgmanager.rgAssignL;
y% \9 u/ \' a; e6 s, c- o/ O2 k# D' w row := assignLObj.getRowNo(GlobalDistObj);
! B+ K' z4 @) r' k3 m3 |% R- s( h if Row = -1 then -- since 70
0 G( ~. r4 v& M5 R/ \% g# M" q if lan=1 then( R2 G9 w# P3 j! a/ ^7 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y" M" i8 h. O$ R- m% f to_str("in der Andockstation: \"",?.~.name,"\""));
% }+ M9 \' A: H( Z3 `5 l G else
6 g( { B+ W$ C& b! W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# W9 y2 t" y/ p" {) Q, }+ N to_str("in docking station: \"",?.~.name,"\""));
2 a" D K' f% i9 k% x end;
4 r% g$ Y: G0 h3 `8 I" h- o else4 T% J( U3 @, g& T: i3 X
@.Destination := assignLObj[1,row];
2 i3 c- X' W, a2 `) H; L end;
1 y4 Q8 Q3 u+ T; o newDirection(@);! @/ y: {! I2 j
@.HasOrder := true;1 K- M4 H. r& w5 B
end;0 g: k- K8 C- E2 T* W
end;
7 K- q4 \0 R0 C( bend; -- of the method
5 ~& P% F8 {6 @ |