/* called by: entrance ctrl of the object 'track'
, r! b2 L8 H# G3 J*/( g9 T/ q/ z( y2 f. z W7 x* |4 z
is- j8 _% K) d: W/ I2 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; e( g# B, C" d* O) `, kdo
' t+ b# s# W5 d Lan := rootfolder.Internal.Tools.AOLlanguage;. E/ {) w8 I7 M2 G. c
if current = @.Destination -- else return* o l- q$ b/ J- D) q
then5 y2 L) `; x* I9 f/ \
@.Destination := void;
" r& j) g3 Z% x5 s8 g( w if @.occupied then
, ? y) Z# c- k# H part := @.cont;! N3 S% F6 |1 X/ r; u
@.transpOrder := void;
4 J" w$ o$ ^' e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" E/ x9 \" y8 t0 W' j @,root.eventcontroller.simTime);
) E! Z! I9 C( w8 e7 a @.HasOrder := false;! X/ f6 \. O) P' d0 ?
@.DrivingHome := true;
1 w' K( {% g0 T$ ~8 x- f' B rgManager.tryToStartTransOrder;
! I' C3 M3 v9 I& R if @.Destination = void
3 d' ^7 V) y2 s then -- no transport order for vehicle @, [: L6 j# p0 S2 ~! c6 v
@.Destination :=
( M& w9 T% \, d% _/ E. I rgManager.nearestFreeStation(@,track.~);
) T$ q- O! ]/ J! R0 v newDirection(@); - ~( r# f5 r# @! T( S+ `
if @.Destination /= void then
, M! o# W& _2 T, ^% T; l t @.Destination.NumReservation :=' ~ \, ~* J2 l! l; E0 s, l0 n0 X. s D
@.Destination.NumReservation + 1;
, r& G! k6 F$ T' j end;8 H- Z i6 _5 ^
@.CurrIcon := "drivingHome";
( p" e7 _( S9 _ @.DrivingHome := true;
% B$ }" b" X5 a0 L5 Q end;7 j3 b3 D, R0 L' q6 H* X; e- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' W2 T" ~% T+ [8 A part := @.transpOrder;
3 A3 _+ f2 v |' Y5 g: v5 } part.move(@);-- load part- ?, r6 |; }5 }7 ~
@.CurrIcon := "load";
& H, W' R! v9 i& G- o GlobalDistObj := part.globDestination;
" r" [; ?0 H- [/ A8 h assignLObj := rgmanager.rgAssignL;# k _6 e7 c- f6 N4 C+ u* }) R
row := assignLObj.getRowNo(GlobalDistObj);4 Y! j9 C) r# V2 P: c" e/ j
if Row = -1 then -- since 70
* E2 D" w. O* A7 ~4 \8 o! g: D if lan=1 then
% I8 ]: m- B m. O' o* F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& J( [ r1 t, n, z5 J4 G
to_str("in der Andockstation: \"",?.~.name,"\""));7 Q5 l$ P2 j' z2 r4 k
else& F) g( v6 ?. ~- J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- J, L% l& W* i9 D, q
to_str("in docking station: \"",?.~.name,"\"")); * U& H: M" i+ W g/ o# f
end;7 X! |8 r- ?9 h! w
else( E2 ~& Q' b5 }1 B; {$ k, g
@.Destination := assignLObj[1,row];" C( V' H% q( u' C+ ], a
end; 7 g. l/ D: E$ U8 c! d" a( r& I
newDirection(@);. |9 b/ R5 H1 m6 Z
@.HasOrder := true;
+ n \; ?; o6 G- l6 C+ q end;
% N! U$ |2 Q; B$ m0 E0 Y; I end;
+ ^7 o, G- n+ q" L& ]0 B! Cend; -- of the method) ?" [8 }' |5 ~
|