/* called by: entrance ctrl of the object 'track'
: a+ p7 P" i. ~# C*/
! P# I; D4 u2 K% T& Yis
+ M& ^! L' E; R7 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 n+ i3 M; C/ [% Q) ndo
9 u/ n+ M( e3 n" U! U+ u$ } Lan := rootfolder.Internal.Tools.AOLlanguage;
6 Z5 H2 u( C% E! @; p+ y! N if current = @.Destination -- else return1 z, k6 D2 m: O) [" E, b
then" b) @& l" v! `* e3 G" i& G
@.Destination := void;
$ A9 v9 T4 a& m if @.occupied then8 |! l+ z* @. z
part := @.cont;
- {- e6 b( ^% R: m9 ]5 |2 A+ B @.transpOrder := void;
- _0 i G/ F9 M+ a" V1 q. B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," E' x5 X/ _7 ?! H& Y
@,root.eventcontroller.simTime);
) @+ v' n* @/ Q% H; m4 [, I4 t7 Y @.HasOrder := false;
! b& E: g9 g5 t/ [ @.DrivingHome := true;. s6 J/ `1 a6 T( h# W4 t
rgManager.tryToStartTransOrder;4 y- J, X) k6 u$ L% ~
if @.Destination = void9 b3 {3 G$ j7 l
then -- no transport order for vehicle @
% C8 [' p* K# X @.Destination :=6 U, y a) X2 x) Y0 i- ]7 g3 j7 J
rgManager.nearestFreeStation(@,track.~);* b/ [. L3 d6 A c. d4 x/ D
newDirection(@);
" w& ? I6 B1 E if @.Destination /= void then, h- T6 d2 ]* U
@.Destination.NumReservation :=$ r. o6 @2 B3 o" {( }! C) x. s, _% U
@.Destination.NumReservation + 1;
- g- V' {; @! s end;7 s* h% m) K3 v- v( _" I5 [
@.CurrIcon := "drivingHome";
/ q1 B7 ^8 o5 k8 ~- x" G @.DrivingHome := true;! h2 E0 V1 G/ @8 o- o, U
end;
0 j; A0 q) g" q& V3 ^7 e" v else -- the vehicle @ is empty, both vehicle and part are in the same dock station( K( o3 l$ E3 c) n8 x# k
part := @.transpOrder;
0 J `5 U) O% z& `# b1 [ part.move(@);-- load part9 M; R- k9 Q( U! @6 ^8 g& J/ z9 q
@.CurrIcon := "load";+ \8 H G0 @/ Q. H. N/ j
GlobalDistObj := part.globDestination;2 t# q4 f7 k9 w1 j, U/ _
assignLObj := rgmanager.rgAssignL;
' w# i7 R! \$ A0 @ row := assignLObj.getRowNo(GlobalDistObj);( }9 `/ a) f2 l/ m, E( F
if Row = -1 then -- since 70# V/ @) X4 q' Q. s* X) q% m* r9 ` B
if lan=1 then
4 x' [4 m" w. O% N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& E7 x* [: K ^( V. ^ to_str("in der Andockstation: \"",?.~.name,"\""));
/ P% P6 ^6 X: S4 c$ x( u, a6 q else0 q4 Q4 r; f& Z) ~1 ~- S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- k ]6 ]8 {# K# e1 h to_str("in docking station: \"",?.~.name,"\""));
: T( w2 L: T( N+ b/ W3 d end;
! H5 Z- L) I# b! v else, Q1 y+ `2 c' [, J
@.Destination := assignLObj[1,row];
( v/ R% i% \# I ^ D- S end;
" z& v% u9 P# o) s P5 V2 k+ _4 h3 I newDirection(@);
, h( v" n0 s3 {; b @.HasOrder := true;2 z0 Y0 e6 i# B0 ?( a
end;: s# \# _/ @+ i4 I, ~9 r( o6 x
end;
# J G! B8 g* z4 E; Tend; -- of the method
( S! \5 Z. L: j* z+ C+ u R. Y |