/* called by: entrance ctrl of the object 'track'
2 r" Q" V( h9 y*/3 Q$ p: X( D4 ?( ~
is: c. ~6 _- y+ p, M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ p- u5 w) L3 T
do$ | R8 ^3 ?5 @; E! o
Lan := rootfolder.Internal.Tools.AOLlanguage;0 w1 |" k4 v* v, b
if current = @.Destination -- else return
# J. l7 k1 K8 k8 H then
' \8 b5 v$ W# ~- x6 R) b) X y @.Destination := void;3 d: z+ Y/ R. @
if @.occupied then
5 n" K9 q" Q, a* _8 I. V; [" i part := @.cont;
s8 r8 i& I; `) o& m- @ L/ o @.transpOrder := void;+ o6 @- m5 D; t. G i5 f$ }9 |3 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 J# c2 I7 D( L% B @,root.eventcontroller.simTime);6 C% ~" Y+ n, H' ]
@.HasOrder := false;
) v( ^8 n, L' S( k' Q3 @ @.DrivingHome := true;
+ l( t) Y/ j0 v Y( ~4 n: D3 C; }; q+ I rgManager.tryToStartTransOrder;
, O- W$ A7 c8 p if @.Destination = void
: j/ F! l7 E5 w( A- g then -- no transport order for vehicle @
# B4 l6 q8 F( ^# X. |6 ] @.Destination :=
" S6 _' R6 H/ k# S6 U/ T' y1 i' w) W rgManager.nearestFreeStation(@,track.~);4 `# w+ V4 m3 c
newDirection(@);
. c: U# e& z9 S% v) a4 v4 F if @.Destination /= void then1 O, S+ Q7 f+ ` s
@.Destination.NumReservation :=
4 l; Z& O/ U* f6 a# h0 u. _( t @.Destination.NumReservation + 1;
# f/ `" i+ R+ x2 ? end;
) D% l' q" u) T ^) ^ @.CurrIcon := "drivingHome";4 [- h" b0 w9 C+ ^ P) ~
@.DrivingHome := true;
, H# r) }* N6 f' Q2 W" O1 c# M end;
: X1 v6 `5 {. T# a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 c3 u7 y* K, f0 h part := @.transpOrder;
W( b X' G. G' b7 {& a N: z+ z part.move(@);-- load part7 E7 @" m4 d% j9 X! @
@.CurrIcon := "load";
5 T& w' {* |7 [7 C( a/ l GlobalDistObj := part.globDestination;
9 c7 e, i) U4 r9 |5 U9 } assignLObj := rgmanager.rgAssignL;
. ?' J2 R& [! w. G row := assignLObj.getRowNo(GlobalDistObj);
; e/ _9 b# j9 j- P if Row = -1 then -- since 70
1 K* p5 E1 L6 g. }# ~1 _6 ~0 _$ _ if lan=1 then1 P% l* n! \, f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 t' m+ p: Z- K# M, \0 e; ~$ `. p" r to_str("in der Andockstation: \"",?.~.name,"\""));
+ n0 P N3 F5 C else/ l2 C4 |* f7 _7 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ R7 W/ C, {+ a6 q9 M
to_str("in docking station: \"",?.~.name,"\"")); : g4 e0 q% h( o: c( s4 f3 I
end;1 G3 \% p0 B+ S( t! b3 w" s
else
W' ^6 \+ x3 a6 m& J" Y8 ] @.Destination := assignLObj[1,row];
$ q2 _9 y) Z% A4 J, r: g! L end; 4 L, n# q7 T1 Q- Y1 X( N
newDirection(@);
. X0 p9 @' d3 \& y% e1 i @.HasOrder := true;
& G) D5 M1 X+ K end;
/ Y4 ~: y( E j( R/ o end;
2 m! ~1 Y/ K' m1 V. Dend; -- of the method
: g. {6 ?: e2 @6 ~! B |