/* called by: entrance ctrl of the object 'track'1 Y7 j' a% r- ^6 _9 O! ^, g4 g$ N; R
*/
& x% S0 K9 L8 \. Y0 M; P. cis
/ w" r' n9 {% \# ~$ l part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 X( r: o1 a8 L# V
do
6 Y( G. L/ o: |8 a Lan := rootfolder.Internal.Tools.AOLlanguage;
3 y7 [# n; y1 {7 R5 O% \9 v" j if current = @.Destination -- else return
( m# \; w( X# d8 C4 u7 _ then' U+ T3 J" x& }* B+ C
@.Destination := void;: ~5 L5 B) L3 y# E0 T/ Y
if @.occupied then, }; x! S. |4 W8 D+ O; q
part := @.cont;( J) B' i G2 r1 s
@.transpOrder := void;
I+ @/ p; l& K+ P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 u9 T/ ?/ H3 e( j9 P% M @,root.eventcontroller.simTime);
* r4 ^6 b8 n+ @. k0 h" t) D, w @.HasOrder := false;8 m# K7 c+ `- C; R
@.DrivingHome := true;6 s/ R# v+ ]8 D2 _$ Q1 e
rgManager.tryToStartTransOrder;3 @$ |! Q& s% A$ c; g
if @.Destination = void
7 V M3 G7 s/ G then -- no transport order for vehicle @
8 |2 \3 D! s% b7 L3 K. K- Q @.Destination :=
# _7 {. N E7 c" y* Z* }2 j! ^* T rgManager.nearestFreeStation(@,track.~);( n3 [& H6 s- o& D& f" N* W3 t
newDirection(@); 7 B; D0 X% g$ \4 R2 w9 I2 I2 h( Q7 S
if @.Destination /= void then3 R3 z4 b, ?) C0 Q4 R" s
@.Destination.NumReservation :=. C- C% ~3 n3 _7 Y. y
@.Destination.NumReservation + 1;& _. A0 Y8 m% G' f8 k
end;
! |9 [& g% T1 n7 u, J1 Y/ m# P4 k @.CurrIcon := "drivingHome";2 [2 O! E7 F% B
@.DrivingHome := true;. e: s1 B3 [8 d$ Y$ i' f
end;: A- A( p0 B! O8 W! A) W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: Z7 L' F; _2 C5 l" u4 Z; } _
part := @.transpOrder;
# i/ Q ?, i% N5 ]1 Q$ ]% ^" d- M part.move(@);-- load part
1 `* r0 z1 o1 {6 w @.CurrIcon := "load";9 N) |3 Q( }1 ^" G2 n
GlobalDistObj := part.globDestination;
j' a' l; h8 y) y assignLObj := rgmanager.rgAssignL;7 t/ o) ]$ L* q
row := assignLObj.getRowNo(GlobalDistObj);
" L) i9 G9 T! U7 t' E3 | if Row = -1 then -- since 703 d: H. @' ^ |
if lan=1 then
. D; X7 C) @+ M" W1 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# M/ L9 }; Y, |, v% ~% |" A6 n to_str("in der Andockstation: \"",?.~.name,"\""));
7 j" y6 ?6 R7 a3 B; O5 o a% d' h else
* Y% C6 V$ v& o! C, d' v) M" E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 \7 {' V/ a; U( v) ` to_str("in docking station: \"",?.~.name,"\"")); % r- q2 ?3 _" q6 w
end;
/ ]2 V3 q6 p9 }' L R* W# v else
( Q8 W$ L# K- B0 @ @.Destination := assignLObj[1,row];1 S$ d/ J0 W& t7 i6 u; u( q
end;
/ R; T$ Q1 ~4 w' B newDirection(@);
R: M5 O; h. K @.HasOrder := true;" Q" }; F2 \) P3 Q5 f( ]$ `
end;
4 X) j8 ~* o3 I0 }4 j end;" J* j6 ^* e. M: J
end; -- of the method
) R7 B& {; a4 [. Y ], a* ~: x, q6 d |