/* called by: entrance ctrl of the object 'track'3 G! w9 F& |8 d3 D; H
*/% v8 u0 d6 }% }, n7 c! Y2 w3 c
is
+ ~! e& x+ V4 Z8 w- W$ w3 W7 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;# d- F: k4 @0 U7 N B% T& Q9 F
do l" r" Q( A2 T3 h& T5 }; q/ i
Lan := rootfolder.Internal.Tools.AOLlanguage;( ]1 j1 J' e) }" b( w
if current = @.Destination -- else return# j1 M1 g" I3 T) u9 B
then# C# [9 m! [0 Q& |, J! a9 W
@.Destination := void;9 h1 k6 E- g# D
if @.occupied then
' n: k! a7 I! k! n e; l* d! Z part := @.cont;
1 }3 a, Z% y1 L! }7 _7 c @.transpOrder := void;' O. ]+ G' f+ B8 W! P$ [, }3 H5 Q$ C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h: o0 ?# A/ G7 S$ v" e
@,root.eventcontroller.simTime);
, i+ | g9 H2 d" | X0 M/ D2 P @.HasOrder := false;
, J5 }5 l$ S4 f5 U4 z% ] @.DrivingHome := true;% q% ~! y$ _' G/ g1 K
rgManager.tryToStartTransOrder;
; n8 A; v1 S* W8 c' ] if @.Destination = void
' |* ^$ v3 Y$ b7 R. s then -- no transport order for vehicle @8 f9 r$ @+ q9 Q4 L9 h
@.Destination :=
6 s* {9 n( ?% |4 k; } rgManager.nearestFreeStation(@,track.~);. B2 `1 c( D+ q. u9 h
newDirection(@);
0 D: x$ X" E V9 c if @.Destination /= void then1 y! H' r" r4 d
@.Destination.NumReservation :=1 c, `3 i; w+ R2 v* e4 c+ p
@.Destination.NumReservation + 1;2 w9 K$ N; D5 Z) J- u
end;, n) C8 D( l( g% w/ R
@.CurrIcon := "drivingHome";
( \1 e+ N5 H; `2 Q/ x* B @.DrivingHome := true;
! n/ W5 F: g3 i: j3 { end;2 q. p3 E8 w0 _2 Z% t, a+ L/ B4 Y$ G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( L. e) P1 m: t* b% I9 Y
part := @.transpOrder;' s1 b+ ~, E4 ?+ }
part.move(@);-- load part
9 b l @) o) R. s' i+ v5 L @.CurrIcon := "load";( A4 x4 M: W1 v+ l; ~. u4 J; Q
GlobalDistObj := part.globDestination;
, t# h% |" L0 | assignLObj := rgmanager.rgAssignL;+ s! F* F6 j2 i+ W
row := assignLObj.getRowNo(GlobalDistObj);) d# H6 q/ v2 V; [# P( V
if Row = -1 then -- since 70
3 F4 ]7 Y4 c- w7 ]6 Y if lan=1 then
; A x/ y0 }# f1 F4 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# B# e4 @* s# d4 q6 D to_str("in der Andockstation: \"",?.~.name,"\""));
3 D( K! U; K0 b6 {1 o else+ u% O, i% k- N: R5 v& ^5 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. b& J/ w. b5 {- B! ^
to_str("in docking station: \"",?.~.name,"\""));
0 h- [4 R0 H& k' e5 n; J end; J% Z. k( R, G- b2 r
else
* e8 M9 r- @- M8 g3 r7 Q @.Destination := assignLObj[1,row];
6 t; l* p" X9 I9 Y4 n) P l end;
7 A$ o2 ~+ O9 J- I+ J Y% s newDirection(@);5 Y3 @/ q5 W3 s+ H; a1 ^
@.HasOrder := true;
" c! l7 i# M8 M end;# ^5 ?" D. K3 C1 ^5 D H1 k
end;: g _2 L& m8 g, e# E* F; ~% m
end; -- of the method
7 \# u% }, \, I% K. {8 n: j+ H, u' l |