/* called by: entrance ctrl of the object 'track'0 a/ Q7 B4 e/ n: \- P2 g' l
*/1 \% i+ ?: y4 L" W
is7 ]" {. p3 h2 C* {
part, GlobalDistObj, assignLObj:object;row,Lan:integer; ^8 M6 O5 O3 ?* J% j
do& T6 t. e1 F; V5 C
Lan := rootfolder.Internal.Tools.AOLlanguage;+ n# l4 {+ F. s1 V4 M" Q8 B: v8 A
if current = @.Destination -- else return
, @; B) M9 A# w& Q8 i$ e then; N% I( J, h0 J. Y& p
@.Destination := void;3 | u& |; E9 ]; }
if @.occupied then, K+ J9 q% j% t$ `) y1 k
part := @.cont;
/ Q3 `9 n& ~! T1 C. H2 |/ r4 j6 ` @.transpOrder := void;, @! V) J# p! Y3 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: f6 m3 E1 X3 p. L5 q0 H3 \( f+ j u
@,root.eventcontroller.simTime);& y( B" w3 R1 S; B- t, K+ I
@.HasOrder := false;9 N# x; Z5 l2 ^) k" T- o
@.DrivingHome := true;
* g% I6 m |; } h; @& V rgManager.tryToStartTransOrder;
8 b3 m3 Y, i# ?: i if @.Destination = void; y& S- E5 i& X, a
then -- no transport order for vehicle @
2 |6 y$ O# @8 T7 r @.Destination :=/ r) Q; _; o$ u1 j' T
rgManager.nearestFreeStation(@,track.~);
+ j: Y0 x' m9 v/ O/ ~, b8 v9 R newDirection(@);
& ^7 C1 i5 m) D- d l if @.Destination /= void then
8 F, X$ b' }( a: z @.Destination.NumReservation :=
u9 p, V$ o' f K& { @.Destination.NumReservation + 1;
/ n7 ~$ r; r# i3 r8 H end;* L- d- s$ S3 d4 m4 s
@.CurrIcon := "drivingHome";
/ x7 [5 _; A. |8 p: z6 G @.DrivingHome := true;
: W2 J7 B4 j- l% ^9 V* s9 T end;/ G; O5 l( t) i- D2 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* b1 N' `3 U1 \. ]& e Z5 S part := @.transpOrder;
+ t! q F3 e9 e; X$ A part.move(@);-- load part9 K% ]: B+ l c! [* e6 ^
@.CurrIcon := "load";
8 U- h( @1 Y. G, ^ GlobalDistObj := part.globDestination;
6 N Y/ k/ e! Z) b5 @9 b& a assignLObj := rgmanager.rgAssignL;
( }5 F: m/ |8 l row := assignLObj.getRowNo(GlobalDistObj);
) R" o3 `4 }) t8 ^9 v if Row = -1 then -- since 70
r+ \/ ?" {5 W2 y; ?2 { if lan=1 then3 f! a5 p# B3 ?6 U) ^/ M2 G6 _% z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! m1 y; v3 ~% S% B to_str("in der Andockstation: \"",?.~.name,"\""));
: E& p8 B" _1 D0 k) n else7 {! l5 T: p0 {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 b0 c) N: d6 W6 A( q to_str("in docking station: \"",?.~.name,"\"")); 4 Z' ?- A3 j/ d
end;/ @1 L; d. L, m* `7 k6 q2 s3 G
else( F+ V; z: R6 k' l4 {7 w
@.Destination := assignLObj[1,row];2 I s" t) ~. |4 u1 ^
end;
) T4 k P T) u9 Y$ M) ^ newDirection(@);8 Z0 R4 @! m% L1 p
@.HasOrder := true;
( i7 R ^5 Y) ?4 }0 I- I6 J/ B end;
7 [4 Q* C! c. [ C( ` end;
" o9 l8 q5 ~6 f2 B% y# f) hend; -- of the method
* h; f+ i; W! F! f. M9 g% h! d |