/* called by: entrance ctrl of the object 'track'
; F3 r. i4 v8 m) }*/) @7 L+ g, A2 ~5 W
is0 |) w6 y, _& K* {; c/ ^: l1 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! n1 |- c& O, ]8 o- hdo2 u5 t1 k& W' D+ n$ l
Lan := rootfolder.Internal.Tools.AOLlanguage;9 U6 J" Y1 i8 n
if current = @.Destination -- else return
6 R6 P+ E& m2 u then" o& e, u6 L) H8 O" V* I: @
@.Destination := void;7 _( H9 \8 z$ Y* l0 g/ H) w
if @.occupied then
8 m; a- L3 g% a a0 K# h1 r0 A# v part := @.cont;
: x0 I/ z5 S: @2 K5 k% ] @.transpOrder := void;
% _# ?- j/ h \5 {# ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& L# b' r0 |3 R3 } @,root.eventcontroller.simTime);# l0 U& l( H9 m X' P
@.HasOrder := false;$ X9 {5 K7 Z+ y' y- X2 d
@.DrivingHome := true;7 I- _+ S* b, p3 c# Z& O
rgManager.tryToStartTransOrder;
! ?! c7 q2 B6 {+ H( r if @.Destination = void
7 p/ J' n7 y0 P then -- no transport order for vehicle @5 m7 e+ ^* ^$ n n: e
@.Destination :=* ^; |: q/ w& }4 Y8 x( U" W9 F. b
rgManager.nearestFreeStation(@,track.~);
; _- i. b6 c ?% I- s. I( l newDirection(@);
0 n' h' b* f$ L' M- r if @.Destination /= void then
, V+ w8 K' r- E# t @.Destination.NumReservation :=
! @ F% [. L1 E* c7 A @.Destination.NumReservation + 1;
% F+ e9 W9 i6 z" A2 |0 R end;, u- T, T' \7 g/ G X1 D4 v7 T
@.CurrIcon := "drivingHome";$ U( D# G4 ^: G5 k8 u( k% J% J2 g# G, B
@.DrivingHome := true;
3 k$ Q5 T; R2 w: G1 `; M+ A end;
% J+ ]- _2 @/ D; s1 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station* w# `) P( H+ C) i- r* f4 Z
part := @.transpOrder;
5 P/ i$ t h U( s ~1 c part.move(@);-- load part$ m' Q" W6 ~4 g: h2 V
@.CurrIcon := "load";4 d2 H+ ~$ O u$ ^5 f; S6 K; l. o3 W
GlobalDistObj := part.globDestination;7 Z1 q. F" |6 H+ F" r9 T' h# H4 \& `: z
assignLObj := rgmanager.rgAssignL;
8 |: V! c ]3 R( ]3 |* n row := assignLObj.getRowNo(GlobalDistObj);- ^5 T: B& x& }0 b
if Row = -1 then -- since 70) ?9 c6 W: @7 k; b; `( f' p
if lan=1 then$ y8 E) S4 y7 D5 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), I7 S, N, h3 D8 o+ ]9 v9 t
to_str("in der Andockstation: \"",?.~.name,"\""));
6 Y2 j0 M3 O8 {, M5 V; K3 K else/ @, t, ?/ P9 @* \1 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ~) z+ p4 P* u' p _! s
to_str("in docking station: \"",?.~.name,"\""));
5 C' ]2 a7 G& j end;/ H' L) w0 e" c) |+ z$ m* C
else, d& q& P6 @- X6 |- N$ S
@.Destination := assignLObj[1,row];& L: ~; i( Y$ p6 Q! X) n
end; 6 y! k9 c8 B9 M G1 p8 ]5 J
newDirection(@);
1 ~2 s$ a/ }2 S7 y6 b2 @, }9 ~3 e @.HasOrder := true;# N2 Z4 v! K- F! H" x! @4 ^, e
end;- v; B$ N: l+ x( j: ?9 r# O/ C
end;0 K+ d9 _4 h/ e- y2 O9 n
end; -- of the method
" d9 x3 q9 B# D2 W) n1 Y |