/* called by: entrance ctrl of the object 'track'
: S/ k# v$ G, o' p6 \$ x- n+ ]*/1 g6 W4 U% }, s. L
is
3 t F# L- ?" p# I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 M& u# D7 E/ I4 q* b, I' w" n" p8 Qdo
- L7 N6 [. ^ Y8 k Lan := rootfolder.Internal.Tools.AOLlanguage;+ u0 | n l1 e) Q& `) ?# C
if current = @.Destination -- else return
9 l( Z3 f7 ^ u M! S then: I9 {& _9 t# @
@.Destination := void;' b0 U, E$ s& @6 @; m
if @.occupied then
6 x* N3 S: N4 y5 c part := @.cont;1 c D; x* q# }' e8 H) x
@.transpOrder := void;
9 ]* q# M8 X& n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 `: n% ~6 J7 o" L, m& ~- u- m @,root.eventcontroller.simTime);
3 ^0 T$ S5 m) i: d% `. f8 r& ? @.HasOrder := false; X/ w2 U" e/ B0 `, }9 q
@.DrivingHome := true;
) w, n( B# L- i2 k+ O0 a; u rgManager.tryToStartTransOrder;
4 c6 l& R! t* g7 Q if @.Destination = void4 J* @) D2 h% |2 {4 u
then -- no transport order for vehicle @' M% u" |3 K7 W; N: Y6 f. `* M
@.Destination :=
& ~) M' v1 ?4 l* ]3 }* P" T rgManager.nearestFreeStation(@,track.~);; t" U9 J1 m; u! _9 ?, h, ?6 C
newDirection(@); , P* t/ T& K7 b. ~* K" H
if @.Destination /= void then
( E' B0 u' _6 _ @.Destination.NumReservation :=
. o* {; q9 _; \ @.Destination.NumReservation + 1;
6 t1 f' W8 M9 Y% [# V end;
. W: I6 L* T9 W$ H9 y4 g @.CurrIcon := "drivingHome";
' ^; z7 S% `0 y8 F6 J5 L- d @.DrivingHome := true;" I0 P6 ^; O) g( Y5 a; j7 w
end;8 W6 t$ Z6 P: e& }+ A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; C( c0 d( j5 K, l' }* o# ] part := @.transpOrder;
" u: l! C# p# D part.move(@);-- load part
( Q0 e/ g( s7 E5 @ @.CurrIcon := "load";
: P) v4 C, x5 B8 x- @8 N+ b' X; L- p GlobalDistObj := part.globDestination;! B5 z; X, ]2 l" _- i9 [# t" i) B
assignLObj := rgmanager.rgAssignL;6 r/ p' f; q: o2 d" X
row := assignLObj.getRowNo(GlobalDistObj);
; y0 H- \. W: N" } if Row = -1 then -- since 70) A$ b3 z' w: [" U4 W9 [' B6 b/ ]- _
if lan=1 then
+ _- ]0 t J" u1 h' d5 J9 i$ F5 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 Y2 E' i, \1 R$ @8 _* e to_str("in der Andockstation: \"",?.~.name,"\""));
/ A B7 @6 ?/ q else9 J; N6 i& ?5 X/ T ?: |: u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( _7 |: J) S7 h5 M, w
to_str("in docking station: \"",?.~.name,"\""));
5 [; u I1 }7 E end;
: p. Y/ S! g% y* }$ B else
# ?. i m5 N( N* h @.Destination := assignLObj[1,row];2 F' \ B, V2 M* l% x# y
end;
( {) X! H7 I' o# h newDirection(@);
0 E1 A `- N, \" t @.HasOrder := true;9 V$ K* I4 F5 c: I
end;; u3 @3 _. P0 L, }+ L0 W5 z
end;" h3 z. L1 \8 E' ~5 @ N/ r- A( G
end; -- of the method
9 \# R$ G, {6 w. O |