/* called by: entrance ctrl of the object 'track'
; b) c+ E7 h& n3 g/ V0 N*/4 t) w+ k, e2 X* H; D
is! @- ~* G3 b8 A3 v$ n# {6 C _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( m; s8 ]1 U2 Gdo* v. O5 b: I" W' k- V+ F6 y
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 _1 ]0 G/ y- W2 [1 ]2 X$ x5 M if current = @.Destination -- else return# [: c$ q/ } G; _0 d( Q
then3 _+ ]4 J5 ~8 R: j+ o- ^: u
@.Destination := void;* ?) ]$ s* r5 ?/ K( j
if @.occupied then9 F' z x9 ~0 X! `
part := @.cont;
+ ^, I( E2 B* U( E @.transpOrder := void;2 v3 T) h0 M. \0 Z5 E* l& N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" E" Q8 v) r9 s# v @,root.eventcontroller.simTime);# D5 ?8 u9 J% f
@.HasOrder := false;0 h/ @; O @$ Z0 y! _1 y7 [
@.DrivingHome := true;
! B$ M3 w. c; D) R5 E* r rgManager.tryToStartTransOrder;
$ q; ^4 y4 [: \1 K if @.Destination = void
, c' h# d9 [* c% Y. T# e then -- no transport order for vehicle @
4 t% P- d6 o4 l; d @.Destination :=6 X0 m" Y# x) [0 i7 k* Y. B2 Z) K( H* K0 `
rgManager.nearestFreeStation(@,track.~);( M* h8 J. D5 o9 \2 v+ ?9 {
newDirection(@); 2 T0 \7 {1 }3 z( z. z
if @.Destination /= void then+ M; ~" s1 _- {; s& z% j. t/ [
@.Destination.NumReservation :=2 d) T) t8 B' P X7 G! C4 f
@.Destination.NumReservation + 1;. Y" j3 j$ |6 A p9 [4 d: [
end;) ?+ e9 \, T0 A$ s
@.CurrIcon := "drivingHome";" z. z! Z3 b6 v: _; h
@.DrivingHome := true;) b+ {0 k) ? P
end;
% \8 }9 \5 O! ?7 g3 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; b, M' K. D4 ]- u2 v part := @.transpOrder;
4 u& x$ ]+ q* x$ y part.move(@);-- load part
1 Z, N9 {8 d2 s @.CurrIcon := "load";
) L9 Q; W1 O! q7 B4 Q GlobalDistObj := part.globDestination;- W# M! I1 H2 i( P4 t1 f( O
assignLObj := rgmanager.rgAssignL;, D, j- N2 ^5 d& [. d/ ?! [
row := assignLObj.getRowNo(GlobalDistObj);& ]) l( k2 b, ^- X: ~+ ]. ?
if Row = -1 then -- since 70
; O! x4 O D. L \# ~3 n1 o ]8 f if lan=1 then8 C- e7 Q" j- z7 y7 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ [8 { d% [. U; f5 H to_str("in der Andockstation: \"",?.~.name,"\""));# R+ k3 H! p; c0 u) A
else
C# d. ]3 l. F" n% d; v8 t6 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% x4 a% V/ P$ F! l( G
to_str("in docking station: \"",?.~.name,"\""));
. y. i, Q$ H: Z* C7 E: B# I end;/ m: {+ X1 d M) ]
else! L* B/ E" q! m" I$ j% ?. l
@.Destination := assignLObj[1,row];7 v' o6 f# }; e8 E b; W" F, F, F. Q
end;
) m& Y- U1 |0 d1 r newDirection(@);
4 m$ N1 }) c4 X7 r @.HasOrder := true;6 z% a" d8 E& C- U5 z; S
end;! S( m; R& |' C5 G' H6 u+ g
end;
$ z, q; N1 G3 F* h( X2 Wend; -- of the method. G* |: [# s' L5 V3 v+ Z
|