/* called by: entrance ctrl of the object 'track'$ O% L0 I. J" t; }
*/# @ ^/ q' [ j) d2 ~. p# ?
is" _5 X- H8 V8 o* `* G/ f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 A0 J& E- y( l# ndo( ^2 W7 A6 J7 k' O% _* O
Lan := rootfolder.Internal.Tools.AOLlanguage;: u4 p% N; X5 {) U5 G6 w
if current = @.Destination -- else return
/ `* ?0 Q' b T* | then
0 d! w" ~# o0 v* J1 F @.Destination := void;8 r& [7 q+ X3 k# j
if @.occupied then
& A/ |0 W7 |2 c6 D( c part := @.cont;
% M5 g& o, J3 w0 m1 n. D9 x' z @.transpOrder := void;
2 h8 `" f% v' ?2 c/ M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% Y& u5 e. }1 H- L( [) m @,root.eventcontroller.simTime);
+ r3 c2 n3 b3 M9 H" B5 o& |" u+ y) m @.HasOrder := false;1 ^/ s) g0 Y* x- o- f4 Z: T
@.DrivingHome := true;
% K4 `( L6 f( c, \ rgManager.tryToStartTransOrder;
& D& o& E- S) \6 f4 X if @.Destination = void
5 U4 G2 x4 _7 l8 i' g1 t then -- no transport order for vehicle @
2 u7 o& L6 i+ d6 F) ^# G, L; d1 Q m @.Destination :=! Y( |. y8 Z! E- O
rgManager.nearestFreeStation(@,track.~);- T: e; G/ j" E0 `( e" z" J! e
newDirection(@);
. c6 ?' q; g1 r4 i% u4 I' \ if @.Destination /= void then# r! g9 _% [" @: g7 X4 U
@.Destination.NumReservation :=
: y1 o: {9 a: \ r- ?( O3 V @.Destination.NumReservation + 1;/ y v& T6 D* X
end;
1 r- l* `& ~9 z- S @.CurrIcon := "drivingHome";
+ O; c* {4 ~$ Y4 v+ t @.DrivingHome := true;
$ p* I% i! D* d1 L% C* ` end;
2 {8 n3 }; L8 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station# m) ]- [$ I7 U0 _, H; t
part := @.transpOrder;( w9 a: b! N: C) B! H0 ~9 W+ f
part.move(@);-- load part
' z9 j( A# |+ W3 G7 [2 i @.CurrIcon := "load";
0 k, I, N4 O9 v) c# W, ] GlobalDistObj := part.globDestination;1 \1 \! q1 P' J0 _
assignLObj := rgmanager.rgAssignL;6 `/ w$ @# S" O, d5 Y: K
row := assignLObj.getRowNo(GlobalDistObj);/ g- R, A7 |4 z1 Y6 B
if Row = -1 then -- since 70, D8 Y$ p4 z9 I; c: {8 K
if lan=1 then- k2 d4 f- ?4 z* ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 e' o6 C7 `7 j* E; i to_str("in der Andockstation: \"",?.~.name,"\""));
9 n' l8 j0 z! Q; T else6 |5 i% z' m$ Y! |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 m+ U: i- W( X" i0 ]4 }# X; p; K
to_str("in docking station: \"",?.~.name,"\""));
0 u8 y M0 g+ V" h end;
, b- T6 c; ~. Y. }* m! X else6 o% j5 H; R1 x6 e) ]
@.Destination := assignLObj[1,row];
( [0 I2 ]4 b" e# K4 i end;
/ D; E9 R) p/ H7 D newDirection(@);
D a0 U" j3 ^- [3 t# y8 O, B @.HasOrder := true;
: l! ~* Y8 n/ x- w$ U/ f8 h end;
6 w8 F. o& p1 F( L end;
! c! z) n$ I5 T- N& o, w pend; -- of the method- Z& ]* f- H5 L. e8 T& n
|