/* called by: entrance ctrl of the object 'track'
8 I, D: c; k3 f) Y9 b*/' L$ e, P6 X2 o1 {" Z2 K
is7 o* c- I/ Y8 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 u: M7 K( G: ~# udo; S- B/ q! I6 h
Lan := rootfolder.Internal.Tools.AOLlanguage;/ h, c. x4 u9 [0 f8 j ?$ F
if current = @.Destination -- else return# z* a- f( V% Z Q
then; l3 F* Y$ z% W8 I$ q+ z
@.Destination := void;+ @( Z7 y/ N; O; I: Y4 ]
if @.occupied then
9 [0 [' P1 @$ n4 U/ N' ` part := @.cont;1 \1 ?' q _- V
@.transpOrder := void;( e5 d- C; W8 ~+ x, Z, d R1 m+ H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 H6 Q" q' q# f, g; o; f @,root.eventcontroller.simTime);2 q2 N8 {7 J! ]
@.HasOrder := false;
* }9 _- w! T: D! T' \2 J8 M @.DrivingHome := true;
% Y( f6 N+ C: v8 l/ x0 e rgManager.tryToStartTransOrder;
6 y/ z/ _* O3 v5 b0 _; N3 k if @.Destination = void( L, c- y! _+ V+ j9 o- u
then -- no transport order for vehicle @0 c% x9 Y& L# Y6 {
@.Destination :=" \# J( z9 y1 s- ~, k3 h8 K/ {
rgManager.nearestFreeStation(@,track.~);
( A. D; c! _$ \3 F9 \3 Q newDirection(@);
' M$ L/ v' j, H6 g5 A, a* \+ o1 N E if @.Destination /= void then$ l- M, l9 C# R) g% L
@.Destination.NumReservation :=6 h" @ |+ B& H! V2 t9 q
@.Destination.NumReservation + 1;
P' ~# `. p$ K0 I5 I5 D end;. g# a- a7 t! ]7 @* {
@.CurrIcon := "drivingHome";1 d8 S% E9 C* \+ P
@.DrivingHome := true;( y0 s3 n( @ ?
end;9 k# H/ d3 Y2 e$ A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 d/ y7 e! D- f) p6 B2 {
part := @.transpOrder;5 ^7 ], K3 z% U( z
part.move(@);-- load part
" G# x6 \# J$ H6 z" d" m) b ] @.CurrIcon := "load";! o; }5 z9 }0 J4 b6 l. Q
GlobalDistObj := part.globDestination;
4 J: a# c3 f! o9 j4 T assignLObj := rgmanager.rgAssignL;
v) t. P- E( O* Z9 T6 F* A row := assignLObj.getRowNo(GlobalDistObj);' }1 @9 x- T+ w- f& I, d v
if Row = -1 then -- since 704 o% L% b8 w f6 t2 s" E
if lan=1 then9 ~& v8 l9 t! M4 U% o4 C1 A3 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" I' ~: } u) F, l9 I2 c to_str("in der Andockstation: \"",?.~.name,"\""));! p* ~# H x- a7 ?' W9 \7 A
else
- h% d: Z, w6 e3 ~2 \! B7 O5 }3 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! T% g% E' u/ O4 y \9 G4 }1 x: E' W: e to_str("in docking station: \"",?.~.name,"\""));
+ Z a7 P+ o2 _5 E3 S5 L- Y end;4 _9 _) C9 h! c$ h- ]! c
else9 H h* }% n1 V: P; |1 W0 d
@.Destination := assignLObj[1,row];3 T, U% q& j2 G5 x& \
end;
( T5 ?/ e2 z8 O$ M) |$ m s newDirection(@);
0 T" X" }' z. Z4 N @.HasOrder := true;" {7 L4 {4 n: W' ^- ^! Y
end;# Q* n/ f6 ^! b7 k" U: S4 c
end;2 [1 W2 _/ o: ^
end; -- of the method
1 F' L0 j' l9 N5 c |