/* called by: entrance ctrl of the object 'track', w9 i7 ~8 p; L$ M
*/0 S. s2 y$ `: ]
is1 F; v5 [' n& B3 P9 _* [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 @) Y! E% u4 ^- Ido
3 b# }0 K" v: _; H Lan := rootfolder.Internal.Tools.AOLlanguage;
8 S% ?5 h8 x) r" V6 h) q if current = @.Destination -- else return$ m2 c; r0 L$ c, o) [5 q$ H
then& H/ d D' }' o# n$ B
@.Destination := void;
/ J! A( M1 P, G5 V8 e4 o if @.occupied then4 {8 ^, U1 d" |% p0 ?# q1 m6 F
part := @.cont;9 f2 z2 O( T2 {% m1 E
@.transpOrder := void;1 `8 o7 a, b8 d- P3 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% f* {4 Z9 h2 O
@,root.eventcontroller.simTime);& \9 W6 S$ s% s, \0 k% U
@.HasOrder := false;
6 j, I, W) R6 m/ ] Z @.DrivingHome := true;
6 y7 P: B- n( d9 Q { rgManager.tryToStartTransOrder;
' x6 ~. q2 ~! K8 }' h8 @. ~ if @.Destination = void6 @7 B: F, I1 c3 z r
then -- no transport order for vehicle @ E* ?8 z' n9 U$ d
@.Destination :=# d J& ^" a4 V4 B* n- O
rgManager.nearestFreeStation(@,track.~);7 }7 ]4 \/ ^% F5 O0 x3 i
newDirection(@);
7 Q7 z% |5 c0 M# A* b if @.Destination /= void then
5 c% h2 C4 z1 `9 ]# F5 D3 C: } @.Destination.NumReservation :=
" D4 o0 w+ ?# ~8 \+ | @.Destination.NumReservation + 1;& W _/ u9 d" }6 A! M/ v
end;# Y. m2 H+ r% \2 Q: T2 n, C
@.CurrIcon := "drivingHome";$ f6 r/ [' l0 K0 {" W: s- Z) K! x7 H; C
@.DrivingHome := true;
+ \; t- i$ e/ D+ i/ `* ]4 p end;0 Z, U' f" |7 R1 O" |! b5 P& c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: {- O. m5 u% [$ ]; c+ n- M
part := @.transpOrder;, E2 p$ X" }0 T% g6 L6 I
part.move(@);-- load part% U& J4 u& G0 D4 c/ T0 z
@.CurrIcon := "load";
+ X0 O: e, L8 h9 ^/ J9 Q GlobalDistObj := part.globDestination;* W8 c. ]( X/ p. W. i& F
assignLObj := rgmanager.rgAssignL;
' \3 B3 e/ S; S0 Z# t8 ]7 j row := assignLObj.getRowNo(GlobalDistObj);) E' H- s8 F9 V
if Row = -1 then -- since 70
# u# c" ~8 B, e if lan=1 then r) O- k r1 Q8 |. R, s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ y1 {8 i# V1 c to_str("in der Andockstation: \"",?.~.name,"\""));
* p% e' F) t0 }. V- r else
: Y J% L$ ?: F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; {5 }/ x0 h4 }6 W) n# X! Z
to_str("in docking station: \"",?.~.name,"\""));
, Q6 J! g% r2 _8 O; P. _0 v end;' n7 c3 m1 X6 j- K
else
' F3 k6 o- @/ p: p4 i9 T( i @.Destination := assignLObj[1,row];, n( `- F6 X' j8 \1 b
end; % ]7 w. q; Z0 J; q6 g; b
newDirection(@);9 q9 {7 t2 s. h) Q7 c% V
@.HasOrder := true;/ r! u: H. O9 P. m. C `
end;8 v" Q; B& W3 `. l* f: R2 z: d
end;
( g# E- }- @1 C6 w8 b" Send; -- of the method
L8 U3 N2 C& V( o# e& J |