/* called by: entrance ctrl of the object 'track'
; _6 K( m9 O/ V5 D*/
* V2 t7 ]5 O u/ }: Qis% i. y. z B. T" F- F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 n& n$ O: n9 f' O4 a$ Gdo% D+ `9 z+ q# ~" @( v
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ i5 S5 Q, N" Q5 P5 q if current = @.Destination -- else return6 L' i: ~( X9 _ t/ a" ~
then F- p1 n, e4 @( h; s7 x) h
@.Destination := void;+ L' u1 Q7 v2 D. P2 @( J
if @.occupied then+ f X1 Y5 H8 z) Q3 B( P
part := @.cont;
; F4 \' W/ T) j: C J- K: z @.transpOrder := void;
/ B; ^$ }, P0 {6 z. A; Q, i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
a; o+ g* x% y. {2 Y/ r) F @,root.eventcontroller.simTime);7 X0 Y; a7 ?% G( i3 J. {1 }9 ]
@.HasOrder := false;
! v: }% J* v) i% Z @.DrivingHome := true;
: ~. F e, C, t, l% y! S0 z4 E rgManager.tryToStartTransOrder;
]8 I* p0 q0 |0 L0 P if @.Destination = void
9 d8 r! o/ @ X) o then -- no transport order for vehicle @* n8 O1 U. P8 z, U3 l3 k
@.Destination :=4 f& o& a9 O. O
rgManager.nearestFreeStation(@,track.~);) d" ] {* }5 }( x0 d7 G* m3 U
newDirection(@);
6 `8 o8 A( h8 h9 ~ if @.Destination /= void then6 P+ T! S0 W7 ?5 Q4 m% P0 E) K; v, @+ e
@.Destination.NumReservation :=
B& u& R' G+ D! Y3 p- o @.Destination.NumReservation + 1;
9 Q& D7 s, d" x# f end;6 t# N" v, M" P
@.CurrIcon := "drivingHome";. c3 l b: x9 @
@.DrivingHome := true;$ B5 y* `. E! {+ C; m0 z5 y" }
end;
" Z7 ]( z% y- z D& V" Q7 f" z( f else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 a% L: \0 r; J
part := @.transpOrder;
; p# ^2 \ L+ n+ _2 X f# x part.move(@);-- load part- @) n0 ]( b* U
@.CurrIcon := "load";( L+ n4 i0 {/ D x
GlobalDistObj := part.globDestination;$ {1 a$ @# E. E) [, R1 p, u
assignLObj := rgmanager.rgAssignL;. ^; Y# z; [0 ? o" Z9 O: O @
row := assignLObj.getRowNo(GlobalDistObj);
+ P/ }- u% Y& y0 W if Row = -1 then -- since 70
% d" }- l/ w7 Q$ ^6 z) E if lan=1 then
3 h1 O7 R. v7 {; R6 F5 I: s: m* m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 M1 T4 X$ u1 {; x$ u to_str("in der Andockstation: \"",?.~.name,"\""));! G. N+ m* Z( K* G2 I! \' [
else( x( D9 e0 k+ L; G3 V7 Q, K+ }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ D0 F' I3 b2 t; K
to_str("in docking station: \"",?.~.name,"\"")); / Y4 K. t9 _; t; K' l
end;
( y4 x. C6 c T0 v else- i; z' t9 F3 H2 T/ W
@.Destination := assignLObj[1,row];
$ V5 C( F' G" J6 I! h" q+ P end; I, a8 Q! a9 x1 j
newDirection(@);& ^$ {, F& \% s- B& }; O
@.HasOrder := true;3 P# e, R4 m2 u2 C9 D( J6 }/ q
end;
9 D* k; j6 v4 ]: V1 E end;# l: a0 t7 ?- Q: k$ I6 K3 h
end; -- of the method+ z2 z5 Q( f4 O9 O
|