/* called by: entrance ctrl of the object 'track'9 I) m7 h/ ?" ~
*/9 X* j, j2 X+ R3 A, d6 R; ^) W
is
) h$ I& m' ~3 ?; P5 R1 K3 @4 Q" c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' t _* Y$ E; s. Cdo! _- u( {7 j+ v7 F8 f+ o6 D
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e% g. ?- ~0 G$ D if current = @.Destination -- else return
A! D( i6 o3 @% D5 j4 ^ then. M* J6 p- W. R5 T4 m3 C) U
@.Destination := void;
/ F. m- F: ]$ W0 n1 F: @: X if @.occupied then
; e% |5 V9 r" _2 ~ part := @.cont;# W( x) Z; X3 v* N& D
@.transpOrder := void;
( j6 u- X1 ~: u* }4 e; k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% y: }" z, g. o% ] @,root.eventcontroller.simTime);, Z0 \$ Q) J" x! n
@.HasOrder := false;* m( {9 B% z! b& C \
@.DrivingHome := true;
S) |# G/ ^# p' _9 T$ @ rgManager.tryToStartTransOrder;: k: `+ A5 Q- N. z' o; V. @$ W
if @.Destination = void
6 {4 Y. o; L* ^7 _. J7 F0 A then -- no transport order for vehicle @4 K( `. F) ^; a1 c! w! Q% H/ k
@.Destination :=
" l6 V }# h# r, I$ s rgManager.nearestFreeStation(@,track.~);7 P% K& T: e' d
newDirection(@); . ?6 m( z; j* D: z4 x8 q) w. Y( }
if @.Destination /= void then
1 ?6 K* @- t) } @.Destination.NumReservation :=
5 v5 K9 |6 i! e9 h% C% ] @.Destination.NumReservation + 1;0 o1 ]$ x0 Y- W3 j( p6 q; C
end;
6 U7 u/ Q: q( [2 }$ Y; S- h! _. x @.CurrIcon := "drivingHome";" N! n! S! T7 {
@.DrivingHome := true;
% }# Z! @4 f- B4 ] ?7 M% b end;
0 q' _5 m* E5 k8 f6 `: e6 l' |$ J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 h0 V! v. C( z+ }% \. R9 Z part := @.transpOrder;
" S5 D$ A. U) a( e0 \( R" E part.move(@);-- load part/ t0 S' t2 B0 `7 A: A' J- m7 }5 _
@.CurrIcon := "load";
( p- W: f7 M6 w/ L GlobalDistObj := part.globDestination;7 c/ z9 G7 r8 U, \* [
assignLObj := rgmanager.rgAssignL;
% U" p T% j. o" [! c3 ~! ?5 a row := assignLObj.getRowNo(GlobalDistObj);- x1 p+ w |+ `0 B, n$ H
if Row = -1 then -- since 70! i* z" j/ U ?8 f8 i, l
if lan=1 then
# g# p7 x3 D( h$ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 i0 b9 a: v5 W' |! u& M
to_str("in der Andockstation: \"",?.~.name,"\""));! \( G7 T- h+ u) W7 S* N7 P& W. V1 D5 |5 g
else: G$ ?' n, w k+ T7 H/ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" p$ \8 O( W. y6 g6 ]/ [0 {6 d3 ` to_str("in docking station: \"",?.~.name,"\""));
2 ]4 ]" @/ J% S( A end;
: a2 {5 r! `/ H1 Z" B' k3 j$ s else
" y2 ]% ^. Z, p3 t- ~2 n& f @.Destination := assignLObj[1,row];
5 o8 I( g8 X, Z3 ` end;
$ c" Q y4 F! q# w1 g! c newDirection(@);
0 F: ?, s% R7 S/ H# h @.HasOrder := true;
- _6 A4 o# K# M/ ? F1 V. R8 I end;3 L1 y# m" U6 x& r$ L' U+ \5 y
end;6 [! L9 q; F5 H( u
end; -- of the method
9 X' J0 @- m1 |0 T. l1 i |