/* called by: entrance ctrl of the object 'track'
! Q" ?1 [' V8 r( `3 ^9 a. o$ \' A*/
/ ?+ w8 `& a4 n+ s9 N$ n# Tis) x, g( E, Z% [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- |0 L8 N, r* u G" r! [
do
9 N" ?7 S+ u* @5 e Lan := rootfolder.Internal.Tools.AOLlanguage;
: O3 J9 G- _5 D+ M if current = @.Destination -- else return
+ M1 i: B, \9 g6 k0 j then, A* a b. V% [! z7 o' L0 y
@.Destination := void;( X; K( a9 v M
if @.occupied then+ w3 ~( s, m& i. a
part := @.cont;
7 A$ ?3 N! L2 \5 D @.transpOrder := void;
, D. X' z% g( d2 `" G: c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; \+ H4 v# ~7 W9 O+ V* s @,root.eventcontroller.simTime);
1 E G# Y% T1 a& K) }4 I8 _, W& h4 O @.HasOrder := false;# J. @1 z( j3 `( C' d
@.DrivingHome := true;! O s/ d( V( z- C& |
rgManager.tryToStartTransOrder;$ N& h) x- y3 H) n# g0 ~
if @.Destination = void
- _( p& A, P! j5 c5 u x then -- no transport order for vehicle @$ P0 r0 c- J* {% U( h$ f8 A" f; r
@.Destination :=
7 A6 f! q9 J* r/ m/ T6 U4 D rgManager.nearestFreeStation(@,track.~);
: A& C% s6 `2 G& U( ] newDirection(@); ! ~. j/ T# Y) K4 Y1 ~* g
if @.Destination /= void then
+ m0 J, P: ~' l8 @* H* K L7 g @.Destination.NumReservation :=# `6 ^* T4 R2 L& V9 V
@.Destination.NumReservation + 1;. _7 L* e9 Q# Q6 |
end;* A& M5 Q7 x5 p3 [. j( Z
@.CurrIcon := "drivingHome";
8 }- p1 P M6 y4 A$ F @.DrivingHome := true;
) x4 X4 L5 `5 S/ I) F2 F end;/ m7 n3 b+ W: J2 |, H: v9 r2 {7 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) j8 ^; y2 m' i' u& \5 f$ @+ Y: n
part := @.transpOrder;. E2 B* E8 y/ W% I; Q- I4 B
part.move(@);-- load part
$ Y' W5 U& x, s f, t/ W2 h @.CurrIcon := "load";
" ~0 I( ]' u3 q: F GlobalDistObj := part.globDestination;$ [7 A- x- @$ s" b4 {' t3 M& F1 G
assignLObj := rgmanager.rgAssignL;
1 o) i7 g J# a" ?) ?: {+ A& K- o row := assignLObj.getRowNo(GlobalDistObj);
' ^) ~4 Q. Y" _) p: L if Row = -1 then -- since 70* z9 M: q* g; L$ A
if lan=1 then
2 }" C$ `( _: Q2 W K- w% l4 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 I6 [4 n O" S to_str("in der Andockstation: \"",?.~.name,"\""));. b! D \$ p R1 }9 m L. o
else
L9 d/ o! v, ?9 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B, G" q7 k" A5 | to_str("in docking station: \"",?.~.name,"\""));
% }9 o7 y6 R2 m% A; o: d end;! l* N2 z1 `7 b7 s. h7 Y& D
else
5 }' _: N4 d1 n7 l: _ @.Destination := assignLObj[1,row];3 u/ U1 o9 ~/ ?6 I @7 |
end; ! ^: j( V4 B* o3 {; k- b( ?# F
newDirection(@);5 }; n$ J/ j% H6 q; O# y2 V, L+ y
@.HasOrder := true;
; ~, X6 K1 I1 T3 a2 r end;
, @9 F' x L- j8 P. h end;& L9 v3 P3 w5 T. y. R! F8 t
end; -- of the method
% J) I# C. V9 }! P% v |