/* called by: entrance ctrl of the object 'track'
- i/ f3 S' j1 f*/
8 K3 g2 F( I/ ?is
* F( A; q; }, r1 e; U3 M% \* v% E- B part, GlobalDistObj, assignLObj:object;row,Lan:integer;) s- ~5 ]1 }7 a% ?
do
1 h2 F. ]1 E9 {/ n4 N0 } Lan := rootfolder.Internal.Tools.AOLlanguage;
6 L ~- u4 I2 p" {5 a# Y2 O if current = @.Destination -- else return$ j) y1 K4 Y) s2 ?* ?; @& E7 B
then% e1 `( @2 ^+ D. z* a+ \1 I8 O6 e* z
@.Destination := void;
7 h: R! g- D) ]9 v. { if @.occupied then& z, k+ R* }9 {" @
part := @.cont;5 D" S7 f8 M# Z+ o1 V. e; V
@.transpOrder := void;8 P) Y4 W% S, {% P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 |, [2 r, r; ~8 I: j
@,root.eventcontroller.simTime);/ Q4 n9 o3 |& @& Z4 a
@.HasOrder := false;
/ U* n7 z6 V2 ]% A Z @.DrivingHome := true;3 _0 c3 l' s* s; e F
rgManager.tryToStartTransOrder;
8 w) N, Q: q% |. S2 G' o8 j; U& G if @.Destination = void5 R/ F/ P( E/ c: o7 |" q6 R( @
then -- no transport order for vehicle @
8 \* v: \ h0 B5 e$ g3 u @.Destination :=
b9 ~% d4 ~- t/ ?0 G rgManager.nearestFreeStation(@,track.~);0 x! S$ W6 n# G. {' F
newDirection(@);
- Y u, ?/ e- A9 X) y6 U' h* o if @.Destination /= void then) v- W+ d" N" F' d% T9 H& x' c
@.Destination.NumReservation :=
8 U. j1 U) q" P, _" ?) G- J+ } @.Destination.NumReservation + 1;& I J0 C- f4 Y! w4 ~! U" [
end;
1 @$ W8 T& O3 \5 E; q- x @.CurrIcon := "drivingHome";
" L9 t0 T( |' j @.DrivingHome := true;" l( H1 p) Y4 @# h
end;, o+ S, Z7 J' _' ^5 k( i* o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ d& Y, V$ P9 i. U
part := @.transpOrder;6 J4 Q: d& ?9 _8 f
part.move(@);-- load part
% G( _" j/ Q1 r. B @.CurrIcon := "load";
$ C, }1 ~5 |8 W% t1 g GlobalDistObj := part.globDestination;
3 X; C5 p( j: d s' P$ Q assignLObj := rgmanager.rgAssignL;
/ W5 }/ p6 `7 D' D1 E! A row := assignLObj.getRowNo(GlobalDistObj);* B% [: }- k, h8 _8 K: _6 U
if Row = -1 then -- since 700 e' D; f: F4 S( `, w
if lan=1 then7 N2 }; O1 z* j+ q& p, W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; C" r, G: ~' v7 g" J' r, R- e to_str("in der Andockstation: \"",?.~.name,"\""));+ o$ ?- k& O" p
else
7 t$ j" q& o! F/ o5 u8 P+ L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
k; H; n% r, E& B0 V i to_str("in docking station: \"",?.~.name,"\"")); ( |9 X2 S( m% Z
end;
0 E# q2 f( ~3 H: g& G else
1 M0 O5 c H$ C6 s8 w3 Z4 f5 c @.Destination := assignLObj[1,row];
. t! W0 w3 M, `# q4 o7 `" F end;
. b+ D9 P X4 e0 g6 {8 w% d1 E" E newDirection(@);* W g! N! _, U. Q
@.HasOrder := true;. K# u- N ]# y- r$ g" ?
end;
) R+ I J) ], h2 I$ o# b$ f end;. G3 T2 m5 r) Y. [+ Q, M" ~
end; -- of the method
* F8 H8 Q4 E) n1 n" i8 P C) G% } |