/* called by: entrance ctrl of the object 'track'
; ~$ P6 W- \- N# m' f*/+ B) z$ j2 A2 a J; Q, V4 r% X
is4 c% G1 |2 l! O2 E: {, }2 H1 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& {* W3 `' a9 \8 _/ o3 hdo
$ t% v2 P; v8 g/ y# x6 s8 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
* w% X" j _8 z1 ]- k& } q if current = @.Destination -- else return
7 S; Q; v+ G* H6 L: l then
$ U5 \0 c1 o* E2 j @.Destination := void;8 C& s4 ^1 e+ |: @5 \) h
if @.occupied then9 Z" v3 c9 Z1 G
part := @.cont;
8 `& v# ]$ C. o r9 q @.transpOrder := void;! R% [5 o3 B1 Y" _+ X0 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," O2 l: `% b. ^
@,root.eventcontroller.simTime);9 V1 j {! |/ W6 k( K
@.HasOrder := false;7 R/ }6 h, V& w0 f t$ g
@.DrivingHome := true;
1 L- i& p4 _' i: o' I+ u; J3 L/ d rgManager.tryToStartTransOrder;$ l6 Q" v' A3 P4 b& U
if @.Destination = void. E9 e6 U6 F8 Y4 ^
then -- no transport order for vehicle @- g+ q8 \( J' H7 g& ~5 X0 q
@.Destination :=
/ Q( a, g- c% J& C rgManager.nearestFreeStation(@,track.~);
7 K x( k; u, ^. A {+ X newDirection(@); 8 x8 n; |2 K& w- _
if @.Destination /= void then
* ^- t9 |- y7 {8 y4 J( w @.Destination.NumReservation :=7 k2 D' ~, H& J' Z& {. t9 s
@.Destination.NumReservation + 1;
# {. Q6 k( z: ?, m9 X, j9 ? end;
8 C0 u- H! E! \9 F; ` @.CurrIcon := "drivingHome";
6 ~1 G; D/ U/ q, R @.DrivingHome := true;
$ i- s( l. ], p2 ?" p( f/ l end;7 A% Q+ s9 W/ z3 ?& e. H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 q5 Q+ @ m/ ]3 i% F3 b8 J3 j8 b3 V
part := @.transpOrder;% U" o3 v3 c& X# |: n/ {2 _
part.move(@);-- load part m" e% I7 J [: n! J
@.CurrIcon := "load";8 G: F/ f1 t2 c6 ^5 h) y
GlobalDistObj := part.globDestination;
% x- j0 u0 q- \3 e assignLObj := rgmanager.rgAssignL;
7 Y# T1 @/ V J2 L+ W( V row := assignLObj.getRowNo(GlobalDistObj);2 a/ o" Z, E9 |& _; K: }1 a
if Row = -1 then -- since 70
! K# o5 W% H) O0 I( N# s" O6 P4 G0 f+ ? if lan=1 then
! j% ]; T0 R! ]4 f A+ y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* g/ R% |. j5 T! ]4 }7 R) z to_str("in der Andockstation: \"",?.~.name,"\""));, E% K+ ~, \# T4 |' p% [/ m5 Q- G
else( s6 c5 s' D0 B2 E( n, o6 i$ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: M0 R4 n6 T2 ^# C( l# `# Q/ @
to_str("in docking station: \"",?.~.name,"\""));
( y% r, H# H! o' S( B- g3 c" \: Z- R end;* a5 ] r4 k2 |6 w: h1 R6 G
else
* v0 Z* v! G* A6 @; B* S @.Destination := assignLObj[1,row];
7 A$ {% q. H! r! s- s) K5 s4 W8 X end; : O: }6 F- N* S1 f, @" A; E
newDirection(@);
5 C6 \2 X. }2 g& C @.HasOrder := true;6 _2 e O$ ?+ w/ A5 W% d! M
end;) O+ V" c/ ]* k+ t. m
end;) v5 a' a: R( n& Q1 }4 Z( v8 J/ b
end; -- of the method# j8 ~$ p/ N7 a& l Z
|