/* called by: entrance ctrl of the object 'track'( I; J8 C* e! o) e$ o' i" `& v2 v6 D
*/
5 a5 }+ T9 G* X/ X2 Lis9 _- V8 p: u+ B; H& D. E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ?& o' B s7 E; z
do
7 ~$ t! T, e) c1 U' u5 h9 I) N Lan := rootfolder.Internal.Tools.AOLlanguage;
{2 e6 p; ?9 b% Q/ O* x# K( d if current = @.Destination -- else return
% ^! V& G+ y3 D+ D& r6 j then
6 l, D9 r, R0 P- [6 f! A @.Destination := void;( e& x. s5 J& ~9 I5 ^( k! m: D
if @.occupied then
0 |9 I, M. B d, @0 G. o& T part := @.cont;
( A6 M% i& x7 T% B @.transpOrder := void;% J! Q% @- n) b6 `9 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% {5 L l E& n3 V0 s" D) U @,root.eventcontroller.simTime);
) N( | g: b% n7 K2 r @.HasOrder := false;
5 E* j" } {" H" H3 d. n @.DrivingHome := true;' Q) q! u& E0 H) ?8 z* q/ s
rgManager.tryToStartTransOrder;
, M" J7 M; d0 W f if @.Destination = void
0 M0 [2 f2 ^: u then -- no transport order for vehicle @
$ O4 Z7 c' d! A" D @.Destination :=* y+ P# f) j5 z
rgManager.nearestFreeStation(@,track.~);; h6 L' X2 I+ o* A T
newDirection(@);
, q8 ^' w1 _7 ]( u( U if @.Destination /= void then
$ M. s% x. v1 N2 w' k1 J3 K/ [ @.Destination.NumReservation :=9 m% y1 s0 S9 O0 z, [: B
@.Destination.NumReservation + 1;- V) j5 F+ N+ g) j% `& ^* V
end;. R. _/ q' k7 u- `; Y8 Z! M
@.CurrIcon := "drivingHome";
7 N8 V4 X2 z X' u' V @.DrivingHome := true;" N1 G( \! m w# @
end;0 S& T1 X1 k7 I7 [/ _: E' F: r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i; R. Y" \8 b- {. }) k
part := @.transpOrder;
# ]$ d9 @0 C, m- r8 {2 _ part.move(@);-- load part( l5 o0 a0 d' p* l1 \4 R
@.CurrIcon := "load";
) {$ s& B: h4 C8 w* @) V" N GlobalDistObj := part.globDestination;6 d3 Q1 o2 z' }
assignLObj := rgmanager.rgAssignL;
$ V* U2 f; w( M+ z row := assignLObj.getRowNo(GlobalDistObj);
5 [& S0 q+ F" `8 a4 w% ~ if Row = -1 then -- since 70- y* N. m! c. e% [: r
if lan=1 then' c9 O9 ^% ]+ D3 o) H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 b9 q# @/ L6 q2 v. p to_str("in der Andockstation: \"",?.~.name,"\""));
# |! l7 `( Z2 q9 | A* S3 z, N else1 B: m7 f$ x( A$ u7 @8 b9 {0 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* j; o( a3 g Z/ x# c to_str("in docking station: \"",?.~.name,"\""));
& ]% _8 z. i# R/ Q5 X2 n end;3 v1 W& K" i: M3 O6 }* p, {+ g
else
" X+ g8 E' \& a o. b @.Destination := assignLObj[1,row];5 O) c2 \7 X2 ^
end;
- X* q9 v7 O1 [1 P newDirection(@);
5 C# {$ l, H6 L$ S5 o @.HasOrder := true;1 g, J9 _4 C/ e! y3 i7 C# a
end; a4 G7 X, P; ?" v0 u
end;
0 J0 f5 K, o, O: G8 X9 N, K: {$ `end; -- of the method
( I$ s8 k' z' s- l. f |