/* called by: entrance ctrl of the object 'track'
. d5 e0 A5 K% c9 b6 \*/9 V: r! [% t2 T7 S) j1 ]
is6 C/ }% {4 X. \2 Q: O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 s3 U6 \ i& w: N8 ydo
4 M- I" s, C- Z7 y* O4 @ K Lan := rootfolder.Internal.Tools.AOLlanguage;
" E0 z- i4 Y9 s6 P' L if current = @.Destination -- else return, W9 X" `) d. @2 g) \/ J# C& Y
then$ {. i: }6 B7 N' A' r" y
@.Destination := void;
; f" {& U2 R, h- z1 w' s if @.occupied then
8 T' w6 \" Z/ H- ` ~& p2 Z part := @.cont;
5 l+ W4 Z; A0 G) g9 B; o @.transpOrder := void;$ p$ Z4 m+ [. [9 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% U4 G5 R& S4 d2 t7 r& g
@,root.eventcontroller.simTime);' T# ~" I& \' W
@.HasOrder := false;
" Z/ g8 W0 W, U: y# ^( { @.DrivingHome := true;
1 r+ d' J9 |* O, L' {+ A/ h) A, l9 W rgManager.tryToStartTransOrder;
0 |* k0 ?4 w1 r6 @6 Z; k; t if @.Destination = void
8 F% |! Y! ?* @ then -- no transport order for vehicle @- C( j+ ^4 {/ _, A2 f9 X1 M
@.Destination :=
8 P; E' W( G. }! t! G3 \ rgManager.nearestFreeStation(@,track.~);, }' L8 V* {' A7 r4 y; ^: V
newDirection(@);
" d/ Y7 Y) {8 m+ t if @.Destination /= void then
5 N/ h9 e4 T% }9 r- _ R+ M @.Destination.NumReservation :=3 ^2 {$ N* y- N8 W2 F
@.Destination.NumReservation + 1;5 p( C2 C, ?" W& _
end; @ U( y$ Y. G8 D1 [, K
@.CurrIcon := "drivingHome";2 A k3 u) U @/ @ {) `
@.DrivingHome := true;, ~$ X8 ^: @2 h, k
end;" \; U$ Q0 ?" c/ `% ^$ R& v2 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; a* i: K+ b- Z part := @.transpOrder;
2 o8 X. ^; B" x, I5 I5 O: k: J part.move(@);-- load part' F1 e P+ A. o0 d# V1 B( _
@.CurrIcon := "load";
: W: J6 n$ L/ {0 k GlobalDistObj := part.globDestination;
% c& n/ _7 \! I1 F$ J0 D% h9 [ assignLObj := rgmanager.rgAssignL;
, C4 g& k5 i7 a( G row := assignLObj.getRowNo(GlobalDistObj);* h- Z3 ?3 l) d' j* A
if Row = -1 then -- since 707 ?0 ?0 r! p/ }; j
if lan=1 then
6 s1 O; d- T9 O) y5 E9 P0 r6 m/ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 U5 H' v9 B2 |( R. E5 T* R to_str("in der Andockstation: \"",?.~.name,"\""));
% o* G1 o9 s6 J G S7 j else
" E3 _9 w- U7 U# ]9 |4 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* t5 w6 Q' n1 g0 ^
to_str("in docking station: \"",?.~.name,"\""));
# a* ^" a% z: N1 N end;
7 z1 E2 l6 d* O+ t& R9 c7 z" U W else
# y, r/ [6 t* {2 k# g8 V4 y" A+ w. Y @.Destination := assignLObj[1,row];( V. T% Z7 {1 O' v1 a# A4 y( V
end;
6 W6 G4 u' E, T7 l& b7 D newDirection(@);
: }3 r: s* c! m" T) i @.HasOrder := true;! i: @" r0 X' Y* W- F) K
end;
! }& a: M6 N; [/ M% a" L, K end; L( V; H" t% o6 |+ f) k# B! P0 R
end; -- of the method. s+ y# E* X7 w) I; I7 j, `
|