/* called by: entrance ctrl of the object 'track'
% }" M, G+ t/ {+ d*/
$ J3 `+ Z8 t# x) L5 Q8 _is2 D) `2 R( `' G. _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ S, L1 W) z; b2 b7 U$ w
do9 j+ h7 l3 c# I4 U
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ ^+ ]5 g+ j; @3 T* l if current = @.Destination -- else return
' e' }/ @, X$ I: E @0 o then1 L+ ^( Z8 J$ z4 y" c! R. e$ t' F3 i8 Y
@.Destination := void;( w+ Z6 H: t% v+ i. y" ^: k+ w+ r, U
if @.occupied then7 F9 w7 {$ n, I/ v- B
part := @.cont; @/ ?+ M' Q' {
@.transpOrder := void;
8 S# g+ X. E* m9 Z. T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 A. L( i! d7 `5 U4 b0 r5 O F) t
@,root.eventcontroller.simTime);/ I( y4 t" [" Q
@.HasOrder := false; Y: B, J( d' j W# z0 o4 }/ n! T
@.DrivingHome := true;% @0 O* k2 A4 `3 S
rgManager.tryToStartTransOrder;
* D- _7 \- I" Q" Z2 E if @.Destination = void
1 d5 t- x% @$ O8 o. J then -- no transport order for vehicle @
; v9 X% U* m! t7 k @.Destination :=/ X# I+ N: n9 ?8 b. ] S
rgManager.nearestFreeStation(@,track.~);
: y+ ^) |, ?7 x3 R. ^# Z. _$ L newDirection(@);
: ?0 X) p3 W+ d( O! U0 F if @.Destination /= void then
+ d# L9 f# i7 @* O6 ~) w @.Destination.NumReservation :=: A; V% z: |$ ~* ]
@.Destination.NumReservation + 1;
9 k7 V: f; _( `. Q end;. r% m- w/ I) o& ]1 M
@.CurrIcon := "drivingHome";
/ K& ~ ]" ~& l( ` P @.DrivingHome := true;
+ `# h3 ^7 ], H: \! i+ R7 P end;0 D3 f) S4 R. H8 G( J% E) C" t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% e, f, @) a5 L) F& I m* r part := @.transpOrder;4 \/ `1 C2 |8 F! |
part.move(@);-- load part
; B% |! p4 I9 Y$ A4 T4 v @.CurrIcon := "load";3 r+ b8 K# P" I% P3 r% h( R
GlobalDistObj := part.globDestination;: ]# H. s; v, q
assignLObj := rgmanager.rgAssignL;$ y/ J& f9 }8 E; M& S! _* z
row := assignLObj.getRowNo(GlobalDistObj);
/ B) u! g( n/ H" ? z( b( N3 ] if Row = -1 then -- since 70# n0 W6 y9 l) W
if lan=1 then, X4 f1 I* R2 v1 S* h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. ?3 P% C5 q/ K8 s. r+ m
to_str("in der Andockstation: \"",?.~.name,"\""));* C5 ?% J9 l- z% P
else7 R1 v* w1 u) X, e0 W1 X' x, I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) m9 l( E. j: g
to_str("in docking station: \"",?.~.name,"\"")); ' o0 d r8 D. g" x" O: D# D
end;! j# f9 c( q# u9 Q9 N
else* ]. C% y# v7 I; g' {1 E) Q3 A
@.Destination := assignLObj[1,row];
0 h4 A1 \) H3 T end;
e2 `' c, U2 l2 M( C* c newDirection(@);+ j) u5 Q1 \$ s
@.HasOrder := true;- Y! G8 c. u- r4 K x H
end;, Q2 i/ {: X( ]/ P' x
end;
2 X1 \6 Y! D1 y9 D1 Bend; -- of the method& [7 r0 Y- U1 `- W
|