/* called by: entrance ctrl of the object 'track'
6 @# ^3 W8 w& A*/) S" U) t* F4 `1 j6 ^. o4 n4 F
is' K$ y1 D, D0 P6 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# h v' q6 `. m5 M8 _0 Z; Edo5 Q9 F4 c& V7 b' E9 ~) I
Lan := rootfolder.Internal.Tools.AOLlanguage; x4 p" ?. f6 w# T- V+ [! q
if current = @.Destination -- else return
* B/ z2 F a; ]! c2 I then8 y- c- a7 A$ v4 \. {
@.Destination := void;9 q0 k$ l! t- E3 U
if @.occupied then
. p+ |; y; @* J part := @.cont;
+ |8 E1 @4 j4 s7 K. ~, O2 R @.transpOrder := void;1 ]* Q/ r, r7 \, J( q8 F% }2 x' d6 N; v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Z: Q- G( Z* ]& O2 v: y
@,root.eventcontroller.simTime);
# l- e) E; E4 t! t' f8 u. ^ @.HasOrder := false;
+ ?+ a/ I9 U B% T. M @.DrivingHome := true;- n; U# x& S# W; j! c1 e
rgManager.tryToStartTransOrder;' _8 I: {' ^! |& o& t
if @.Destination = void, s* p9 k0 ]9 ?8 d( j
then -- no transport order for vehicle @
2 s6 L( G2 k/ X5 w8 Q4 A @.Destination :=9 t" q! c( \: E' ~# }7 @8 w
rgManager.nearestFreeStation(@,track.~); E) c0 q$ {, l+ D
newDirection(@); 1 |" r) Q7 L0 ~( o/ C# K
if @.Destination /= void then. e5 X0 N" W( P% ?6 ~
@.Destination.NumReservation :=
( {0 S+ T( B6 k. B5 }# ? @.Destination.NumReservation + 1;9 u1 e5 F/ K1 k7 ^& A- ?4 @
end;
0 f z8 w3 u+ s @.CurrIcon := "drivingHome";
( {8 V4 I8 m5 N! j9 \2 M @.DrivingHome := true;) Z& p5 r1 f( v
end;1 ~$ G* Q: r5 q7 j8 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% ~0 h% D' u. p. H0 A9 q- B part := @.transpOrder;
. h# M- Z, m/ X# I part.move(@);-- load part: s% h3 y' N4 z# A( |
@.CurrIcon := "load";
5 a! Z( M. ]" G9 a5 Y GlobalDistObj := part.globDestination;
9 S/ X2 S* h/ K% I2 u5 W assignLObj := rgmanager.rgAssignL;+ T" g3 `, `% d4 J, Z
row := assignLObj.getRowNo(GlobalDistObj);
+ `+ t/ W& z8 D0 a. |7 `4 P0 q if Row = -1 then -- since 70( Z5 P7 p- Q; ]3 u- |$ F( Q6 Z
if lan=1 then
; G) E: H1 n7 a! j3 u$ c3 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 B* V2 D+ W9 J6 t/ S3 t: L. B# V/ e
to_str("in der Andockstation: \"",?.~.name,"\""));
6 S: {6 T5 h7 |, S4 M3 D" _ else7 b1 A4 j8 r& M/ \' q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; D- k0 l7 f% }8 O; ~& K' i
to_str("in docking station: \"",?.~.name,"\"")); 8 O, H! s1 a4 Z& _6 ~( \8 K# H
end;
! a |6 Q! V6 O" ^+ q0 J else
8 D7 z8 j z/ g- q% | @.Destination := assignLObj[1,row];
4 O5 n1 K6 A" {( x end; ' h) f1 p8 J! b
newDirection(@);
* h5 l- W& X2 e! a% X @.HasOrder := true;2 a1 [* J2 t/ m1 z/ r3 T8 N
end;6 |, a3 q8 o1 G
end;
c" I% ^* E, t7 ~end; -- of the method
" g D" ]0 Y3 x |