/* called by: entrance ctrl of the object 'track': q2 u- {5 P* {# U2 ]2 ^4 B1 P) K
*/
u0 F D, M3 q# C' ris3 O6 v2 v7 Y# \* S h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% {6 N5 X, ?0 i8 W8 Edo
* {: Z* D0 n! p1 [) A9 p Lan := rootfolder.Internal.Tools.AOLlanguage;
! k3 ~6 _5 T- V. b3 ^+ S; ^' p if current = @.Destination -- else return( }$ S/ @' Q' U
then
1 d# t+ x( |7 l @.Destination := void;% T! {) y/ Y/ l5 @& C
if @.occupied then
% l' k1 o5 V6 i6 m* M0 w part := @.cont;" d6 C3 s0 _8 h3 ?3 l
@.transpOrder := void;
8 N: T3 G: }7 b O! j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ C2 R$ }; g( G6 O* r9 P
@,root.eventcontroller.simTime);
9 x: U" @+ [1 K: N @.HasOrder := false;5 L" }! t5 R3 a& k3 Q
@.DrivingHome := true;
' J6 M: r: c2 p6 W' C rgManager.tryToStartTransOrder;
( ?$ F8 z7 J2 s& L: _" |, { if @.Destination = void
! j: r4 o2 ~, \% j then -- no transport order for vehicle @* j- E* X# P$ n# g2 Q9 a" {
@.Destination :=( z6 h- X( b$ K! M
rgManager.nearestFreeStation(@,track.~);% D8 }8 v( }3 i$ U U
newDirection(@);
% \$ w0 ^* i" F. x' }( x: N+ H if @.Destination /= void then: j- x0 f" O9 P2 I/ B
@.Destination.NumReservation :=
- u% X; h* B4 B$ Q9 R J( k @.Destination.NumReservation + 1;6 g' f; K! Z/ p( F W# `
end;$ @) M r' x% I- O1 B; i
@.CurrIcon := "drivingHome";
* S! W; V' j0 _3 x1 x, J @.DrivingHome := true;
0 C$ f- K6 N/ E* Q- G end;
% O/ z5 D' i* H" P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 @2 P9 H5 m2 g8 R9 `7 F5 b+ o* t part := @.transpOrder;
* _! Q. b6 ]# J9 m& C part.move(@);-- load part
: r2 G) l3 }9 r, R( w @.CurrIcon := "load";
/ s2 ?8 ?! `5 K0 i o/ k GlobalDistObj := part.globDestination;* p, O- e6 d5 H: c
assignLObj := rgmanager.rgAssignL;
Q( m, x! b- T' S9 N2 K2 G1 o! l9 ^ row := assignLObj.getRowNo(GlobalDistObj);
( ]/ ^8 L; V `- B5 z. C2 ] if Row = -1 then -- since 70
/ e- F9 r7 _; H; A4 ?- v if lan=1 then l% ]( B, `# d7 [: k2 H2 O; a3 Q' o! N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) u* {8 p% q1 D$ F
to_str("in der Andockstation: \"",?.~.name,"\""));
7 C! N3 [6 S" S0 b g else' i; R. } t9 x6 `. W$ L. h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 H7 [" ^1 A- _/ q& K" p# w to_str("in docking station: \"",?.~.name,"\"")); ; l2 \2 z" `" b' f
end;( v7 p. t& b/ I
else
* m- U0 U; D5 v Z @.Destination := assignLObj[1,row];" \& A/ V( G+ J5 P' ~; A
end;
7 Z+ u2 ?' F4 Z+ n8 F newDirection(@);, D( e, ?6 J, |' U
@.HasOrder := true;
5 d* J6 [) V: [ W% y+ H end;/ W+ ?% E/ R) }1 I4 n
end;
5 X2 D! D j% e$ _' ~0 f4 Uend; -- of the method
) C7 A* ]* }6 o# R) f |