/* called by: entrance ctrl of the object 'track'$ U! F# T( a# w V7 z1 z
*// {. O( [( C9 V4 J9 ~
is% |/ M* I4 o* b+ o2 R3 V7 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 @7 r* [& [, E$ pdo$ P2 p" ~( i" a
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 A9 H$ o3 R% | if current = @.Destination -- else return
, Y+ b# e2 c' K! [ then
6 I' H6 V+ |1 t @.Destination := void;
& a& b5 w# \3 j0 J if @.occupied then
4 X, a) }& W( T5 j# u( D part := @.cont;
5 d3 Y4 v& h. |' u# C @.transpOrder := void;
; I! H9 z7 g f) |, g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ^; X4 o, z, m: R/ p
@,root.eventcontroller.simTime);
( r* q* `8 I! `2 R @.HasOrder := false;
3 y2 Y) ^) y$ O T r8 y6 [0 { @.DrivingHome := true;: C2 o( q9 Z8 x. { L
rgManager.tryToStartTransOrder;7 @$ h7 f6 V: p2 [" E2 o) ]6 z
if @.Destination = void4 t$ K9 }4 x4 Y4 _- w3 `
then -- no transport order for vehicle @
/ e7 v7 [( Z0 d3 D1 r! u/ I @.Destination :=/ K/ o! O: G8 L) a
rgManager.nearestFreeStation(@,track.~);
* ~3 |2 `1 L$ C newDirection(@); ) R, W& ]0 H9 b+ A7 u2 ?
if @.Destination /= void then0 `- m5 I" ~6 \9 g
@.Destination.NumReservation :=
# S8 Q' i* e+ Q0 K3 s @.Destination.NumReservation + 1;5 T# K5 L* [0 L. Z% N! ?. O9 _ I( b
end;
5 m* O) }# N( ?- y. b, c @.CurrIcon := "drivingHome";. V. f( u! O, G4 E. m+ |- q
@.DrivingHome := true;
8 R4 v- P& P% e, K0 | end;) K( |8 A y2 E0 `1 e! D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% ]+ D5 Z% X; {6 q y1 [5 L, L part := @.transpOrder;
2 ^3 A" u/ l( b; b( ]8 N part.move(@);-- load part
% L4 p' q" ^) u7 s* S0 _8 [ @.CurrIcon := "load";% }* A' V+ D. k* v
GlobalDistObj := part.globDestination;( v; f9 `0 x! t6 C; l) U
assignLObj := rgmanager.rgAssignL;
% N. E4 T$ B a, V row := assignLObj.getRowNo(GlobalDistObj);2 K" A& `" P1 `- b! Y2 r P
if Row = -1 then -- since 70, w' {7 T( ?( n, K$ x, @
if lan=1 then X' R/ {: L8 V7 w3 X/ M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! F9 C6 h, g3 j7 a0 A to_str("in der Andockstation: \"",?.~.name,"\""));
+ W( a3 @; X, W else
7 Q; ?7 V+ c* h9 R8 ^- w4 a; b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 I( ^, `, I! y" |, G4 Z8 n& e" J% j to_str("in docking station: \"",?.~.name,"\""));
N$ h* M( x# Q p- p end;& \' I# C& r d0 a8 C
else
/ `! y" ^% c5 `7 \# U; i @.Destination := assignLObj[1,row];/ e/ I: @. s1 p! Z2 G( h
end;
7 O' ]- }* r1 L' X- B: W/ E7 T newDirection(@);
, h/ m J# L) n; [5 w6 t m @.HasOrder := true;
0 l* J! p/ `! S# Z4 o" k end;# w. A8 Q0 A) J# }$ g
end;
& I1 Y7 M! y& l2 `! P0 U! I0 ~$ rend; -- of the method
0 Z/ c% q' }6 t ~9 K m |