/* called by: entrance ctrl of the object 'track'5 h" d9 U3 s" e7 g @
*/; s! i8 n6 } n+ `2 U0 P
is
# M! ~$ {6 ?. g L! h% i' Q o part, GlobalDistObj, assignLObj:object;row,Lan:integer;) @& l( {" w1 a9 W" z' I- }& l5 C
do0 o$ u! m7 z; I) ^, v2 a! @6 H+ G
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 }% y, ^% `& F. D; J0 B" f if current = @.Destination -- else return
, a) Z% A' A- p: r d: w then
& S5 A1 X! s. ?- w. y @.Destination := void;" C( I# a( [5 M' ?
if @.occupied then
3 Z7 v/ X4 u# L5 J- U; v part := @.cont;" N7 D7 ?; r6 Q- j$ b
@.transpOrder := void;
) P% i; ^* y, t% ^! x5 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 a1 u6 ]6 t6 U0 |' t; C0 W @,root.eventcontroller.simTime);: z; O" H8 Q+ x) b8 y1 j
@.HasOrder := false;; [5 [4 l% C! Y8 F- i9 N
@.DrivingHome := true;
% g- {2 l; \) m G0 u1 i$ k/ D rgManager.tryToStartTransOrder;& R2 m3 ~8 c9 w ~ M
if @.Destination = void
1 v4 ~. ?- k' T/ \- R then -- no transport order for vehicle @+ O7 n2 p \' l k$ |
@.Destination :=
" ~1 \9 S: H6 f rgManager.nearestFreeStation(@,track.~);
! w6 a7 J( X2 s2 z% n9 ^; C& x+ { newDirection(@); 3 A8 w' w- A4 e* }* S' h
if @.Destination /= void then
2 e+ W) @8 @4 R% I: H' c @.Destination.NumReservation :=, g9 Q3 f+ w) d- ?, P9 `4 c
@.Destination.NumReservation + 1;! w$ d. B' J& Q) x
end;) d0 p" N3 \1 h
@.CurrIcon := "drivingHome";- r( N$ u: p* m$ |, ]% ^! |
@.DrivingHome := true;! H* W# b* M8 U: f& T+ m6 V6 i
end;% H X& |3 K9 f* C" i4 t4 V+ p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" [( G, V1 G6 ]5 Q part := @.transpOrder;
/ v, u6 R) @1 Y. L W X part.move(@);-- load part
7 a0 ~; Z) u- h8 w- d; `: i7 t @.CurrIcon := "load";
( V3 @/ _. Q4 `& m# S$ _ g& ` GlobalDistObj := part.globDestination;
/ ^* G1 {/ N7 A+ Z; D+ m* A assignLObj := rgmanager.rgAssignL;3 f% U- D U7 N& H) i' R/ T
row := assignLObj.getRowNo(GlobalDistObj);
" |0 X) y6 B0 C: c if Row = -1 then -- since 70
+ C/ ^2 \* a3 i# X: U Z' V if lan=1 then) P% p/ z! ]# @7 {- g, b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! u5 n, V2 h; Z
to_str("in der Andockstation: \"",?.~.name,"\""));
Q& }' i" C& }: I else
! ]1 b+ _) q! n J. M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 Q2 @ F% v4 f; O) ~ to_str("in docking station: \"",?.~.name,"\""));
) |* b2 {- \* @8 `. z, B end;" M( C4 C: W! w/ B8 X
else
0 z( E2 c# q( f8 s @.Destination := assignLObj[1,row];
1 a% c2 W8 B* h. V2 f0 c end;
$ q1 s6 e- O) P4 r4 q newDirection(@);9 A( l) c! @6 ~- X2 ~3 E+ o) e
@.HasOrder := true;
6 C- ?+ C/ j! C x1 s( |) k* f end;
; U: }2 i9 K& \" a* z: N1 |6 Z end; C; C" J3 b% _' k: _6 \
end; -- of the method
, `; _& U0 B$ w8 K |