/* called by: entrance ctrl of the object 'track'
2 J( Q2 V6 G1 J: w6 J. h; M*// z9 |: K, F4 H9 [2 S! l4 ^) G# K
is
0 v( Z, b2 Y' a1 g7 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) b% N4 c4 A" j4 ]: U# udo- P: |8 E8 A4 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 u- y4 @2 v/ M+ H' U) v if current = @.Destination -- else return
3 H$ h7 ^+ j! m9 `( L, Q6 l then' ?8 g& \& R. ]
@.Destination := void;
9 m f @: k5 t$ h) S# Z if @.occupied then
+ t7 T/ o( F6 x' D6 ]& c( ] part := @.cont;
! H. I6 z* ]+ G. x' d2 k; R7 t @.transpOrder := void;
) V- f1 D3 e6 l8 q% e7 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ` o6 L! o+ }: K2 M' | @,root.eventcontroller.simTime);% X, y, u- a" u/ i; v/ z! s
@.HasOrder := false;! N4 D: ]- D! r% Y3 {) a
@.DrivingHome := true;- j! ~$ i ?7 b; |
rgManager.tryToStartTransOrder;
8 R. A! p6 \# ~$ n if @.Destination = void
~: D' k: W1 h then -- no transport order for vehicle @- P! F/ N/ e, n. A
@.Destination :=
+ {, G- ^ G1 y: P* t: ?" L; L rgManager.nearestFreeStation(@,track.~);. [* O) Z1 B: @" y5 U+ _
newDirection(@);
- i$ k8 N5 u# x% d/ J: {* M if @.Destination /= void then9 E3 a( y3 O$ D2 n/ |, l
@.Destination.NumReservation :=* {- J. B6 [+ w
@.Destination.NumReservation + 1;9 x9 k7 @; ~ z5 E% y
end;1 Y# _- o) J5 k3 J: j: @5 r
@.CurrIcon := "drivingHome";4 ]) k! i% h; G9 y+ l) l
@.DrivingHome := true;
" M( m$ O+ E% j6 D8 ?% h end;
* H9 L0 V. [2 q5 P: e7 w: O3 W% O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 q g' N" [1 ]5 Q3 h part := @.transpOrder;, a7 {6 f" K/ _
part.move(@);-- load part* C+ q0 N/ b. t- N9 s$ O0 F7 a
@.CurrIcon := "load";
$ V2 L* S9 e9 [- M' B GlobalDistObj := part.globDestination;0 B- ?, |' i4 z4 `! c. z
assignLObj := rgmanager.rgAssignL;
! H0 N) @1 s1 m' `2 u7 m2 F q row := assignLObj.getRowNo(GlobalDistObj);
( U$ l5 Y% P X5 L& G9 o if Row = -1 then -- since 70
3 n& C, ^7 k2 L: m; B* ^ if lan=1 then
6 k ?) T% K) J4 W* a% r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 ^+ M$ g2 R5 Y7 z$ t5 {. C
to_str("in der Andockstation: \"",?.~.name,"\""));
9 i( \# N5 J+ K N/ W else
" m" [9 \. C. ^! }' c. f3 u* Q O) N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 l/ o& U! n) a8 K0 ]$ k to_str("in docking station: \"",?.~.name,"\""));
. i4 }* R2 b# y: N9 d: r$ P0 P% ~+ O end;
; R7 J1 y+ |! v9 { else" v$ |( L e/ V) U8 Z/ @4 R
@.Destination := assignLObj[1,row];
1 Z; t$ ?7 B+ k8 e, m end; * h) @6 l z% P
newDirection(@);0 Z2 r1 d D* y
@.HasOrder := true;" _7 S2 g; S9 J+ P b$ {' B% W
end;* M5 j, A4 i4 \. L- c' Z
end;
$ p/ s' g+ A" q2 e3 U+ Wend; -- of the method
) H4 T4 r" r9 \* ` |