/* called by: entrance ctrl of the object 'track'
) D% X( ~/ b ]( d, p2 I*/
7 g6 E, Y, o; a+ t9 Jis) y$ N7 s$ \; Z( Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& r( g4 R+ z/ k3 f
do
: F" N y2 C% t2 R. s7 Y8 D4 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
* s2 {/ o3 n* ~3 A6 J" V if current = @.Destination -- else return" M- |& B. V$ O- T6 y
then: r# U' c6 x) c- m8 C2 O8 A
@.Destination := void;
+ ~' V e, ~1 }: }5 v9 U( _ if @.occupied then0 y" N" W9 Z, f4 |9 l$ L2 a; J
part := @.cont;
- }7 [; x' _$ g% c2 r @.transpOrder := void;
- H. b3 f) e( U% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; s6 l0 d9 ^; c4 Q @,root.eventcontroller.simTime);$ c' C, h2 c4 v7 i1 \9 T: S: X
@.HasOrder := false;
8 y# C8 T2 e) s/ Z" R1 P @.DrivingHome := true;
f, s2 b% y! y+ C+ f rgManager.tryToStartTransOrder;
2 i1 Q, ?% f# g( s1 @ E if @.Destination = void
6 v! e' b! U% }: W then -- no transport order for vehicle @
; ^/ Q: R" L, c: f. {1 F1 z @.Destination :=4 R% u4 l/ k. ~! o
rgManager.nearestFreeStation(@,track.~);; S4 o* |: Y6 N1 R% k: q
newDirection(@);
6 E( P( E, ^/ b: W D if @.Destination /= void then3 R" y5 N6 m3 q6 S
@.Destination.NumReservation :=
9 }+ u0 I/ e3 Z9 t @.Destination.NumReservation + 1;
' p1 h2 n. |' t" C3 M4 l end;8 ~2 ]+ k2 E, C ^( Z
@.CurrIcon := "drivingHome";
: {; I" v, J1 i8 t/ V6 Y @.DrivingHome := true;) Q& L' z# l f& i: v
end;. h5 \" ?8 B( U2 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S6 I# b' P, p6 { part := @.transpOrder;( b9 H5 D4 y$ Y$ T, q
part.move(@);-- load part
: l, z& G; B! }6 I, [2 N0 W4 D @.CurrIcon := "load";+ H. ?! i8 U9 n- @$ p: s. W
GlobalDistObj := part.globDestination;$ O3 k+ Y5 ~7 h& Z# n" O4 s
assignLObj := rgmanager.rgAssignL; N1 m3 y' \4 |+ e# s. h( \! c
row := assignLObj.getRowNo(GlobalDistObj);$ U s; w2 m" D& U3 `0 K
if Row = -1 then -- since 70
& a2 _' u6 u( F$ f& n! |' h7 j if lan=1 then
% D7 D0 ?" z9 F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E- B; {+ K# ~3 C2 s7 k2 Z! s
to_str("in der Andockstation: \"",?.~.name,"\""));3 H1 f' M4 x+ h4 x
else5 @8 ]! a' J [" }' w6 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! P4 Q- A5 Y8 \. v" W to_str("in docking station: \"",?.~.name,"\""));
2 z2 A \0 S% s8 U# S* x! L; e end;
% p$ K" f& D, W else
9 G# f1 S2 u8 M+ f @.Destination := assignLObj[1,row];' p/ s; q0 L F- H6 Z; }! N
end; 8 @ Y" U. G+ m; T3 R- k+ T) V/ E5 @
newDirection(@);
% ^% b& T3 K B ~$ w" ^' i @.HasOrder := true;
4 ?& B9 Z$ m5 D end;
1 Q$ X$ t Y. Z7 X# z end;* s5 b0 y% ]9 T: D
end; -- of the method# r2 h2 z. @7 m) i9 w5 B$ m$ ~ l
|