/* called by: entrance ctrl of the object 'track': M/ x" F: K0 ?2 J: A
*/
( s# _# I* F+ J) e* Y3 X* lis0 Y- D2 _8 c1 Q/ V3 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 e2 ?6 q# z, a; h" B+ v6 |" E" pdo
4 V& N$ w9 y, b" Z Lan := rootfolder.Internal.Tools.AOLlanguage;
3 `+ Y8 i5 h* @; k2 o if current = @.Destination -- else return
: Q# d0 }6 G* E. s ? then
, Z( n4 O7 }, B8 B5 I @.Destination := void;
0 S( v! x9 ^5 y2 V1 K" \ if @.occupied then
% x7 N' |0 a" k! p* v part := @.cont;( {/ `' V. s2 U% `# Q
@.transpOrder := void;- i( s i$ f7 }4 R$ ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 g% N* m5 i) K$ J6 t; k
@,root.eventcontroller.simTime);
. D. s) _4 T$ q( C5 h @.HasOrder := false;* r1 D/ j' k! @6 G: D& E
@.DrivingHome := true;
% l- Y& Q7 A; g; c rgManager.tryToStartTransOrder;! \! P' D& |8 p7 v- U: ^' K
if @.Destination = void
" ^8 D; K4 I7 Z Q% Z+ G' T then -- no transport order for vehicle @
$ ^2 g0 |5 g; ?; @. V @.Destination :=2 k: |$ G) y: D
rgManager.nearestFreeStation(@,track.~);9 d) \3 r0 n8 V+ @
newDirection(@); 3 X8 S% V4 n: @+ y' M
if @.Destination /= void then
, x. G# ~/ F) I" p$ d1 P @.Destination.NumReservation :=
% r+ p# ^; v: | @.Destination.NumReservation + 1;$ j% c- y; M0 T4 Y/ ?) q Q: M
end;
/ N3 ^# G* n c) h @.CurrIcon := "drivingHome";
4 S: l$ X, d- L* N$ B4 w' U. N @.DrivingHome := true;9 O* M% u) y7 A6 m- ?
end;0 @5 A. ]. M1 u4 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ^/ j7 g5 y6 r3 R* C. }4 j part := @.transpOrder;, p0 }: n7 Z y* r
part.move(@);-- load part
- n# N; x0 w" q, k! i @.CurrIcon := "load";0 V( B- H* X: Z- U
GlobalDistObj := part.globDestination;
: q7 m" h1 d2 J# c% k8 r assignLObj := rgmanager.rgAssignL;0 k) ~1 @: p( b: H
row := assignLObj.getRowNo(GlobalDistObj);
9 T7 t( l0 \2 J: w. L/ _ if Row = -1 then -- since 70
, h! ?; e/ m6 E# Y9 L if lan=1 then
6 g* S# O0 L; _; n( i: {9 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 P+ n( s5 w J' d) ?- S, ^. Y
to_str("in der Andockstation: \"",?.~.name,"\""));, {4 ? w3 B$ y+ k7 R
else
9 {* U* j$ Q; j+ @8 g D- o; k# a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 e. U& E0 c) G6 Y& w1 s2 _ to_str("in docking station: \"",?.~.name,"\""));
- t6 p' u, V2 ]! n. W end;
& L$ ], u* l' H1 g1 e! E7 D else. q$ q" C6 m9 m3 j; W( i! J2 K
@.Destination := assignLObj[1,row];# Q' K/ Y, c, E p9 R
end;
* x0 ~2 s5 w8 C' D. k: f' R/ F newDirection(@);: S4 j6 ]9 T9 c4 y9 S$ n3 p
@.HasOrder := true;$ `/ C0 i" O+ @( @ v" O: Q
end;
" g3 p' L" Z* [, R2 q end;" r6 Q4 t& @# D! b! \
end; -- of the method
+ F& ^: t! ^8 B |