/* called by: entrance ctrl of the object 'track'
. I- m3 D1 a4 o0 I$ @3 P*/0 I7 E; D4 O0 ~- a
is
& p$ W _3 E" {+ { part, GlobalDistObj, assignLObj:object;row,Lan:integer;, x! {& K3 l9 {
do) J. g. G e+ _& {. ?) i+ n# T
Lan := rootfolder.Internal.Tools.AOLlanguage;* G) I+ H" [. B5 w0 U
if current = @.Destination -- else return4 y6 O7 L) X, [: {) T! j( E/ U! _
then+ ] L9 h) z: D* I6 h* o
@.Destination := void;% @9 z" B" d3 U/ F% A* ?% g
if @.occupied then
9 G& c( x# q( ` part := @.cont;
$ {, J! z2 D4 X& [6 x @.transpOrder := void;
U. C" @* D( {* L2 \1 C) } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' L4 V# f, O* Y- Y& y6 h* F% N @,root.eventcontroller.simTime);
J& n0 y0 U' D( `6 z7 E7 ?' C9 n+ } @.HasOrder := false;
4 B1 s7 o. F$ T7 ~. T @.DrivingHome := true;
' I4 e8 T# s- L& i% g rgManager.tryToStartTransOrder;. F2 ?# N& c" j; P6 U- B
if @.Destination = void
9 [% \6 B3 ]4 D8 T' I/ l then -- no transport order for vehicle @2 g$ H: [) M! A J/ W: I' ]
@.Destination :=2 A+ [' }' v6 V2 \6 x
rgManager.nearestFreeStation(@,track.~);4 d) |- M1 p- N- q% v% A8 f
newDirection(@); 1 u+ ^& B9 Y/ i% B d
if @.Destination /= void then
6 `8 V$ ~' M) S/ b6 o @.Destination.NumReservation :=
0 l5 \, U8 e* i1 z5 h3 D5 [2 r @.Destination.NumReservation + 1;5 j6 |! @, G. \* E- y
end;+ j9 c" B2 P/ r4 i1 n) O: l( j8 Y' F
@.CurrIcon := "drivingHome";
# b# d) _% E& O! p6 _4 H2 i @.DrivingHome := true;) [4 S+ K: ~1 [
end;
* N" p) k0 G7 Q( t9 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 v% l/ x0 n: Z
part := @.transpOrder;$ n, ?/ ?3 _4 U/ J% U$ G4 a( t2 }
part.move(@);-- load part: O" U% Y( i. G
@.CurrIcon := "load";; s5 Z& C2 p4 j! | Q0 k: X
GlobalDistObj := part.globDestination;
|( s2 \8 Z4 l. G9 a assignLObj := rgmanager.rgAssignL;
& ]/ s$ k& g( F% G4 n K row := assignLObj.getRowNo(GlobalDistObj);
( N$ {3 q4 G8 q0 R& ]. t; | if Row = -1 then -- since 70
, y @8 R0 Q/ n5 l if lan=1 then; P1 t- C( v% X ~0 Q# b* l$ z& r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; E" `& j$ m) c* ^$ i1 c to_str("in der Andockstation: \"",?.~.name,"\""));
. ~' G" q& p3 x) a/ v# y else. z& e3 m5 M# L/ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* I, V6 @. h6 `9 Z9 ]5 Y) M" ~, H% r# ~ to_str("in docking station: \"",?.~.name,"\"")); 8 q, x* q" J1 o) r5 p- B) p
end;8 Q8 @; E: B" c) X
else! i4 `' Z) @4 k
@.Destination := assignLObj[1,row];7 p5 O! E5 z/ v$ p' d6 g- F V+ E
end;
4 q9 v4 B! g: F1 S newDirection(@);, {7 _. i+ j; |
@.HasOrder := true;
" s- }: a& B0 m$ \ end;3 M1 C( M: a6 G4 Q, K1 ^3 @+ P
end;
: x, U7 C1 w" \4 l5 gend; -- of the method
, H- P& V L9 ~8 {5 a6 ^( y |