/* called by: entrance ctrl of the object 'track'9 z8 q; W1 R( L
*/
; \: V( r" l, i& S' J" [% _is
$ g3 Y- X$ W) _4 u+ ]* O& I$ `7 L, R part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ w4 [2 t, y- @+ K
do- b2 E o6 }2 P5 u- O" l- I
Lan := rootfolder.Internal.Tools.AOLlanguage;6 ]' {; d9 D+ }4 W" M6 e
if current = @.Destination -- else return: U) N( I! o6 r9 T, x4 o- C& N# G2 J
then
" p0 ?5 r k$ }8 `4 f7 R @.Destination := void;% ^* e. v) U9 r* _) I8 k5 C
if @.occupied then
8 {5 J/ Q5 |3 Q$ k- p part := @.cont;$ Z# u9 m& B; u7 C( I) T
@.transpOrder := void;# K8 y! ~# t& i- S2 j8 M3 a5 T& J6 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 e m6 M+ f8 }8 a: B: f
@,root.eventcontroller.simTime);: z: B) G% t2 y1 v: S" {8 `; h
@.HasOrder := false; t" O; |) I! }5 e# Q
@.DrivingHome := true;- R- g; f% i/ q
rgManager.tryToStartTransOrder;
0 q& l7 B- ^9 c* X/ z- c if @.Destination = void2 c% R# r0 D2 g9 k* h' g
then -- no transport order for vehicle @
) O Q3 d# _! F0 p8 ` @.Destination :=. }( _$ _% Q2 l
rgManager.nearestFreeStation(@,track.~);
? u7 X* n* g% y4 K newDirection(@);
+ U5 H- C- a# G& A u" @0 f if @.Destination /= void then
I8 v% r1 }$ \9 D( ?5 s @.Destination.NumReservation :=
' ^- z ]. o0 S @.Destination.NumReservation + 1;8 e" y( m9 B* g$ T2 g
end;! }3 d: G' X- T/ B# u, k
@.CurrIcon := "drivingHome";5 \9 A1 y/ A- z a. o0 z
@.DrivingHome := true;# g5 @+ u* m2 D# `& \
end;
% H: l! e+ l- U: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& l4 j+ V( y; W' ~4 [: D part := @.transpOrder;
" i3 y0 ]% |, J) X. ^& g$ L* o6 g part.move(@);-- load part% {% f5 ]2 ~( c, X" v- f8 K
@.CurrIcon := "load";4 [8 ^: l7 T. V6 v8 X7 |4 N9 e
GlobalDistObj := part.globDestination;
' Q8 B& u" j' O# [ assignLObj := rgmanager.rgAssignL;
, U0 h2 u' w9 j3 A) x+ x, p$ o row := assignLObj.getRowNo(GlobalDistObj);
3 X$ i" l$ c0 E7 S9 u4 i if Row = -1 then -- since 70
9 ]/ N/ \; T% Y5 e if lan=1 then
9 d- ?, l9 x! \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 X j. H+ T$ G- T3 ~- E6 R to_str("in der Andockstation: \"",?.~.name,"\""));
* U/ q7 m: x. B- X7 I F else
e9 i' Q+ O1 _7 U9 X! J& }- F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. P+ ? Y- ]0 G! t
to_str("in docking station: \"",?.~.name,"\""));
O0 Z# S+ p. n( b$ I: z* y' ^ end;
1 Y* a* a! `2 N4 }( ~ else0 {/ H6 ] f- j8 e7 {) p! A
@.Destination := assignLObj[1,row];
- z' W% s! `+ J, M% Z# f2 u end;
4 |) Z; r4 u& ` newDirection(@);0 J6 t, q8 T. J' R- y) @; q) W
@.HasOrder := true;4 v- r9 D4 [' |; z. U% o; h
end;
/ N2 j8 I0 _" H+ @, h9 U end;
( [7 H. m8 b: A; n5 t" pend; -- of the method3 e# j T* l: A$ I' a# g9 `
|