/* called by: entrance ctrl of the object 'track'
: G% i* C' h( a: { v*/
& J7 m5 {) Z- D, X4 _' uis
; h+ U2 f& \. \: h5 k# H part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]; l1 c7 L+ }$ p
do6 n* {, i; w; |0 ^8 r% \
Lan := rootfolder.Internal.Tools.AOLlanguage;1 v' k/ G7 k2 F) O* J
if current = @.Destination -- else return" s: C. f2 _2 V' m
then9 ^' }* |5 @/ K' S/ @( U3 w1 J
@.Destination := void;" | n) c# w: ?; {
if @.occupied then
" C+ J, c+ A9 W4 b1 A2 p/ n part := @.cont;
7 Y2 u7 ]* _+ F. ^7 r1 g% a @.transpOrder := void;
7 }# _ L$ d$ C; Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 ]8 o. X- T2 ?) `
@,root.eventcontroller.simTime);
|, y7 q; ^$ K" F5 A @.HasOrder := false;1 K, \4 {7 f$ u" q) k) m* ]
@.DrivingHome := true;
/ h# ` B$ k; h9 F rgManager.tryToStartTransOrder;# o m9 \2 Q3 `3 ^0 y% _! K2 z
if @.Destination = void
0 F8 l& F% a% F6 Y- S1 h. K* y4 f then -- no transport order for vehicle @
. c9 @4 C b# F, a6 l( c5 O @.Destination :=* [( O( k3 Z _1 o
rgManager.nearestFreeStation(@,track.~);
4 e h0 l4 h1 E& G: |* R" }2 V/ y newDirection(@);
" h9 K. e* i& ]' O ] if @.Destination /= void then
" Y0 i! T$ M. D7 V6 p+ N @.Destination.NumReservation :=
, G) O+ L% J& q3 e; v) P) X @.Destination.NumReservation + 1;8 I2 P+ Y# U U' c4 ]
end;0 J; y3 K4 p% ?9 p4 p6 m
@.CurrIcon := "drivingHome";
k+ i, P( [) V1 ?" \( T# P- Q @.DrivingHome := true;' c6 T* m4 ^. Q* b/ x5 X: T
end;9 Z& @% D) I4 Z8 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; P, @) q+ v4 S: n/ K9 t4 O3 R2 v( ] part := @.transpOrder;- Z/ J, ^8 Z( D$ \, d* f4 ^
part.move(@);-- load part2 D* N2 M0 V1 `, {& \/ F' G+ |: Z
@.CurrIcon := "load";* v' X9 [; ?2 q" a; d" ]
GlobalDistObj := part.globDestination;
+ x: \3 T- `, J7 Q5 d; Y( H% } assignLObj := rgmanager.rgAssignL;
. c0 t5 w% ]6 P% Z& A6 F row := assignLObj.getRowNo(GlobalDistObj);9 G" w. O$ Y# a) c% `2 R
if Row = -1 then -- since 70
N* W8 E' V, |" r7 R6 G if lan=1 then, ? W# F7 F* r: m' ]0 @* n7 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
b. {8 y( Z$ ]3 x- ] to_str("in der Andockstation: \"",?.~.name,"\""));2 R8 K. ]+ N4 d4 G- [' U* ?
else& V2 s& p7 Q" b o- y; ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ~1 A: |- t' B+ u8 Z2 o( Q7 J% G to_str("in docking station: \"",?.~.name,"\""));
* o, b3 |7 X. a1 u0 s" c end;: Q+ d7 f8 F, P$ K$ I1 s9 p
else, @5 ]1 Z" K! C, J$ x% X
@.Destination := assignLObj[1,row];5 y0 k) o$ n, l B
end;
" N* Z8 _/ I, E+ V1 A+ L1 a newDirection(@);4 K3 ?5 |" `- ?4 G
@.HasOrder := true;, }8 y `9 W' S' t! Q
end;7 c0 i% x7 S f0 d) g& Q! t
end;1 h. i: c3 h; A: Q3 t
end; -- of the method* ]7 i. L8 \# d! u
|