/* called by: entrance ctrl of the object 'track'
* t6 p! E( h0 H( p*/
# H/ U; G2 [' X2 [ B9 Kis
8 R, l# i# F+ P2 C. G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 u) o: S3 H2 y& [# r/ p& Wdo" N/ O8 O' Z/ H& T6 P6 p
Lan := rootfolder.Internal.Tools.AOLlanguage;
: y5 W; q6 k6 Y. ?, T4 U1 Y if current = @.Destination -- else return7 \) T! N, i% ]/ I: b; t9 l
then5 P0 `0 v# Z0 C: x
@.Destination := void;
, j, w( ?" C2 l: C) X8 U7 @1 P if @.occupied then7 e$ ~8 }, G, K7 M
part := @.cont;* x, ?2 b! V& D0 m
@.transpOrder := void;9 B0 e$ F+ O V( m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- f0 A& [8 t2 r: u: ?& C9 Z, _( M |
@,root.eventcontroller.simTime);
9 J9 s2 T- b V! O( e% e" h' w- [0 A @.HasOrder := false;
# A. [3 Y f0 E5 Z2 U4 h. m! G/ o @.DrivingHome := true;
8 i! b1 Q- r+ ~3 a: l rgManager.tryToStartTransOrder;3 n" h4 E/ O6 r
if @.Destination = void. `' ^ r1 T3 ~: w5 a
then -- no transport order for vehicle @& k* R! _, y% M& m
@.Destination :=$ {$ {3 C' ~9 A& a+ N l4 k1 |
rgManager.nearestFreeStation(@,track.~);. H, a$ x, a4 G( K2 G% m# P! J
newDirection(@); ; L' V* T1 x2 F9 {9 m3 t, H
if @.Destination /= void then+ \$ K: T1 u$ r$ U
@.Destination.NumReservation :=
- T( ~# j! f$ l* O1 r @.Destination.NumReservation + 1;
; h" w; g* P; g* [1 J end;3 Z' y1 X2 m' K1 p- e
@.CurrIcon := "drivingHome";* {9 N5 d& a0 @# {( V
@.DrivingHome := true;$ j P; m9 T$ }# Q, X
end;# Z5 B4 h/ J) @/ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) F* k, z+ c W$ l
part := @.transpOrder;, v/ u7 b8 q& a( V" U, ^) v( w, d
part.move(@);-- load part+ A" y$ a' {2 G6 C$ |) P/ M- c
@.CurrIcon := "load";6 f8 ~6 x3 G- t3 v$ O3 o
GlobalDistObj := part.globDestination;4 K2 Y$ F2 Z7 [9 Y, E7 V
assignLObj := rgmanager.rgAssignL;- @8 a: D6 B4 @4 G/ e3 f) p
row := assignLObj.getRowNo(GlobalDistObj);
/ _5 S, k1 }" B, Z' Q if Row = -1 then -- since 70
2 F8 N% t8 T6 ~1 M: Q if lan=1 then& z8 \ T8 y4 Y9 H+ u* a w( t {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G; Z" @" W- C& C to_str("in der Andockstation: \"",?.~.name,"\""));& ~2 y1 p @8 q( [2 l" @" e
else
2 M5 r+ @& ?- Y ], X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 a7 j/ O6 U; O( j' F, o to_str("in docking station: \"",?.~.name,"\""));
0 v# \& | w s/ F& N end;
- I( J2 ~/ E$ S0 n2 m1 ] else
5 U7 \9 G1 T2 J' N* B9 K @.Destination := assignLObj[1,row];6 L" _- F7 A; g, R
end;
% ]& L* O4 @3 S1 X# E$ y newDirection(@);8 J, y: L+ X3 d3 [/ P4 Z s2 \7 N
@.HasOrder := true;
9 ~6 X* k R- w' u end;6 ]" k G. ^% c# I! _
end;' s# d/ M4 |' f9 o4 C9 d& n. b
end; -- of the method; V, ~- g1 G& {1 I) _3 f+ M
|