/* called by: entrance ctrl of the object 'track': f4 H U6 W$ q/ C1 w. L3 L
*/
N8 y. M' H$ z. iis
7 |5 ~- `0 f/ b part, GlobalDistObj, assignLObj:object;row,Lan:integer; ~# `% k* T+ Y8 K9 s
do# O" O7 W3 R' D% t& _/ y7 I8 u) z
Lan := rootfolder.Internal.Tools.AOLlanguage;5 B4 Q5 d7 l8 u1 K
if current = @.Destination -- else return7 f$ {- Z1 E n& j/ Z3 ^
then1 X, M& k$ z1 n% Z: K# c
@.Destination := void;
w( J% I+ y( \ if @.occupied then
* C o( I! E$ a+ Z9 V8 J2 X2 A part := @.cont;# u: O8 p7 N4 S# @* Q" H' |
@.transpOrder := void;
$ s+ `1 O$ y% b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- B P; x; Q b0 _' Z
@,root.eventcontroller.simTime);' ^. c* t. J9 ]& `
@.HasOrder := false;
; l% S+ S! N9 K m+ F @.DrivingHome := true;. F* m3 u* f6 q% X% X1 x- z
rgManager.tryToStartTransOrder;
6 h- G c; L; l& o8 P1 i if @.Destination = void
3 K, K0 l& I& B0 E; ?6 M9 M* W then -- no transport order for vehicle @1 m" \2 O, ^, x( _. R$ \
@.Destination :=; _9 F( h. Q' q/ E8 T6 T0 e; B
rgManager.nearestFreeStation(@,track.~);
, \; s4 ^' E D newDirection(@);
( \/ [9 K+ Y) _9 Z7 O' U: ~! l if @.Destination /= void then
9 ~: g1 i' C* V/ K2 a8 W6 w @.Destination.NumReservation :=0 r5 n; E: v7 U0 m- E, _7 |- L
@.Destination.NumReservation + 1;
* V+ e6 }2 ]* ^3 J. s end;* M. Q% n5 W' R/ F% ]# p
@.CurrIcon := "drivingHome";2 Q2 t; t! P4 q0 Q; o" `
@.DrivingHome := true;
8 d S1 }& S8 z4 I0 t e end;4 h7 L7 b' W- @3 |+ D: K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' J4 m0 u0 d1 C+ ~$ Z/ Y' x$ v# A part := @.transpOrder;
1 y6 p# t( b- t( l. K part.move(@);-- load part
& q* l7 ?& F. `* d2 t5 P1 @5 }: d @.CurrIcon := "load";8 U. \, R4 r, [/ e
GlobalDistObj := part.globDestination;' ]9 y! d( f. S, l; Z2 q
assignLObj := rgmanager.rgAssignL;* N7 ^$ v9 ~8 r4 i. J' h/ _
row := assignLObj.getRowNo(GlobalDistObj);/ x+ d* P- |4 R7 V" K& c) v
if Row = -1 then -- since 70
1 a5 G- c/ m$ C8 z+ _" R if lan=1 then2 o8 w- P4 A: r* R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 \' m) K6 [# z1 Z& E( z L to_str("in der Andockstation: \"",?.~.name,"\""));
" Z) o1 C7 j8 m6 C9 k else
' _- |* B, w% J; o' z5 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. Y5 M- W7 k/ v
to_str("in docking station: \"",?.~.name,"\"")); 0 G. k. K- r2 \% O" y
end;
: `( t- ?% y( @& o. S* F, o else
' \& y* K7 p6 H& M, }% `& l/ }( H @.Destination := assignLObj[1,row];
/ u) p8 v$ X' b7 \/ A end;
( \; i' d' v+ i$ N2 R' V# {! ?- J newDirection(@);
1 F% ~6 Y' t5 W. Y/ _ @.HasOrder := true;
' S l; `/ Z9 @4 L$ a end;
; i8 ]+ K. O0 M( }! Q end;; ]1 X" s V, r( c4 z( W1 m9 |
end; -- of the method
* H0 p& Q; A& |1 e' ?6 D% L6 B0 ^0 x |