/* called by: entrance ctrl of the object 'track'
- i/ y& D6 \3 C0 l% V ?0 F*/ L; G4 p' y- Y/ s4 h$ M% u
is
' `$ T' B }6 Z0 Y8 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Q, a3 j9 N6 d; T9 }8 d- |
do
; W5 K4 a% `, q( Q! c Lan := rootfolder.Internal.Tools.AOLlanguage;
/ D' P, R' d( V+ s if current = @.Destination -- else return
9 H6 `1 I/ Z) J/ x5 O1 S2 T then* L% p$ ^) j4 \4 k4 J3 q1 B
@.Destination := void;& T1 W9 Q" E3 ]0 x2 w. T; C
if @.occupied then
% d6 q1 |% x u1 `$ F: ~# y- S part := @.cont;
. K7 j7 B3 U" ~& F0 m# f @.transpOrder := void;
/ f1 |, g# U' V1 s& J" T" L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 l+ J& \! Y" _; v
@,root.eventcontroller.simTime);
, z* y+ }" p: q" v5 C) C @.HasOrder := false;
$ C6 ]6 a- u$ X& D2 }3 j; r% R @.DrivingHome := true;: M% n; B6 ?5 A2 |6 [
rgManager.tryToStartTransOrder;2 I8 o8 U; k q8 ~3 b
if @.Destination = void
1 w% x0 U0 B, k4 L) I+ N then -- no transport order for vehicle @7 J |- D, ?: \! m ~
@.Destination :=
7 N, V, _" }4 U! d5 o rgManager.nearestFreeStation(@,track.~);; W7 S9 J" V; j# z0 h+ _
newDirection(@);
! f, b# Z% G8 O7 H. u1 q' F if @.Destination /= void then1 X/ l# T; o' T
@.Destination.NumReservation :=
/ t3 t) T f) o1 D @.Destination.NumReservation + 1;
0 }% V8 P \3 Y end; m1 {, z# h$ w& m7 \8 ]
@.CurrIcon := "drivingHome";" k5 J7 U/ b) ]
@.DrivingHome := true;
% C! a# i6 ^7 t% G end;0 v4 ?/ a# C2 c. f' _# w' I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 B0 b n8 B$ R, B( c, k* G5 K( \
part := @.transpOrder;$ w4 `! X) r6 ]! M
part.move(@);-- load part
2 m8 Y/ `2 ?/ v" f @.CurrIcon := "load";" @1 m3 u) g) ^$ V Q" x
GlobalDistObj := part.globDestination;; e% }0 \3 ?7 |7 B" K
assignLObj := rgmanager.rgAssignL;
' P7 _# R0 x. X$ ~4 N row := assignLObj.getRowNo(GlobalDistObj);
; R% Q3 B' `# o" a' r if Row = -1 then -- since 70/ n% E+ J9 T3 a9 M
if lan=1 then
' _ U7 z6 u6 J. n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 U D" P/ a( A5 p k( ] to_str("in der Andockstation: \"",?.~.name,"\""));- u" U/ }- Y" h! C& _
else
6 h, s) Z" m) w- m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 R% T+ t! ~ \9 g2 i
to_str("in docking station: \"",?.~.name,"\""));
8 {+ j# {- Q2 K5 \ end;, U) A3 E& f9 L7 F' Z: J
else# y+ k+ s2 Y" n5 m+ D
@.Destination := assignLObj[1,row];
$ M F) G1 x" ]9 E; A0 C end;
T# G) g2 E0 o newDirection(@);6 x5 h4 X# l- \
@.HasOrder := true;3 n3 F6 ?9 Q3 ?% r
end;* x7 h9 P' m# x$ x ~ c
end;" t4 B6 @* l- c5 B l+ q
end; -- of the method
/ R# @# y ]7 g; D6 V) _3 X |