/* called by: entrance ctrl of the object 'track'
) Z4 y6 A8 r$ f3 {; ~*/( N2 V4 e. | F5 Z, |, C) w0 x
is6 H& O+ Q- @$ n$ M3 K% V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 u' A0 q% t8 L3 q v I
do0 n2 w, r- ^! Z7 D W
Lan := rootfolder.Internal.Tools.AOLlanguage;
. a8 M3 h, O+ W: q$ A" h0 |. h if current = @.Destination -- else return
* D8 D$ g/ u8 l8 M( G f @ then
( H9 c2 v; `4 l& ~2 E @.Destination := void;
7 d$ y# S& b; s' ?' k0 M- @$ n if @.occupied then
. ^6 V9 y0 I' F3 J8 Y part := @.cont;
3 X) b- a) k- r9 A/ ]- x$ A7 Z @.transpOrder := void;
0 o# G2 Y5 F ?/ n- h/ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 K- l/ t- q0 w+ O. N+ q+ K4 P @,root.eventcontroller.simTime);! _1 P6 ~5 V; L, j' E! N
@.HasOrder := false;4 A1 M7 U: w* Z1 t
@.DrivingHome := true;
# O: m4 J$ z& Y% F' `4 K rgManager.tryToStartTransOrder;8 I8 E& S& S% V
if @.Destination = void+ e9 l" ?, u7 L l# |9 C
then -- no transport order for vehicle @
! N) T+ `1 p3 X @.Destination :=2 Q9 _0 j6 {3 Z6 U7 m$ R: o8 e& k# r
rgManager.nearestFreeStation(@,track.~);, p& |, T4 Z. g6 W: M8 } h: o. Z
newDirection(@); 8 D3 Q* G( [" }8 u) M
if @.Destination /= void then
9 p; V# w3 g7 V/ \) g2 b3 z @.Destination.NumReservation :=
. m7 ]6 C# z, o1 f% V @.Destination.NumReservation + 1;' b( e: Z; p' L
end;" Q: L a$ D" L" P
@.CurrIcon := "drivingHome";
2 I0 j l4 j6 O" k! w& e! { @.DrivingHome := true;
; X, x2 P' j9 b' ~5 b; ` end;
2 j% C5 j- \$ I9 O- Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- y$ p; u2 Q- [/ N2 e+ } part := @.transpOrder;; |7 Z9 h& ?/ L8 | }% i& v
part.move(@);-- load part
; R& M, ~: @' Q7 i! D @.CurrIcon := "load";
0 `. Z- I: \3 W. w) j" X+ N' J GlobalDistObj := part.globDestination;
5 \$ i. _" T4 n# w! e) [6 } assignLObj := rgmanager.rgAssignL;
' d. t! R2 ~1 ~ row := assignLObj.getRowNo(GlobalDistObj);; z1 p! I5 Y$ j8 A
if Row = -1 then -- since 705 R( M! I5 ~8 U( S3 ?* i' |
if lan=1 then
/ l/ E" q: y* W5 z; Z7 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! c9 E* l5 _3 F. u. O, V& F to_str("in der Andockstation: \"",?.~.name,"\""));' l% a+ i6 \7 j. _/ y& F5 t
else
7 j/ n6 I$ [, l# P2 ~. ^% x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. F) b d: a( @
to_str("in docking station: \"",?.~.name,"\"")); - r1 W6 d- b5 O
end;
0 @9 O0 L, d% f else
' x7 ]; q& k7 U0 I2 v' B4 I. @ @.Destination := assignLObj[1,row];; F+ m" X( F* g0 Q T
end; " n+ ^3 p( P* O) M* o, i3 i
newDirection(@);
1 b) n- l& Y5 d5 j @.HasOrder := true;- t* c9 u V2 N" c( S
end;) c: o( ~' J( G: I
end;
; H8 Q V, z4 _end; -- of the method
9 I4 D3 ~$ `! ^' [5 { |