/* called by: entrance ctrl of the object 'track'7 H. ]+ A, Z1 [6 K9 D+ f
*/
# M1 E4 H% H; Z p7 kis
3 V, ]$ K6 a9 F4 }$ {! M/ T part, GlobalDistObj, assignLObj:object;row,Lan:integer;( p, q2 k; y Z& e0 _& L- V$ ?
do
K n" h, o6 K' k Lan := rootfolder.Internal.Tools.AOLlanguage;1 G3 M( O% T, w! ]; m
if current = @.Destination -- else return
% G! { J, N8 w( Z8 D4 w then
1 E% M; ^5 p! j @.Destination := void;( Y2 ]' K2 F8 N' z" F |6 Q
if @.occupied then
* R( r4 O3 q9 q8 O9 A5 n part := @.cont;. S1 v9 Y3 v1 ^0 N* Y9 z/ v/ X( U T
@.transpOrder := void;
+ h- M1 F& N" x- k9 g8 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, t. ]4 [! Y0 @- k& F! N2 K
@,root.eventcontroller.simTime);# d& x! _ K" Z
@.HasOrder := false;
9 v$ |7 [4 B& @# k @.DrivingHome := true;
% A- u; |& ]# _5 P h O% k5 _ rgManager.tryToStartTransOrder;# T, [' [' f, e8 S5 }! I% g x, e
if @.Destination = void. f) v3 H; p$ r0 r4 V
then -- no transport order for vehicle @
3 h L# E/ I6 o( X7 o B @.Destination :=
8 S+ R) D) E" s- A7 `; y. i rgManager.nearestFreeStation(@,track.~);
* ~# i0 Q5 d& i" X m4 x" A newDirection(@); ; N" N( G% s$ _8 d( S
if @.Destination /= void then
. ^2 b2 I% U$ b @.Destination.NumReservation :=
# f5 l/ ]: O; l C6 i3 s @.Destination.NumReservation + 1;; U* M; a. X, ?% O
end;. B; `' M# Y" T) }% H: a& l) e+ K
@.CurrIcon := "drivingHome";
( J( V- J S3 U0 O8 q! r1 g @.DrivingHome := true;
, ]" o% Z7 j; W+ C' E# U. P end;
; M1 P5 k" u" A4 B% H/ T1 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& `3 z8 z8 X ]6 P# ^ part := @.transpOrder;
2 }3 z: M3 o9 K part.move(@);-- load part. K2 P: h- [- X3 g
@.CurrIcon := "load";7 r/ E) W9 D9 U& R) _, i2 l
GlobalDistObj := part.globDestination;
% H3 i3 [) k1 a. n+ ^2 H a% U assignLObj := rgmanager.rgAssignL;
' V# Z$ I7 w( j+ m7 ^9 k row := assignLObj.getRowNo(GlobalDistObj);
0 v. U& O% I/ W( r9 W4 | if Row = -1 then -- since 70( R$ l+ v3 B# a' G1 O! ]! q& T& Z
if lan=1 then$ c( D' J; I. L" x* E. A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 Q3 J" _: F6 n( z to_str("in der Andockstation: \"",?.~.name,"\""));9 Z4 I" W5 h! A, }# U# e
else* _/ S6 z5 j1 s3 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Z# P; E) {% F. ]. ^/ I
to_str("in docking station: \"",?.~.name,"\"")); 1 E- x: w0 o7 M4 |- |; s, u
end;% s4 R& [' | g* [; m
else* f9 W- `* q7 T& ]7 T, n/ i1 t0 W
@.Destination := assignLObj[1,row];
2 z% I, T5 X) R8 N7 U1 c end; 9 ?% a+ T! C ^0 \
newDirection(@);
! W- i9 ^+ l: f# \7 z @.HasOrder := true;
8 |7 v+ j% E3 }! v" R2 m+ d end;
O/ k, f6 {6 u: j% u/ F end;( J6 V; ^. l6 C3 z% }) o' d
end; -- of the method
% G! q% L- P1 Q1 |/ L |