/* called by: entrance ctrl of the object 'track'& d( q" p1 F% `9 [0 d: B6 D$ F" a3 q
*/
$ J/ y$ A( O% r1 Qis4 b3 H( K7 x( a/ ~+ ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& D" Y, ~( B. g% ido4 t# B/ D6 I8 w8 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ T8 Q( t/ X% v* m6 Y* Q' a- K; C; @ if current = @.Destination -- else return+ s \ ^1 R Y3 t# W. @$ o% I
then
. }; @/ B. O* c8 G* n @.Destination := void;
& K" O: S7 H$ l9 A9 ? if @.occupied then
o, Y5 R5 m- \% A \- ~ part := @.cont;( w/ c. s4 E r9 N! ^8 C
@.transpOrder := void;
9 y$ z' p* s4 J' F0 W+ R2 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ^1 l( |5 x2 M
@,root.eventcontroller.simTime);
& `+ z4 q% H, i }% t3 K @.HasOrder := false;
+ t: {4 @. u" M) |& T5 z @.DrivingHome := true;( N/ F; C6 L$ Y, S) e0 V( i
rgManager.tryToStartTransOrder;
, U& e& q# m, @( G5 p3 Z if @.Destination = void
1 ~+ x) j6 ^) @# k! R% Z7 z/ ` then -- no transport order for vehicle @
9 T7 u2 ~* s1 l# D# i, U1 j @.Destination :=
3 H! A1 c& N1 E$ p0 s8 Y6 D rgManager.nearestFreeStation(@,track.~);
2 f) @6 u P4 F$ Z newDirection(@); : [7 E1 Z" X X1 q9 ~( S- m+ I
if @.Destination /= void then
6 {' S+ }) g( m @.Destination.NumReservation :=4 B. Y! |9 S0 ?4 K; U o: Z
@.Destination.NumReservation + 1;
; C2 J8 Y: M( N0 V, A# @* o8 Y' J end;
& A3 z. L2 ~( j @.CurrIcon := "drivingHome";. }5 Y [* l; a; `: T6 _
@.DrivingHome := true;
, m; U( j% }9 r1 ~* r end;
- J3 w8 k7 d6 J3 l; ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Y( Y* o+ b! [) L
part := @.transpOrder;" @. i/ {- J4 i% }5 B, Z
part.move(@);-- load part
) R3 h( H3 }+ c( t# e @.CurrIcon := "load";) Z$ k2 s9 @* @
GlobalDistObj := part.globDestination;
# i& P2 S b; p2 W# B' X3 T assignLObj := rgmanager.rgAssignL;8 z, o a& e7 @3 u5 Z, C1 l: ~: @
row := assignLObj.getRowNo(GlobalDistObj);- U8 u( q" ^$ h* x) G+ c% {+ C
if Row = -1 then -- since 70* ^' }0 @: @+ w7 R* f! @) B! R
if lan=1 then6 C1 I( \2 p" Y% R$ K3 c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! e1 G6 u9 H. C$ d to_str("in der Andockstation: \"",?.~.name,"\""));
( E! Z. j5 S" i8 [/ a+ Q else
/ B/ p# G# e f6 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' p6 ^6 l: k+ }. F3 p: F, B; d4 C
to_str("in docking station: \"",?.~.name,"\""));
' {) @/ `( S: W3 B2 p end;
3 {/ n3 n' l' g) C6 V: a! I else
+ h, H V' N, \ @.Destination := assignLObj[1,row];
6 K# N3 H) v" J end; 5 s; C2 h# C$ v m7 m# C0 A
newDirection(@);
/ I; Q q5 @" } @.HasOrder := true;
" J- S% p% E) Z( F- v9 _ end;
! i7 P7 E) s& N+ z9 a. L end;
& g$ ^! w) c5 p% Zend; -- of the method: l$ T/ o$ h; P) c
|