/* called by: entrance ctrl of the object 'track'" E2 k, P: E8 s1 z
*/
/ i ?6 Q/ O- X/ jis
( L4 l- d" S2 V4 A; W; s! g. X; w; H part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ {1 w9 h, n+ u6 M- l, X: l4 `
do" l; Y3 q+ g' e! W; k- m' w
Lan := rootfolder.Internal.Tools.AOLlanguage;1 X9 `- T& \% p0 D& p) l
if current = @.Destination -- else return) Q0 n+ I9 {/ t' o- |% I0 X
then7 @( h+ ^1 \, [- k, E9 H0 U4 X% e
@.Destination := void;
; w: B) c1 {! s( { if @.occupied then
. }& P8 {$ E, y8 C* o0 N0 X' e part := @.cont;
8 z' L& n' t; A @.transpOrder := void;
6 f0 b& D5 Y' t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ]' p! E# f0 u! |
@,root.eventcontroller.simTime);; N. \# D# Q9 `3 g; b' @6 S) T5 h
@.HasOrder := false;2 O: l. C' b @1 p
@.DrivingHome := true;: u R9 D7 ^0 Q3 |$ u/ `, n7 v
rgManager.tryToStartTransOrder;' _2 b+ W7 x: r, O' V
if @.Destination = void
. J8 Q) [" N0 [9 Y# O then -- no transport order for vehicle @
0 J" ^, Z* c0 c) M @.Destination :=3 ^ Q4 F5 Q8 a6 m2 n* w7 g
rgManager.nearestFreeStation(@,track.~);
# S, \- q3 f# ]8 H! E ? newDirection(@); 0 Z# S# w3 ~1 s, _# C
if @.Destination /= void then
+ o+ ~$ z; \: B4 T& n0 I) i @.Destination.NumReservation :=
' {, ~7 l7 d! q+ E$ a8 t/ ~ @.Destination.NumReservation + 1;
. E8 C. u) a* Q8 p% s& R7 l1 o end;6 u$ A/ ]5 [. G( E6 P
@.CurrIcon := "drivingHome";% N x; a/ [" X9 @9 D9 ]/ g
@.DrivingHome := true;
: X7 m& y# b; q. g end;! F8 Y+ V0 U+ U* Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; z% `% p- X2 I3 U0 J
part := @.transpOrder;- C% D, w* |) H+ P2 [! A
part.move(@);-- load part% E/ l; b. P8 A. h- G+ E
@.CurrIcon := "load";
# ], N% x. t C/ U6 w5 a3 @ GlobalDistObj := part.globDestination;/ v9 W J- Y0 S" {& d
assignLObj := rgmanager.rgAssignL;+ _4 X# L$ l# ~: D1 V
row := assignLObj.getRowNo(GlobalDistObj);; y8 D" w( W0 [+ i" M& ^& Z1 r
if Row = -1 then -- since 70* s% z' E8 n" l, C, x3 o1 E* g
if lan=1 then V) U4 n$ L0 ^, d; a& y/ \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Z/ X( F: b! F+ d2 E
to_str("in der Andockstation: \"",?.~.name,"\""));
5 U( u( x% E8 p; D* X K. { else
7 i# x% B# Z& T& j3 k- T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ A8 K5 e6 t( ?0 z/ G
to_str("in docking station: \"",?.~.name,"\"")); " d9 o% b3 ]" C$ U6 T0 o
end;6 U& e3 {6 ~7 J" R
else; m% D" J: x# q( V$ E
@.Destination := assignLObj[1,row];/ \( y! _" `; O1 o' J
end;
. ?; V% y w. Z8 n0 E6 h# `+ l newDirection(@);
, Y! n4 m- V6 \- K, L2 L @.HasOrder := true;
+ y9 a: \/ C" E- a0 O9 _* M end;3 }# S8 L% k' h( Z# f: K
end;
3 o7 `/ H4 r) k+ lend; -- of the method
; Q/ P v1 y7 M& m |