/* called by: entrance ctrl of the object 'track'
2 _2 U# H" z$ P& J7 p*/9 y; X- d$ {5 g; g
is/ O! y, W! m% ^$ S6 v3 w, Z, w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 [5 \: p: S3 ^$ J& gdo
; a1 I7 W5 D# y8 {1 w Lan := rootfolder.Internal.Tools.AOLlanguage;
2 E3 }( P+ A0 J+ H' {- Y; ]) S6 \ if current = @.Destination -- else return
) t. V/ i& P- M/ t+ w then
: s7 F- j6 t0 ? @.Destination := void;
. c/ N; g$ Y( Y L& ?8 @' U if @.occupied then+ t7 \8 |( B! t7 o: N
part := @.cont;
- @. U0 _6 f6 P/ l/ l7 T2 a @.transpOrder := void;
9 G: `% R- {# C& V0 C q/ d+ H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 m8 n. v) Y6 }2 v: K @,root.eventcontroller.simTime);9 X6 u3 Z- ]- m( r
@.HasOrder := false;; ~7 E5 k3 H7 Z
@.DrivingHome := true;
3 q6 ~6 p+ o) _. \; ^ rgManager.tryToStartTransOrder;
$ f- ?# q8 s0 o) S0 D2 [( h( J if @.Destination = void
; z* ?8 m$ r& r7 Z& D* B then -- no transport order for vehicle @
" B+ o! O1 B( z @.Destination :=1 z9 x2 S8 ^7 a
rgManager.nearestFreeStation(@,track.~);
1 Z1 F0 z# A7 a1 C- K6 ? newDirection(@);
+ s4 [% A* T+ M9 X; Y if @.Destination /= void then K& V- o9 N7 L
@.Destination.NumReservation :=
9 M! Y( M' M W/ y) B; N @.Destination.NumReservation + 1;
6 Y7 }4 J* s. R \4 E8 F end;
* B7 M6 w! U) K( O% [+ c @.CurrIcon := "drivingHome";. a" g; {2 P0 Y5 ~2 \2 i+ d7 o
@.DrivingHome := true;
7 W1 |: t# e X) O% k9 n end;
9 R0 e3 M F8 i0 {; N: Q$ d" r- ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station) R" X/ j6 N# f" f! `5 I- j1 j
part := @.transpOrder;9 e) ?% t1 s5 U
part.move(@);-- load part
4 [1 x2 @: P; e @.CurrIcon := "load";
- t: Z. C. E) n* i0 a% q ?' |% }1 j GlobalDistObj := part.globDestination;+ ~& }" b. \: q: T X
assignLObj := rgmanager.rgAssignL;
M/ [" H2 l6 P+ |% }! I( c row := assignLObj.getRowNo(GlobalDistObj);
. @9 R+ C( O. M) S& n* P if Row = -1 then -- since 70: G# F# l7 E3 S6 `' k7 E2 N
if lan=1 then
7 \, y4 f: y' m6 P) Y) j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 @4 G- v- ~# {5 d$ K! P to_str("in der Andockstation: \"",?.~.name,"\""));+ S. o6 R4 }2 J$ k+ J
else* X. o4 P2 B3 N+ J/ J( X+ y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" h: \7 B: l2 F. k3 w to_str("in docking station: \"",?.~.name,"\""));
3 @2 b2 {% ?, d5 ?7 \ end;# N& [( [3 d1 U+ X4 p
else
. r0 ]" E$ C* X* {% ` @.Destination := assignLObj[1,row];
& F4 p; \! e. {! J, u/ Z- i6 } end; ( X. ^4 r. l) d7 I
newDirection(@);, T6 e$ y- F# `& C- e
@.HasOrder := true;0 i- ^7 |2 |# d+ k% `* X: ? Y
end;* j* y0 a/ J# J" J% F! Y" _& Y
end;
7 R% T/ W1 ^6 p# Bend; -- of the method
: J/ g+ i" E* V5 H- y |