/* called by: entrance ctrl of the object 'track': }$ R* \) T- y
*/! {! q$ o7 ~/ E3 ]
is
$ l1 P% x' J* q- U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( a- p3 @, m [! g! ydo
1 j6 d6 p( r9 _) u8 t Lan := rootfolder.Internal.Tools.AOLlanguage;
& b' r1 ^5 l8 |& F, P2 a4 Q if current = @.Destination -- else return5 s% J1 T! c# R+ H2 @) R0 g% K# ^
then
* }/ V$ _0 C3 c @.Destination := void;, n# c' c. H, z/ v
if @.occupied then8 {: R3 I2 y. V# y4 A
part := @.cont;) W, o7 v D3 }3 E( I
@.transpOrder := void;
: ~/ Y' s' @/ H1 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) V, d% U0 P9 L$ f+ J
@,root.eventcontroller.simTime);# _- \2 j# F3 S1 h3 G( O
@.HasOrder := false;- E5 H9 C; o7 z- u% @
@.DrivingHome := true;5 b$ d0 M6 T$ S) k" b- c
rgManager.tryToStartTransOrder;
4 l5 @' m4 L/ T if @.Destination = void
, K* U% Y2 [0 P# h& K+ u5 X then -- no transport order for vehicle @
7 Z5 i7 @) E' e @.Destination :=
! n0 o* a# R6 |& o% L rgManager.nearestFreeStation(@,track.~);% w0 U- R$ A0 U3 T/ f; b
newDirection(@);
) }4 n, \1 t2 B0 s8 d! n/ j$ \ if @.Destination /= void then
3 B- S/ }8 i+ a1 U5 D$ { @.Destination.NumReservation :=
0 ]& g8 M/ N4 p6 i @.Destination.NumReservation + 1;
! r* W& J+ V% [. v5 g end;
- M9 c' O$ E& a N( j2 m9 p @.CurrIcon := "drivingHome";
( R2 H6 t, U. E% `4 b% v @.DrivingHome := true;5 d0 [5 g) v4 F% k0 Q- `* X
end;) L+ b% f4 Q% R; M, Y1 b$ X3 N' K, T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. r! ~( i: X0 {( p7 E! F part := @.transpOrder;
7 K; O4 J* F9 ~ part.move(@);-- load part
( i3 m: d N! P' B9 O0 F& L @.CurrIcon := "load";
. f* v/ E6 C8 p' z) x I/ l GlobalDistObj := part.globDestination;
* O2 J) b' z" [1 a. k# F8 w# S assignLObj := rgmanager.rgAssignL;/ L# l+ m) s5 u0 _- h/ k; j. V
row := assignLObj.getRowNo(GlobalDistObj);
7 Y( u/ Q: d- e1 H if Row = -1 then -- since 709 k% W3 v+ p" r: W9 F
if lan=1 then
0 P% f. o+ |. f+ Y! Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Q- l7 ]# g5 E' w+ Q0 s7 O
to_str("in der Andockstation: \"",?.~.name,"\""));
/ j' |* g D6 M7 w, F else
, t/ W3 ?. A# B* l1 ~0 m0 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ u \$ `( F! |2 M) y to_str("in docking station: \"",?.~.name,"\"")); 1 r4 ~: K9 t8 R0 n# |9 w4 }7 b
end;- ?3 Y% a; h! C2 c! P& t
else
* S' Q2 L2 G# }0 }1 B. F' d @.Destination := assignLObj[1,row];/ [8 o# S5 u5 Z& |
end; * x( [! C2 A* P5 k
newDirection(@);
! U0 A; ~# l6 q2 k @.HasOrder := true;" J4 a) J; G8 @+ }" Q. B9 ^
end;
* g5 b, M1 q* v; R end;
8 P+ |- K2 A8 P' l& S. x, [5 Rend; -- of the method
0 u I7 f: z$ d7 Y+ P! U6 X5 J/ X' P |