/* called by: entrance ctrl of the object 'track': t0 g' C/ u+ h: W. z
*// w o, _& Y' J# g( j# r4 O- a
is' H+ ^* k1 g/ i' m5 U4 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ q# B* D4 W" F3 Z+ j+ b1 |
do2 L2 e& o, b+ `. H5 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
" m. c _8 Y; P$ k+ b! _ if current = @.Destination -- else return& t/ e$ C9 ?. M& Z
then4 X* t; X% ], d
@.Destination := void;1 a4 O0 r: a; B# |# p6 V
if @.occupied then9 s. ^2 N2 d5 o# U: O
part := @.cont;
" E3 a# @: |6 I; f @.transpOrder := void;
( F7 S1 b* O9 s' L! h1 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! R1 G3 b3 F/ v% t- ~) Y
@,root.eventcontroller.simTime);
, ]$ K! K! }- w& Z0 m- a o @.HasOrder := false;! a" q( }7 v$ ~( t1 P; h# _
@.DrivingHome := true;
. J" ]$ U$ K( o6 E6 O+ J rgManager.tryToStartTransOrder;
N5 x! Y5 x( _: }) Z if @.Destination = void
' i9 S8 m' m( ^7 W2 [( S then -- no transport order for vehicle @
* Y: j9 o, T- d/ x6 t2 C: i @.Destination :=) A. [, Y4 N2 T2 M" K% J
rgManager.nearestFreeStation(@,track.~);
& n I) o8 U% V6 l2 @ newDirection(@); $ J& z/ E( T# [- B0 @
if @.Destination /= void then
1 V0 v& f s: O2 l2 S @.Destination.NumReservation :=
* Q7 q. \2 T4 k! t" W9 J6 E9 x @.Destination.NumReservation + 1;
1 {" k& C! x6 L6 _ _0 B end;3 w6 |3 e1 `$ }1 x. t% |
@.CurrIcon := "drivingHome";
9 X R; }& B2 _$ [' O @.DrivingHome := true;6 l% o2 h9 m8 ?# _0 y* z5 e o& H7 ]$ P
end;8 J4 y1 ` t: y+ w& H3 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r- j5 }# g" U" ^3 {9 b part := @.transpOrder;
8 ~9 o* d7 U! i7 X6 p' [& @) ^4 W part.move(@);-- load part
; o, X x7 [' `2 b/ W @.CurrIcon := "load";
0 Q4 q# Z! v J8 s2 m$ b3 @ GlobalDistObj := part.globDestination;
- u2 \. t4 A" |5 V assignLObj := rgmanager.rgAssignL;
- O& X3 m$ q' H/ A( f) o( E row := assignLObj.getRowNo(GlobalDistObj);- b( g- z5 u) d" z5 o; Q
if Row = -1 then -- since 70
. h6 j8 }- I4 l" B. E if lan=1 then
0 j6 y6 R' O8 r" ]" O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- m$ N% o4 R7 \9 d5 f$ q/ X
to_str("in der Andockstation: \"",?.~.name,"\""));; A9 P* o" Z# {4 F8 }1 T# S/ [! S
else3 Q' j5 [2 }/ |7 f8 D# r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ E5 J& I! S; m( Z
to_str("in docking station: \"",?.~.name,"\"")); 7 O; Q8 w& u3 P" U
end;
# Y, B, e& `; L+ ^ else4 T# ^8 |6 e6 n
@.Destination := assignLObj[1,row];
8 `$ y5 q3 U( p0 j `/ S end; - g; O+ S0 Q( j1 s p. b2 i* ]
newDirection(@);
; a6 V6 @- V" N" K @.HasOrder := true;
" Q$ ]' \; y2 A1 A9 s) p/ @7 ~ end;
- F/ W/ c0 m9 R end;4 T' [1 {! h, z% ~" k0 u& e- p1 N
end; -- of the method
" a2 S) ?9 U7 v* K; \0 \ |