/* called by: entrance ctrl of the object 'track': E. | a5 K- u5 v
*/9 x9 h5 X1 d' s! o; Z% g
is: @( R4 P; e) N! C9 D! [1 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 \' s; Y. k+ ]& Y: H, |
do1 \, V( S: F1 w
Lan := rootfolder.Internal.Tools.AOLlanguage;% z4 O+ I* G8 \
if current = @.Destination -- else return+ {) ^2 {, p7 k- G: g
then' c+ K4 x9 P' w& N) ?$ P1 S2 H! G
@.Destination := void;0 z; }# Q1 Q$ d
if @.occupied then0 o+ J# { I" h( b) S/ {0 @
part := @.cont;
; c4 U$ R6 F% k @ @.transpOrder := void;! A& G8 C5 k% ^$ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ?/ F5 N+ w8 |- H. k
@,root.eventcontroller.simTime);
/ R; C4 [: }, n* ]! U$ J% r @.HasOrder := false;) u- h8 v3 Z7 g1 E
@.DrivingHome := true;
# y6 L* k, C% h& F4 g% O% t rgManager.tryToStartTransOrder;
# o }. i5 f( n+ Q( ~ if @.Destination = void1 i% Y4 d0 ^( G- c' P
then -- no transport order for vehicle @2 _0 X3 b9 n2 O# x# }8 h' Y
@.Destination :=% J' w. y3 b3 l3 D, Y
rgManager.nearestFreeStation(@,track.~);$ f( e; R' [( R/ i1 S- ^! C" _ k& m
newDirection(@);
9 f; a a8 C2 w9 ?/ I# F( j2 | if @.Destination /= void then- {3 J2 h: e6 J5 w8 L9 }7 i$ j
@.Destination.NumReservation :=# X% k1 G9 R6 s1 U3 r
@.Destination.NumReservation + 1;
. f+ |3 M% k, X$ K+ P a end;
2 ?8 Z. @' U; ~" w- l @.CurrIcon := "drivingHome";
6 z$ R" q# o$ Y4 { @.DrivingHome := true;
. h0 |4 U/ G$ @2 v" E' ~$ A" J! E/ @ end;; g6 h r0 f2 q% v1 a1 u, ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: h1 Q5 d# h0 c7 j6 u part := @.transpOrder;0 I2 M% `9 U, |
part.move(@);-- load part
# f5 I9 K8 J @+ s2 @: `5 j5 k1 } @.CurrIcon := "load";
; U G: ?& [5 D" ?: R1 p% I3 J4 i GlobalDistObj := part.globDestination;# E4 Y+ K, x! v3 z7 G7 a9 w. B
assignLObj := rgmanager.rgAssignL;2 C ?* Q1 E% h8 D
row := assignLObj.getRowNo(GlobalDistObj);9 q+ v* N/ w0 T4 W( c
if Row = -1 then -- since 70
$ b( x F I, W5 I" ~* A; H0 B if lan=1 then
5 H V2 I, k. s) D' F2 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," b4 V5 x$ H! ~$ w& a, Q- M
to_str("in der Andockstation: \"",?.~.name,"\""));* a6 p4 ]' M" A9 s
else- b( ]# B! ^& C/ ^6 k1 |- H/ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ q: A _6 k5 A' u2 x9 o
to_str("in docking station: \"",?.~.name,"\"")); # S8 }$ Q ^8 U( F' ~2 G; s) T
end;
* @/ \! y8 Y. m2 |3 N& X0 L else! [ a" i: {$ _% C0 q2 D
@.Destination := assignLObj[1,row];
- e% l- V/ m. \1 h2 r+ q end;
7 E. o2 ]9 T% x' n, c newDirection(@);
^. Y3 l1 m7 x' f+ T, @( |! _; S @.HasOrder := true;
$ L# f: ]) r! \ u end;
; s% S ?0 ]) a; Z end;4 C" K S! w# @/ |: }
end; -- of the method
( I( `% w5 s6 _. ? |