/* called by: entrance ctrl of the object 'track'$ P' i1 V! r8 E! ?* g* q1 s
*/* S" N; ]; o1 D4 [$ V
is
3 @+ {& o4 u1 E( f2 J9 f8 X, m$ o5 [' q part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 x L& X- T, X) |: B9 g' l
do
; i9 n+ w O- G) A Lan := rootfolder.Internal.Tools.AOLlanguage;4 Y+ v3 w4 U4 v( L
if current = @.Destination -- else return
, o6 Q0 d' w; N1 Z4 ? then
* U* q, @2 t) X8 ?5 w: J @.Destination := void;
1 n. \1 t! ^, d7 n; J) s if @.occupied then
# v: j8 q2 g% d# e$ I, P* _# ` E C part := @.cont;" F; G. ?$ n0 y; A+ d, L
@.transpOrder := void;
0 ^) _, E, L; _4 e, t# D+ e1 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 L( E% u7 E- U2 ]! b+ b @,root.eventcontroller.simTime);
% F2 A6 d' f3 b& W3 H3 y. t @.HasOrder := false;1 m; @( k" g2 M, @" {! T
@.DrivingHome := true;" n* e% z$ E. b0 Q1 z
rgManager.tryToStartTransOrder;
7 w3 w. L; i. K+ `: N3 G if @.Destination = void; D1 V5 D p- [
then -- no transport order for vehicle @
1 X, k; ]9 g( _$ Q @.Destination :=9 S2 r0 \! S; d7 w* ? h
rgManager.nearestFreeStation(@,track.~);
% u/ l5 K0 \" F( ^ newDirection(@);
; U# G0 N3 y0 x' M. c0 |1 F) N/ g2 M$ t. M if @.Destination /= void then
5 m, `! e5 s% Z' w4 I0 z) j1 Y: { @.Destination.NumReservation :=. w0 L* _$ I# f) Y2 V. X; H2 F
@.Destination.NumReservation + 1;
2 O! f2 y9 X5 K3 ]4 R; Y, w! ~2 V; R7 f end;" b9 d7 s/ j0 c a, b# r* j/ ^& s5 ]; }
@.CurrIcon := "drivingHome";% Q+ V5 E) F* a
@.DrivingHome := true;
+ _4 B+ w e: K9 ?6 V end;
+ ~; H5 L$ ?1 @, Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 C5 ~! d; D& B1 u part := @.transpOrder;
0 n2 q, L8 S% d# L part.move(@);-- load part
0 m- h/ R' Q! s) H) C @.CurrIcon := "load";6 J" c6 ]* x' g: R" ?* K
GlobalDistObj := part.globDestination;7 c1 n" S# z$ E3 Z" N! y
assignLObj := rgmanager.rgAssignL;
2 f g9 X6 r, w6 z7 _ row := assignLObj.getRowNo(GlobalDistObj);4 ]' }# X; K9 ?$ D$ B3 N$ ?
if Row = -1 then -- since 70% X. u: l" q8 X4 j& z
if lan=1 then4 z4 e2 m$ j0 b1 Q7 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. I7 c6 U: |% ?/ N to_str("in der Andockstation: \"",?.~.name,"\""));
% H4 a5 f/ t- m6 d1 { else$ h% B7 t f" w& M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# `$ T3 C; g3 `- e- e4 R) p
to_str("in docking station: \"",?.~.name,"\"")); : l: n4 X% e }$ P8 Q
end;% @% x/ r; q F7 R7 Y/ M( `; [
else
3 H/ K( ^9 q- k- O, H2 J @.Destination := assignLObj[1,row];
. m+ C$ ^; G- I2 U end; 4 z E0 }( c9 Z; e
newDirection(@);
; t3 P. S7 d* V" [) h9 K @.HasOrder := true;' Q! l) C; C. ?9 D/ b
end;
- Y3 `, h# [8 c/ }8 t end;
; }' M0 K3 V9 n; `. fend; -- of the method. O: V- o) j; Y* ]: v3 Y* w% C
|