/* called by: entrance ctrl of the object 'track'* b, _7 x( o- h3 {2 _% z7 @
*/
( F5 B6 p3 l- N/ R3 k: Qis
. ^3 f- m* A3 i1 w; o& ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ]4 B* d5 W1 _
do
1 s* c% P( a& J& ? Lan := rootfolder.Internal.Tools.AOLlanguage;0 M- F1 V& c( h
if current = @.Destination -- else return9 @( p( r8 {8 S$ Z; U' d* s
then
- L( p# ~+ ~. T" v: x: R4 u% A0 t @.Destination := void;
2 | r2 ^8 p; z5 P, Y" L* ^- ] x if @.occupied then
: B+ x* S& s( h, I' B/ m6 m part := @.cont;6 r4 c. I8 \3 R$ A* K9 ?0 S! B
@.transpOrder := void;
1 {8 u$ T! o8 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ v6 N! Z8 g8 H6 D
@,root.eventcontroller.simTime); O0 u+ ^# [" }
@.HasOrder := false;
; G* @4 Q1 C) p; { @.DrivingHome := true;
3 c, _& H5 z( q3 j, D4 A rgManager.tryToStartTransOrder;" l% [1 w- z: E
if @.Destination = void
, _/ K7 d2 o4 y6 k) V' i0 I/ h* ] then -- no transport order for vehicle @
2 V5 a* c+ V1 T/ {# o @.Destination :=
9 m% d, Y. e8 U0 j& K* I$ T+ o l2 c rgManager.nearestFreeStation(@,track.~);- H% v4 W' y! E; H7 L& ]: g
newDirection(@);
2 P, `% z: m! O4 _8 z, X! q if @.Destination /= void then8 D1 m, c- z$ O$ d/ Q' x; t
@.Destination.NumReservation :=
# j) O/ H, d* o0 _( \ @.Destination.NumReservation + 1;
- r* I5 A" X1 c# ~( K end;: \# i* c" y+ y0 c
@.CurrIcon := "drivingHome";
/ n3 B$ @3 g( G @.DrivingHome := true;0 I; {1 _; g' R- v' c, ?: P, k
end;, x; r/ j* a5 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! `# V' y' F1 I2 y' t
part := @.transpOrder;
1 J5 A. t7 S1 O$ W part.move(@);-- load part8 n$ _* f: z( C. q2 }/ P/ Z
@.CurrIcon := "load";
5 K n2 c0 T5 Z1 H3 V5 e4 Q GlobalDistObj := part.globDestination;
% T) w; c7 r5 A$ f5 c/ E0 C& U assignLObj := rgmanager.rgAssignL;- r9 D( W, ]/ d7 a5 f& V
row := assignLObj.getRowNo(GlobalDistObj);9 X5 f9 O& Y( [
if Row = -1 then -- since 700 Z- R. M9 m: L# {# g5 q$ i/ @
if lan=1 then
& \/ l/ X- v# p1 w: W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 z Z6 I6 ?0 R
to_str("in der Andockstation: \"",?.~.name,"\""));
M0 o9 u. Z5 D: P! f, I/ E) l else" Q# \* i$ [6 q6 [# |2 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 y) l; O# N' _4 e3 ] to_str("in docking station: \"",?.~.name,"\"")); 6 g. K( ]# ?/ \3 H0 [3 f( J! w
end;* S8 X# ~) X9 m$ L8 f
else
9 z4 E3 {& m- O( e/ R @.Destination := assignLObj[1,row];
$ z( A! N" t+ z; h$ v1 v end;
% z8 O, D. s1 ?: }/ D, X newDirection(@);
* g$ }; S$ V$ J) d# n @.HasOrder := true;
; h5 q6 o' q! ]& h( y/ h) i* R end;+ A# \4 q- A: R3 P
end;! e. T' S6 W! g ]# g- |- P
end; -- of the method
# I8 W9 }% n# ` |