/* called by: entrance ctrl of the object 'track'
9 B& X0 \: W" u*/
5 c# f4 \9 R8 v$ V& h5 C0 zis2 Y/ M, N3 k1 {4 p+ e# @" y, d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( s2 l7 l6 W( F3 Zdo0 Z B* }5 U$ S+ w6 t1 R) ?% O
Lan := rootfolder.Internal.Tools.AOLlanguage;4 y1 Z2 J u8 j
if current = @.Destination -- else return
8 u4 L; ]1 w+ X U then2 O: W# E' S# o. ~4 a* W" M# ^$ p
@.Destination := void;
1 ~, v8 t1 c( [6 X8 I2 t& z if @.occupied then
$ [2 Y0 o [+ k! [& Y part := @.cont;
, \7 T1 D, K" Q' z @.transpOrder := void;
, ~1 l) S% @. m/ [/ `5 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 ~3 R4 _0 R9 W% _ @,root.eventcontroller.simTime);
) }, W% ]/ _1 f4 f$ @7 m( K5 ^* i @.HasOrder := false;1 W$ p! `$ p3 j$ y# n
@.DrivingHome := true;
6 \5 t1 u8 c+ i3 _ rgManager.tryToStartTransOrder;/ p- J9 D! H' }$ V3 \" t$ x
if @.Destination = void- u/ V# a; o* E! h
then -- no transport order for vehicle @# q& ]$ C/ W; x3 r
@.Destination :=1 q9 I6 @# i, l) B0 A
rgManager.nearestFreeStation(@,track.~);3 ?/ p. M+ o/ O. d+ g
newDirection(@);
) z% H ^. d. L8 z" V3 Y if @.Destination /= void then* H, i! s& g8 s% ~$ V
@.Destination.NumReservation :=
1 n5 z, m4 A1 P: G- R- P; L9 q @.Destination.NumReservation + 1;
|) X2 R+ z) u" p: z& E: m: M end;4 o# X) e8 K( M5 w' s9 @
@.CurrIcon := "drivingHome";
( @. C/ t+ q$ W# z0 ~3 N- x @.DrivingHome := true;7 m' H- d d0 w
end;
4 i% u5 A5 }( a3 Y9 E" ?+ c& d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 g" |+ n2 U6 S- n part := @.transpOrder;
' ]' Z3 ^# ~8 D5 z, q8 i* F, j part.move(@);-- load part. Q% u3 l& q* s
@.CurrIcon := "load";, T( e( L* q3 R6 p' M
GlobalDistObj := part.globDestination;
* M9 S7 o* V) b R% o$ t! ? assignLObj := rgmanager.rgAssignL;
3 s# n3 ]" w, M9 n+ I row := assignLObj.getRowNo(GlobalDistObj);
5 T1 a' `3 A) \: M& } if Row = -1 then -- since 70
! ]( y: s1 x+ E! {7 z( f, t if lan=1 then
; F4 m9 M* V! A) `7 T9 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 _+ u( d! _* n: r to_str("in der Andockstation: \"",?.~.name,"\"")); S; F5 T" T$ b" |4 F# w
else# }7 u+ N$ i+ G2 M" h1 M7 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 z2 V' a6 l0 f- Z/ D9 [; Y8 T+ o
to_str("in docking station: \"",?.~.name,"\""));
. R) s8 A& C5 E( L end;
) e) Q5 _. |' g else# H4 S9 \' k9 P% z8 h$ _
@.Destination := assignLObj[1,row];
6 h7 d" _7 u2 S8 i: ] end; 4 f: T7 Y; `) e
newDirection(@);
* C8 E# [2 e I: L; H+ R @.HasOrder := true;3 q+ Z9 a" O, ^! K9 H. l9 T
end;
k1 j% h0 R! [( W* q end; e& a" c8 M$ ^+ ]# D+ j
end; -- of the method
% i6 `3 s" V. R. a1 c2 j8 s |