/* called by: entrance ctrl of the object 'track'1 e# t1 B! F) x
*/
. }8 F. O1 t( m. ?* b( o% H2 m9 his& y* P- R' E G% _ K" s; h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# d) j. ~6 h/ u Xdo% W. v4 a/ E# h. E6 \, x6 e
Lan := rootfolder.Internal.Tools.AOLlanguage;. a6 f$ D' ^/ n! l2 I' Y
if current = @.Destination -- else return
1 J3 B4 ]4 D v9 L/ I then
% S4 v" E9 Q g! F0 E @.Destination := void;
( x/ @; |, R/ c9 B if @.occupied then
% y, @4 G; ~0 {' o9 l part := @.cont;
( W+ `* G, V$ y ~' `" s @.transpOrder := void;
& v# J- c8 j: [* d" d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- {( u5 t+ [1 `$ j& g
@,root.eventcontroller.simTime);" t1 {1 ~& l, f+ _0 k
@.HasOrder := false;
1 m3 ^. d9 J7 F9 k @.DrivingHome := true;
0 [' j6 d7 X3 Z# A7 w rgManager.tryToStartTransOrder;
' u8 c, Z- V8 L8 l7 w9 J/ M* f if @.Destination = void; |6 {: c1 f) U
then -- no transport order for vehicle @
% v9 [4 w' [) R9 r# X7 F8 N8 E @.Destination :=
; _( p5 c6 O4 A7 X3 l rgManager.nearestFreeStation(@,track.~);
+ v, z2 |& W6 j) R" ~4 w* | newDirection(@); " m3 x8 \' I. d6 n
if @.Destination /= void then2 V+ N9 X0 w* e+ i0 X5 j( S+ G
@.Destination.NumReservation :=
6 u q [2 [+ u @.Destination.NumReservation + 1;
$ k4 H1 B% Y5 \9 x4 Y8 a2 J end;+ R8 }- N! O* N
@.CurrIcon := "drivingHome";
. u2 @# |; G' l' ` @.DrivingHome := true;
3 Y8 B6 _! J0 B: N9 e8 j end;: j. u2 K% [7 q2 Y" o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J* U9 T# Q: Q
part := @.transpOrder;
' G) G) f: d! m" X8 P; ^8 b9 _( L part.move(@);-- load part: p2 ~9 I y3 V' E8 u" l
@.CurrIcon := "load";4 o% B& b7 r7 ]
GlobalDistObj := part.globDestination;# k9 E0 `: F/ v$ O0 x. e
assignLObj := rgmanager.rgAssignL;
. p1 O' r1 a& v row := assignLObj.getRowNo(GlobalDistObj);5 x/ A' B& G# E5 g q: k7 u( N
if Row = -1 then -- since 70, G3 c% n3 l' I/ l( c/ s# B
if lan=1 then6 \ d9 w! s" ?5 C( T- n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# G5 r: e M. H to_str("in der Andockstation: \"",?.~.name,"\""));
3 v1 C f$ ~* o2 }# M* C else. o; Q0 h! O* l! c/ m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 m4 X4 _% [, l6 P0 U- w* n( H( h# @ to_str("in docking station: \"",?.~.name,"\""));
/ y# M2 U9 l7 Q- K; J, B" P end;* M& K. K% ^ g1 P/ j
else
+ W; I, u% i) W9 D2 e+ f$ X i$ Y* e @.Destination := assignLObj[1,row];
$ d7 t E7 B1 n end;
N& x2 x; [" L) K newDirection(@);
" L+ h, H' l3 o- ~ @.HasOrder := true;! R/ \7 `. Z2 q3 F# Y$ E
end;
1 c8 [! ?6 @0 M' w1 p end;: p2 x. b7 j2 ?2 m4 N% R7 b% p2 x7 f
end; -- of the method
" v5 ? w3 E( j/ O9 C, G |