/* called by: entrance ctrl of the object 'track'
6 M& u& K- m: ?% w*/8 ^6 ^) V6 W& t) ]
is
2 B& j& X) C. m- `$ m part, GlobalDistObj, assignLObj:object;row,Lan:integer;* z1 s) t6 l5 R0 {
do
8 j7 ]0 h9 @0 _+ X3 ]6 e Lan := rootfolder.Internal.Tools.AOLlanguage;6 ]6 T# g5 s- K
if current = @.Destination -- else return
# k$ v' d- R7 B7 v( c then4 ~, i' p5 y/ W9 d5 [
@.Destination := void;0 Y8 U) j; k2 C, {+ i7 B
if @.occupied then% o$ j, P" s* c6 U. X# o! w0 I5 G
part := @.cont;
8 l% U5 X: i/ {$ e) q @.transpOrder := void;
% L4 R& h3 Y5 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# \+ C8 J, }3 C9 Z/ \- K/ Y3 |# K
@,root.eventcontroller.simTime);
1 ]6 S' o4 {, e9 a& t2 D6 I; H; w3 n @.HasOrder := false;
, L4 u7 m3 L* I6 B: h3 ?0 ^ @.DrivingHome := true;
' P. g; u6 T$ _$ z rgManager.tryToStartTransOrder;
, j- t8 q0 t% M if @.Destination = void
! W+ s; v0 s7 |! V1 [- Y& h then -- no transport order for vehicle @
0 `. d; f, B& i$ e7 ?/ f7 ^ @.Destination :=: h* J% R' v5 q1 H& L' }/ \5 @
rgManager.nearestFreeStation(@,track.~);" F0 `5 f' G2 }/ N
newDirection(@); " A( m" J: }; g) ?+ q# ^& Z5 C! [
if @.Destination /= void then4 W$ e- r$ v$ M- @
@.Destination.NumReservation :=
5 s* `7 N' n. E: ?6 f @.Destination.NumReservation + 1;
?9 }# Z4 a1 J6 b5 r, Q; { end;
8 H( h% r- i8 L# k: w @.CurrIcon := "drivingHome";
4 E2 t1 r8 r+ M$ O1 U @.DrivingHome := true;
; i% h- v4 g( v, I* Z) O end;7 Q- b1 F; {4 K$ b2 H; k5 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: E7 A' W8 V9 N9 k" |
part := @.transpOrder; \& Z8 m ]) j- Q6 x# y
part.move(@);-- load part
. q6 H$ J+ o( ~8 T, z @.CurrIcon := "load";
% C+ i& x8 Z& Y3 Z GlobalDistObj := part.globDestination;
1 n4 H) w8 l* W$ p$ y y8 Q assignLObj := rgmanager.rgAssignL;
9 r$ ?- z( A$ H8 e. U row := assignLObj.getRowNo(GlobalDistObj);
& P Z! n2 u: A if Row = -1 then -- since 70; w) d$ ~4 K' a9 t+ I4 d4 a2 X; S" E
if lan=1 then
0 t v. C* |. J/ x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- B( F: ~# R! o! Q+ i. H7 t, i
to_str("in der Andockstation: \"",?.~.name,"\""));
" c; ~% u7 R* T6 x1 p else+ B8 w+ r1 P" \9 c7 o8 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* @4 T# q7 O3 A+ N# @. w
to_str("in docking station: \"",?.~.name,"\"")); " W. o8 ~/ z$ y8 P, L9 H6 R
end;
r% C6 }4 M4 F* k% i8 X0 N8 V else5 p1 f' C1 z5 e# x+ m
@.Destination := assignLObj[1,row]; Z6 a# g3 A) a# @- u4 }
end;
& j6 J ~6 |+ O" u. e# d newDirection(@);5 ]/ ?" F7 o0 ~
@.HasOrder := true;
, j0 v8 ^) ~: t' E3 Q end;
) j$ W& Q7 _: T end;
" `3 x. R# r: S, v) p: S1 l4 iend; -- of the method
! U/ C, t- w' F7 I |