/* called by: entrance ctrl of the object 'track'6 ~8 \, g( R5 V: ~
*/
& K7 x) a8 C2 S* f* D& J R' dis
5 E/ b) ?1 n2 @9 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 ^& n/ b& h/ A9 Sdo
9 T6 k! e' K$ [" N Lan := rootfolder.Internal.Tools.AOLlanguage;) I3 ~6 |# g: |0 z$ j" h9 d
if current = @.Destination -- else return
0 f, ?) i: _/ C! V7 e$ [ then
- |1 x. F) p) p k @.Destination := void;- Y C' \, _. k+ p# a, H9 m
if @.occupied then9 v: n9 U+ b) l9 t
part := @.cont;
# c) n" r! Q5 Q @.transpOrder := void;
1 ]3 h1 {+ K! K. w9 [& T* a* G( y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 s6 E- p" ?1 {8 ` @,root.eventcontroller.simTime);& O& z* e. d# d
@.HasOrder := false;
) C3 v0 o( T$ y% l9 \8 C+ T @.DrivingHome := true;- R( v$ h0 ~0 |) ]! w
rgManager.tryToStartTransOrder;
- D! [3 Y" p, I3 C/ x) \ if @.Destination = void
1 ~9 J5 J2 ~, d then -- no transport order for vehicle @
' f8 c @ y! T @.Destination :=
5 {1 G" f" M4 ^3 i' i4 f rgManager.nearestFreeStation(@,track.~);( \) `9 Y# i7 R x
newDirection(@); 9 ?: w# y. \2 f9 ^$ n, V
if @.Destination /= void then
& O* } l2 T1 c8 C# \4 h0 \# r @.Destination.NumReservation :=
( }' r( Y% W7 G' R @.Destination.NumReservation + 1;
4 ]+ l# t7 f+ v, J E' ~- w end;" }% `# V9 W; h4 }3 ? k5 Q& e, Y
@.CurrIcon := "drivingHome";
1 a. W) D/ X# L- ^7 R4 L, ~! i& u# C8 n @.DrivingHome := true;$ L0 f& `9 T& A$ \! h# T* Z. H- n
end; N b0 o. a/ `2 E& o4 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% J. V3 f2 z& [, y5 P part := @.transpOrder;7 K! f2 G. R4 K$ V$ L$ T
part.move(@);-- load part6 h$ l7 Z+ @' b% J: z
@.CurrIcon := "load";% Y8 D* J. a7 f/ ]. E4 w6 W4 @8 w
GlobalDistObj := part.globDestination;+ h5 P& D* j( I; q
assignLObj := rgmanager.rgAssignL;8 V; W: |' o5 { Z" U
row := assignLObj.getRowNo(GlobalDistObj);
- S4 n1 G; E. B! N if Row = -1 then -- since 70& ? X* j7 M) `
if lan=1 then' k. X, c' _$ R" s5 G U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. e/ n0 b1 w y( n3 e" s, C
to_str("in der Andockstation: \"",?.~.name,"\""));
" K5 k% y/ R' B4 A& x8 `6 }) Y1 ], o else' ~5 @: Y5 ]. e+ E: X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 \% D# d: E" g7 C9 @ to_str("in docking station: \"",?.~.name,"\""));
% m: x$ L3 j) p8 q* S% Q end;
: B! _4 |. \9 C9 V else; D, O \1 j1 K. ^, X7 P. d% n
@.Destination := assignLObj[1,row];' U2 X8 z5 @1 T3 X& I3 Z) W$ G& t
end; ! |( c+ K$ h" G& p
newDirection(@);: Q6 E; e# E: n) s2 J% T
@.HasOrder := true;% }3 C, e/ F2 B8 Y; ?: N
end;! [% I2 X, i- M) @
end;6 Z9 {! f7 ~" O; Z8 v" |- ]
end; -- of the method6 g0 `8 Y( z5 q: J% q! u+ |" [4 ?
|