/* called by: entrance ctrl of the object 'track'
- q; g) k+ C0 v' ~, O1 S1 X: j*/, l' d% ^2 X) U, J- G
is
4 k, w" F7 U6 r7 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ r3 a: O- J2 X& c( W8 f O2 g
do. L5 C2 O. O7 C1 ^& Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
. Y" D, i) I: @4 T; ~; Y! F if current = @.Destination -- else return
( G" h0 Y# ]- |9 D7 Z# a then
' H5 J# Z/ L C6 _# h @.Destination := void;
* U5 T( C9 R3 T if @.occupied then
/ r4 w% H5 O6 Y/ y part := @.cont;6 G- u; W" _6 t, k8 t0 S) S- e Q. A
@.transpOrder := void;0 P" R, ~9 v5 x0 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 W( g" D9 E+ g ] @,root.eventcontroller.simTime);' A3 G2 T: z; G# W
@.HasOrder := false;
* z. J4 k* L# O( L; c9 v @.DrivingHome := true;( l; m. _; o* e4 }5 u& V
rgManager.tryToStartTransOrder;* Z6 k1 R: O t
if @.Destination = void
) x& @7 o, @( D3 G$ x then -- no transport order for vehicle @# |! ^% ?4 b: c4 @
@.Destination :=
2 k+ e: K4 A' h9 J. B( M rgManager.nearestFreeStation(@,track.~);4 r8 Z- k: U) d, L- |$ n! a3 {5 i
newDirection(@);
8 b" v( k# ~4 p$ M8 v if @.Destination /= void then0 N9 |* w2 @* K6 h
@.Destination.NumReservation := D5 q4 y0 h# m/ }: K- |
@.Destination.NumReservation + 1;
4 n/ L" \, x2 d end;
- c' y9 C3 M! `$ v+ o% U, j2 o$ k @.CurrIcon := "drivingHome";0 v$ N. w+ B: R0 [
@.DrivingHome := true;; J' X4 j* V/ n) \6 @
end;& p- L" g6 o) D1 j/ S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 u6 A4 j9 R9 I! R+ K
part := @.transpOrder;
5 D2 K3 W5 ^3 ]0 S0 y part.move(@);-- load part7 B( e% w* q: U$ K
@.CurrIcon := "load";
# J! f$ j- c1 o5 H {4 e- G: N: M GlobalDistObj := part.globDestination; g- y7 A1 @$ _; E8 r$ B
assignLObj := rgmanager.rgAssignL;
! W I; T8 [, W Q5 u5 d7 y row := assignLObj.getRowNo(GlobalDistObj);
Y5 K# ?8 L: b) X( C( x% b' x0 f if Row = -1 then -- since 70
9 V: R0 S8 N/ ?+ y7 @9 }2 j if lan=1 then
' i% P, e' ^ M N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( A$ P# q8 {, c5 t
to_str("in der Andockstation: \"",?.~.name,"\""));
; z3 t2 }# P( Z0 g: X% W$ Y4 W else6 i& d9 ]! |# F" c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 T- Z7 a; ^8 _ to_str("in docking station: \"",?.~.name,"\"")); 2 `) p }# L) H7 G* D; @' s
end;% f- W3 z [$ R
else# {& k2 ]% z) K3 \( N, x7 }
@.Destination := assignLObj[1,row];
% g1 S3 J* v$ `2 X0 o+ N7 R% s end; + F$ [+ @2 W1 O7 ^ J- J) C
newDirection(@);- [" |# x+ i' c* S$ F" I) S* q& a
@.HasOrder := true;
$ h* D: k2 F1 } end;0 h: }& X" n9 Q+ _1 @9 R F9 K
end;
' Z# Z) Q6 o0 J5 a/ Send; -- of the method
2 s+ ?$ L1 S$ ] v |