/* called by: entrance ctrl of the object 'track'
/ ?( b6 q9 B8 e% A6 k0 ^! Z! }0 H*/4 X3 U* D" K* ~9 x" w) E3 p
is# D$ k1 L5 ^& J' _) z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 `3 x# p( N. |: L$ Ddo+ a2 H6 Z3 I2 b5 ~8 ~, Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 L6 [$ g7 y9 |4 w, T* y [ if current = @.Destination -- else return
; q$ B( w2 A9 ?9 Z then
, O3 }. `( h; g+ ^9 ]4 z$ \6 e @.Destination := void;
9 P1 x8 U' _& h7 `, H- t if @.occupied then4 t) R+ A$ T( p* W5 ?& F+ T# i
part := @.cont;9 v5 F. H0 C5 O$ k5 _
@.transpOrder := void;
( N) K7 U" h4 q. h; U( A! ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: G* U. T* G/ V# f# U @,root.eventcontroller.simTime);
4 o5 X- O! I, ^2 Q4 X l @.HasOrder := false;
. o' s) E2 D6 B4 J @.DrivingHome := true;
( h, g& r) w. _ rgManager.tryToStartTransOrder;" B) m# ]( T. Y& T
if @.Destination = void
0 K# v6 ^& m4 c9 P then -- no transport order for vehicle @; N W9 z0 b5 }) b. j0 l+ n2 A
@.Destination :=
8 ~" ` E4 h1 u- w rgManager.nearestFreeStation(@,track.~);7 b9 I- `* \: a( l( @
newDirection(@); 8 B5 d& a" d( H& T
if @.Destination /= void then
7 x) u4 p. p' Y/ O( f8 f; u @.Destination.NumReservation :=
: D2 X$ x. m) D' V. b5 ^ @.Destination.NumReservation + 1;
6 e% G+ d' z0 C$ |" R end;
: `4 `1 L# E4 B @.CurrIcon := "drivingHome";* G6 V4 N( f2 K5 a% p
@.DrivingHome := true;8 a" a' X) ]* e' X2 K
end;
5 L) C; x: ?- B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. i+ ?( H; a3 q* c5 l part := @.transpOrder;
0 @# M: U& t" Y- g1 i8 u% i8 L part.move(@);-- load part
1 ?" T3 I: ]6 Q: j @.CurrIcon := "load";
) x! ?4 c7 c; L% d. O GlobalDistObj := part.globDestination;! g0 t2 g9 O& q& z( n8 F0 T
assignLObj := rgmanager.rgAssignL;
" j. l+ x- m# N# T& g6 F" g row := assignLObj.getRowNo(GlobalDistObj);
& e8 [( y! \* a0 ^/ @ if Row = -1 then -- since 70) m( _( P( }6 j# i. o% v
if lan=1 then) g/ t" w/ u" r. l& y) r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- z! W ^5 t: l& n4 f# T to_str("in der Andockstation: \"",?.~.name,"\""));
) t* _$ E) N8 A2 \& q5 }$ G else! y. v% w$ u7 ~/ H4 R: \8 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. B- {. B8 j! J/ R# M to_str("in docking station: \"",?.~.name,"\""));
, K; b1 B/ Z- c- j' u6 `1 f end;
& M& k. S3 O k else
& Q/ U5 `' W) i0 _& { | @.Destination := assignLObj[1,row];# m; E/ k) B8 f- ^
end; 5 y. d) ? w. O3 g* A5 D' ~
newDirection(@);
7 o4 v S6 v0 C& w- s$ @. v @.HasOrder := true;. @) |& S7 \5 J* p2 K7 @
end;
6 a0 G% c( T. Y S end; j' G+ |" X$ Q. o
end; -- of the method
/ P2 U9 i9 \; L0 I( ?# ]9 X: d |