/* called by: entrance ctrl of the object 'track'' b* A' E$ _8 ~( _9 w
*/
3 R* G6 y: }5 f8 W4 ~6 V% ais
+ |% z* T5 |& Q5 `, k# i) _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
X% ^3 L( y1 O% G4 s4 y6 Xdo
( C4 p. w4 P, @% w Lan := rootfolder.Internal.Tools.AOLlanguage;# \( \! r" Z: }
if current = @.Destination -- else return* ^0 i8 o0 ^0 P: _! }) r
then2 b# a4 x; Z) @ N4 G: t7 \
@.Destination := void;% {& x+ x1 I( S8 P' o( R
if @.occupied then% i. C9 _, W, i6 {
part := @.cont;
- t& w. W# c9 t0 Y @.transpOrder := void;
9 L/ a; x. p1 N; }. c# Q d* x0 V: R7 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% N: ^8 k$ p$ b/ H, U3 { @,root.eventcontroller.simTime);1 z5 h. P1 U- ~; n4 e+ \* |
@.HasOrder := false;
. S4 c% Y1 u3 ~6 O8 H @.DrivingHome := true;# ]: Y8 v* t6 A1 @+ V! R; Y
rgManager.tryToStartTransOrder;
- \% x$ S% k* w/ f if @.Destination = void+ Q- U0 P. O+ p$ `) y
then -- no transport order for vehicle @
- h8 ?' m3 Z7 G, I- E @.Destination :=
. ~& I) r: X& f5 T' P, T8 s7 V rgManager.nearestFreeStation(@,track.~);8 i6 p7 F( O: S# G
newDirection(@);
9 j9 m& f C( S& c0 t9 u4 s if @.Destination /= void then
, {' p8 D3 g. t J @.Destination.NumReservation :=/ B J+ |! R5 B* {
@.Destination.NumReservation + 1;( r) p# Y: t0 t5 x h" C
end;
5 m; i9 d5 t* X% \% h* D @.CurrIcon := "drivingHome";
8 T7 o9 l1 L8 N# H0 n/ X. d$ L @.DrivingHome := true;
3 h& a6 X' k# F" o$ g+ p end;
9 N+ X5 p2 m) i else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n! F1 N* u% Z+ Q: [0 ?
part := @.transpOrder;, C9 ^6 {$ q8 t7 Q4 I
part.move(@);-- load part3 w! ], P5 D( ~( T% E+ f7 B+ j7 s
@.CurrIcon := "load";
. L6 m6 x9 D# R* K: Y c/ b" G GlobalDistObj := part.globDestination;
7 O; X+ k: F, ?" c8 N+ \; M! @ assignLObj := rgmanager.rgAssignL;
3 X9 f: T9 F4 C( f row := assignLObj.getRowNo(GlobalDistObj);2 j% j1 o3 O6 o. C1 Z6 t5 N( Q; H
if Row = -1 then -- since 706 e* f% h6 D, x1 b- D3 R7 n
if lan=1 then/ |' R8 `5 b. o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, U8 f- a) T/ S) d! j to_str("in der Andockstation: \"",?.~.name,"\""));
. L; k) L; A, z2 ^& C! v- a else" l7 @7 c. k( b7 v; x K4 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; e0 p% q( r5 M( N3 v# y$ Y+ B
to_str("in docking station: \"",?.~.name,"\""));
. k7 M" S7 Q/ Y% P" B end;
. I- g6 W# ]5 V9 g8 g: M else
4 G: G8 @- {" O# C) ? @.Destination := assignLObj[1,row];
9 \; E0 ?) C1 `' X8 I end; 0 i/ c0 g6 e/ y) S% R# e7 V" P
newDirection(@);
! H1 t# b3 z! ]' S1 x0 x @.HasOrder := true;
/ `. D2 t( z! r* ^/ [9 T& I end;
2 Z3 k& N2 O& L$ W3 ` end;
, K( v# M ]5 m+ G U. z5 jend; -- of the method
. u" V( `9 g7 ~. h9 u& i; J* h |