/* called by: entrance ctrl of the object 'track'
4 o, q4 }& w' Y: d& |; t$ Z5 m*/- \! D9 [6 s J Q
is
3 O6 h1 [" e, ^: |& r0 Z* x6 `; q7 n5 T- x D part, GlobalDistObj, assignLObj:object;row,Lan:integer;; |. L; B( s; n; q
do
; x6 F) u/ m: x Lan := rootfolder.Internal.Tools.AOLlanguage;
' K( m1 \2 Z& f {& n if current = @.Destination -- else return- ~4 K. V2 p( |2 _7 K3 s
then
4 l" N6 A: D" o @.Destination := void;
7 |/ P- M0 n7 t4 ^ if @.occupied then' |* V6 Z; A! Q
part := @.cont;; W; D' U" O3 j( f5 G C# m4 v
@.transpOrder := void;9 M- O4 ]* ~2 D- o& A' A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ G" j& d3 D: I" w. Z
@,root.eventcontroller.simTime);) @: C& Z" i% m; d
@.HasOrder := false;
1 K# Y; o3 h/ U7 A* s @.DrivingHome := true;
' x, J r! t$ J T- Y0 n0 D0 _ rgManager.tryToStartTransOrder;
, y; I) O5 w5 K6 { if @.Destination = void
+ C1 T# ?: E5 P6 W; O then -- no transport order for vehicle @; V# ~% c1 q8 C
@.Destination :=
' Z4 {) |, \/ o# d8 L7 \8 _ rgManager.nearestFreeStation(@,track.~);5 I. W! `0 G3 }0 }6 }
newDirection(@);
: o7 D" v* Y) ~2 O if @.Destination /= void then0 \) A9 s0 I2 M4 C* z* M
@.Destination.NumReservation :=
1 {: y2 T% v% ]7 [9 v @.Destination.NumReservation + 1;
1 p, x% y& {. [8 j7 |8 A end;
# B7 f0 h7 V" K* S @.CurrIcon := "drivingHome";4 s* _" d! B/ T3 \4 {8 P* M$ D
@.DrivingHome := true;
8 J3 }& H" I" ?0 t end;; v. ]! `2 Q( i4 l, J8 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 f+ H: @( E. p1 z$ I
part := @.transpOrder;, i( K# Q# S# u# A
part.move(@);-- load part
" o& |' v" w4 u) J5 V$ } @.CurrIcon := "load";+ }2 _- v6 R$ q3 z- S
GlobalDistObj := part.globDestination;
: L% M& b+ j* m+ M, x9 ?! B assignLObj := rgmanager.rgAssignL;
. V, m7 v6 W" h! N) U$ D row := assignLObj.getRowNo(GlobalDistObj);3 r, e/ f* y6 [# L7 A; [
if Row = -1 then -- since 70
0 k, a" [, f5 Y n1 R$ i) c. G if lan=1 then
! o! ^" S& W/ L }1 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ?. p. w) X6 z& j5 T3 D% _* w$ J
to_str("in der Andockstation: \"",?.~.name,"\""));* m" Z u. ]" H& _3 u1 s7 E: c6 ?
else! e6 W/ s& ^+ ~$ G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. w' _! d) M- T% r to_str("in docking station: \"",?.~.name,"\"")); $ q9 m+ L1 _* x/ p+ Z( q4 P
end;/ ^6 Y3 I' `# d8 |
else
( [' X8 o3 u8 P* T @.Destination := assignLObj[1,row];/ ]" g! j2 r/ I' Q
end; ! V* ^7 C, R8 t- A# W E. {' E
newDirection(@);
1 J% H) F ^( t @.HasOrder := true;( F5 h& q; r+ \. m$ X% P
end;" g$ e. H+ m& N5 n. v
end;9 \. k4 M4 x4 \3 j/ [+ t/ q7 G
end; -- of the method
/ J! u" C/ @( N |