/* called by: entrance ctrl of the object 'track'4 ^( h$ k8 P3 S" p5 w
*/
6 m) r8 e& y& J" P* [5 l q. Ois o6 u3 D9 w4 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?; d: M* q d+ U; x- Xdo4 t2 ], z$ e) p; ?% Z. D: y+ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;" R( u) W Q: \ |
if current = @.Destination -- else return
" K' d& w/ r) q3 @0 J then
0 V; p3 o1 V9 ^" R1 k @.Destination := void;( k0 y2 L2 o" v5 W* ^2 c/ @
if @.occupied then
7 [" A( s* u0 S$ { part := @.cont;
; j) {) _/ q8 q$ c6 l( P/ ^8 \ @.transpOrder := void;) i0 i" }& o. X: R' d9 f, H. R. O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: e. f, I: Z( \' r8 X9 \
@,root.eventcontroller.simTime);4 j* r# {: p8 g' T4 D
@.HasOrder := false;/ B) @1 C; D( G+ @
@.DrivingHome := true;
( k; p$ J) o5 Q) q! x rgManager.tryToStartTransOrder;
0 W* u+ {: r' w% \* ?5 x$ f- k/ B if @.Destination = void% Q; U: P3 U; |8 t; ]5 `
then -- no transport order for vehicle @$ E2 G2 J- W% t- b
@.Destination :=
9 F4 x% a4 o. J; j. P6 X rgManager.nearestFreeStation(@,track.~);
* B, r, |4 K. B newDirection(@);
) c9 U5 B; M s$ s" s: u if @.Destination /= void then
6 w: b3 @- m: W2 n( D" ^9 L @.Destination.NumReservation :=
% ?( X, g3 v; q! U( a" Y* s @.Destination.NumReservation + 1;+ }5 R8 U9 b, y* A) z& M2 j
end;3 K4 ]3 C E. R' C; D; F& ]
@.CurrIcon := "drivingHome";+ j) h' D0 z D) s; I
@.DrivingHome := true;
3 m2 w1 a# j1 i+ A end;
, o6 T6 T! c# D @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 a' y6 a& R8 _' l1 b
part := @.transpOrder;
, t1 T6 h, _9 h! ?8 V3 a6 D T part.move(@);-- load part
+ g) y6 h+ y5 U9 w @.CurrIcon := "load";* T$ d, H6 E$ a9 }, J8 g; H
GlobalDistObj := part.globDestination;
( U3 V: L7 h$ q* B( _ assignLObj := rgmanager.rgAssignL;
3 V$ k% h1 K1 M. ^7 O row := assignLObj.getRowNo(GlobalDistObj);
7 ^2 t/ ~1 y6 G% e if Row = -1 then -- since 70
" d4 l$ U, [, a if lan=1 then
' W; X3 P) o/ x6 q8 z+ h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
G* j! r- U* O/ T& c* V to_str("in der Andockstation: \"",?.~.name,"\""));: H' E5 O; X- H! B
else
8 {/ i5 J; F k) c, t0 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 @* v( C0 A" Q3 `8 F2 M
to_str("in docking station: \"",?.~.name,"\"")); + ?; v2 G8 {' E- ] Y) e
end;! w+ h# Y' c; H+ K
else
- l5 O$ \* k4 z8 j+ ]. x @.Destination := assignLObj[1,row];
3 V( a+ C: Q5 }1 d [/ U5 l: s end; ; A% R( n& ?" ]6 X. J
newDirection(@);* s' B( i" Z" `! q, q. N
@.HasOrder := true;
& L' F2 H7 a4 [3 g1 Z D! ]6 O end;$ o# R' x) s8 E- B' K
end;
4 j+ b9 |- L5 r) W: p' k. hend; -- of the method, W$ d; J- H/ e
|