/* called by: entrance ctrl of the object 'track') i f, I9 p$ w! X, n# Q2 \% a
*/
2 K& N/ K' o: e! Bis% k" D9 v* I* `6 q E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ u+ ?3 \* z6 J8 r& B
do
' {% R" T7 F" \ Lan := rootfolder.Internal.Tools.AOLlanguage;6 x4 w/ T4 [$ X/ P- e* u! U |
if current = @.Destination -- else return* f( K$ f: j4 j1 {
then) N( ^& E6 u& f& l! u8 u
@.Destination := void;
- }; y& }, w3 g4 ]% m" z if @.occupied then
5 Y. i; l0 V& K. N* ^$ Y1 _# k" x9 K6 w part := @.cont;
) O5 i4 X8 p' U, y8 ? @.transpOrder := void;
; e# N, P( H/ M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# |5 @( q7 m# H) c& [
@,root.eventcontroller.simTime);
Z. Q% Z& A' r' l( O3 V @.HasOrder := false;+ w/ F! q6 d5 _
@.DrivingHome := true;
7 k( `* p1 n+ x. Q rgManager.tryToStartTransOrder;0 ~9 C) l) M( @5 e9 K+ k% m
if @.Destination = void
* @1 I1 y3 ?0 S0 v0 \ then -- no transport order for vehicle @
$ [- R* T* M& F( s @.Destination :=
( l) M: y" Q) r( j( y1 R [ rgManager.nearestFreeStation(@,track.~);
4 ~" o5 Q; z$ p0 ^3 ~4 r1 K/ s& P5 U' M newDirection(@);
b) I/ r7 B5 X# N0 K( Y' z if @.Destination /= void then
- g$ l2 k4 K4 q) F @.Destination.NumReservation :=- y6 ]# I( q; o2 C% ~5 f6 N3 Q
@.Destination.NumReservation + 1;
) E6 C+ R+ O3 g9 o end;, d* G' t4 q) x$ b6 C) u0 x: p$ z
@.CurrIcon := "drivingHome";: f# m; c+ g! h' n
@.DrivingHome := true;5 ]6 R4 X! u2 b5 E& p9 P8 `
end;# f2 {; |- D ^. P+ ?% D* e) E. p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ]$ I- {7 s& H
part := @.transpOrder;: t( v) [! d4 h2 F
part.move(@);-- load part
# t' I) l1 Y9 z$ a& l7 s; ^ @.CurrIcon := "load";
+ b& ?% R0 {/ P" \9 N GlobalDistObj := part.globDestination;& F; {0 S- W: E
assignLObj := rgmanager.rgAssignL;
) C! S5 X- E# Z7 Y5 x- g, N% y row := assignLObj.getRowNo(GlobalDistObj);- |7 ]' J+ Q: R, S4 r: I: y
if Row = -1 then -- since 70
, A( c) p$ x+ |5 S% ` if lan=1 then8 R, y" L6 M! q. N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Y' \! d1 K- [5 r3 o
to_str("in der Andockstation: \"",?.~.name,"\""));
9 S* w8 S# n5 p; J else6 [' V; L9 F' k5 a" x7 t7 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ m- ?! [, g, b! ~7 }8 ~& A3 Z7 y# a
to_str("in docking station: \"",?.~.name,"\"")); ! e K+ I/ H: W$ _( q4 E5 K" X3 R
end;
1 y3 {' H- f# @. Z) H* E; a5 F" X else/ F5 h' h8 Z2 u0 R
@.Destination := assignLObj[1,row];0 s N- ], ~( {) Z# q
end;
8 D- P0 E3 r4 c6 [: V newDirection(@);6 ?" q1 x3 d P! m
@.HasOrder := true;8 x9 F3 _7 S! c4 M$ X' E4 u- I
end;/ L9 k! _) l ^7 ~8 b$ b4 F E
end;
" L7 B! z7 y/ G, f* f% M4 Uend; -- of the method8 F. x+ G J" ^4 N O3 C6 |; J* W4 r
|