/* called by: entrance ctrl of the object 'track'* l: v) h" F$ ^; E% m; v
*/2 f- P: G, G" ]: n
is
! \6 B9 X7 j1 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; w4 D% s9 j" V: w" cdo. e X% x+ _) Y( q
Lan := rootfolder.Internal.Tools.AOLlanguage;9 H# s; h" h: E# D
if current = @.Destination -- else return
5 q* A; s2 x! d4 O then" }& k( t- U+ }, q) I, q3 Q
@.Destination := void;( B# B- y; ], B3 U+ Z: z
if @.occupied then
: L. O* N8 \" I+ f part := @.cont;, I1 v3 [" Q+ I. `& F9 I) E
@.transpOrder := void;# P( W! n% U4 A5 y5 a" X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# n& W M; q, H @,root.eventcontroller.simTime);
6 g T5 s! x7 r/ S @.HasOrder := false;
. L0 U; I& ~3 k: J$ i" U @.DrivingHome := true;
5 _& E+ _( l P' K! p3 a rgManager.tryToStartTransOrder;/ D- m* c1 u6 ?# `+ a* w
if @.Destination = void' G% ]% o, B: Y7 k
then -- no transport order for vehicle @/ d8 \) P i I' X5 t/ ?1 V& {; J
@.Destination :=
* i1 t4 `& J; S) J; z+ w* T v rgManager.nearestFreeStation(@,track.~);
3 y y7 E0 Q7 o% G" i, r- z# s, A newDirection(@); 0 c' b! Y j/ e# _: u
if @.Destination /= void then% J6 O- W) O% M7 Y' b) |
@.Destination.NumReservation :=
/ e7 ]/ N) k/ c. c1 I) {# V @.Destination.NumReservation + 1;
4 r7 q0 U* |: @9 p j5 j$ y' j5 o ~ end;
L7 N$ a, \0 H* L# b# @ @.CurrIcon := "drivingHome";$ H$ z) ` c+ B. q$ o u# V
@.DrivingHome := true;: N1 y8 Z! t5 c l! L! O! s; t
end;
7 D( n( K4 v7 M' o( U/ S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% e4 }0 x/ Y0 t! @: B part := @.transpOrder;" s4 f, q- ^% n* M* L
part.move(@);-- load part
# C. e2 a+ V* e" d" E" r @.CurrIcon := "load";' s0 V. l. h g, n* |
GlobalDistObj := part.globDestination;. l; y9 V+ m/ |: W! s# p0 ~2 F1 `
assignLObj := rgmanager.rgAssignL;
0 h1 O2 |) Q* I) ~# v row := assignLObj.getRowNo(GlobalDistObj);
$ h9 {% @$ G5 L+ x if Row = -1 then -- since 70
3 M' C, W" ^ l( }, P if lan=1 then
4 H! ]6 c1 C5 f- b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 E! B5 E# p. f* K5 ]
to_str("in der Andockstation: \"",?.~.name,"\""));- g: [( y9 H4 B. L4 E D) ]
else; _3 ? N3 R3 u) v; y4 z1 D" D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 i: B; _/ V4 q- Y
to_str("in docking station: \"",?.~.name,"\""));
3 X9 S6 U* I5 [- D( l end;' I+ _9 a9 S$ E! G1 X' w
else
" t B& }0 {( C @.Destination := assignLObj[1,row];* U$ q+ ]5 P% J g- {4 r
end;
9 ~2 J& M" H7 }5 v newDirection(@);+ E" F$ ?# F# T; T
@.HasOrder := true;
9 A3 O3 K% v0 V* y end;
' i0 `) t( K$ x! Y end;, c; E; }! r4 `! l3 E {2 {
end; -- of the method
A e1 }2 B4 F6 U* D |