/* called by: entrance ctrl of the object 'track'% @2 M; o v# q/ e3 W, h, G+ i
*/$ I% @* `7 L5 p) E
is
5 V! k4 J- Y4 s# h, o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 v6 ]: L8 Z: bdo( D% }: @* }- r! A$ P
Lan := rootfolder.Internal.Tools.AOLlanguage;
; s0 X( A# [- t- a, y, Z. `3 N if current = @.Destination -- else return
# g% C8 |( ]' b% K4 R1 p then
3 u4 Z7 P# I9 \3 s, X2 N: ] @.Destination := void;
" E0 {: `% R* N, x if @.occupied then
; b( l4 o8 O6 E- @ part := @.cont;
' Y8 j% c" E4 O S C @.transpOrder := void;
! p* W" ?* y+ Z* r( o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; G* r6 w1 X4 q @,root.eventcontroller.simTime);
2 \* C; H: h" H& ] A% c( G5 g @.HasOrder := false;3 ^, q1 E _) O* e8 p
@.DrivingHome := true;3 k5 g4 O, Y! I5 d; t. b2 P
rgManager.tryToStartTransOrder;
% p' b, @/ b! E9 t% i9 b if @.Destination = void/ _, H' {. U& @% x! z
then -- no transport order for vehicle @
* F5 L- R9 |# f6 \$ W0 f @.Destination :=3 T# G, Q4 C+ n0 X5 `% V' t
rgManager.nearestFreeStation(@,track.~);+ j1 G; k2 E7 W
newDirection(@); # B! i+ K8 L7 ^. I, V _& L5 X
if @.Destination /= void then
' b- b* p' F' f2 l$ g4 g& h @.Destination.NumReservation :=
. k) L; U/ z1 s" L; F% a @.Destination.NumReservation + 1;
3 |6 m% T+ g& I, l" W* C5 q end;
* z$ {9 U4 G* ?1 ` @.CurrIcon := "drivingHome";
7 n8 q, K, p1 h @.DrivingHome := true;1 S( _! O% _1 k$ A6 d
end;
$ J2 N2 f( s7 ~) w else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ D K% A- r! s7 F
part := @.transpOrder;
# [3 Z& u E2 W0 P2 h part.move(@);-- load part. R" t+ _, I1 j
@.CurrIcon := "load";1 H5 u+ R5 e- N. N
GlobalDistObj := part.globDestination;/ Z' S+ \2 ]0 Q& {' h
assignLObj := rgmanager.rgAssignL;
5 D6 H4 z9 T' T$ J% u/ B6 s row := assignLObj.getRowNo(GlobalDistObj);
% M3 m, H4 O( g) o$ j if Row = -1 then -- since 70* j1 J8 R! w" }) [9 j* z
if lan=1 then1 P2 w `+ j* m2 X3 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
t( T; t e- J P to_str("in der Andockstation: \"",?.~.name,"\""));/ q0 b9 Z7 S) Y0 m: _4 G% ?4 A
else
% p7 E @% _1 H% I3 b0 s2 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% c/ B7 X& c! ^/ [) x' s
to_str("in docking station: \"",?.~.name,"\"")); 7 P# w9 V7 S l( t- o
end;7 K1 `, J* k2 R- T/ r: p9 Y3 ~
else3 n Z9 n- ?5 h1 W' I; X
@.Destination := assignLObj[1,row];
* v' {* ~) S4 G1 n- v5 [: J# V4 v end;
k0 s% h" V" @, F. F( l newDirection(@);3 g" k4 T' |5 K' `6 m. B
@.HasOrder := true;" x! j. f' }; E
end;2 ^1 w, m: y2 ^; j. F0 ]
end;- @8 |2 v; v3 d. g @' g( A
end; -- of the method. @8 R) T2 Y8 x* a+ Z
|