/* called by: entrance ctrl of the object 'track'0 c4 ?5 c( j6 G+ X8 a2 r" |6 P4 J( J
*/
# p! {+ ?" r3 w# G' ]8 W1 jis
" y" {1 s+ _, U5 |7 `9 F5 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ V. C& l6 q1 a& J7 u/ mdo
5 c' D: y; F4 s+ J Lan := rootfolder.Internal.Tools.AOLlanguage;
* A; Q2 `" o$ N6 d5 ^: w* W, L. h' e( N if current = @.Destination -- else return: K* j+ [/ K+ ]' d* `7 X* Y
then
9 v2 e) P# x) a9 o @.Destination := void;% M( b! X: B9 G4 [% ^
if @.occupied then
9 T. U: G5 I/ m. P% w: N9 X. n part := @.cont;2 B: {! G& V& G3 y' ^. t
@.transpOrder := void;
0 v% U. `2 Z! D: s4 _, g7 a9 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; J- d3 H% E8 K: n @,root.eventcontroller.simTime);2 h$ v4 X4 e$ l7 P
@.HasOrder := false;
' ?3 R( e2 Z" a @.DrivingHome := true;
/ T& v* l5 c; }; ? rgManager.tryToStartTransOrder;. n1 | |* Z q4 B# M$ I% e
if @.Destination = void
! m) E- }9 j9 c+ ~. q6 F* D then -- no transport order for vehicle @
, E" H8 n9 [( D6 U3 i: w @.Destination :=2 |, V. P$ E+ u3 ]/ b- o) U- |
rgManager.nearestFreeStation(@,track.~);
# r3 L: @( _* N, H5 Y newDirection(@); 9 C9 C4 V0 p0 I3 T0 R. t
if @.Destination /= void then* ~! ~# u5 `: O3 A- v7 A, k
@.Destination.NumReservation :=
9 @) Q4 E9 n9 X( J9 x @.Destination.NumReservation + 1;+ F9 s, V8 B5 f5 U ~ B
end;, M. }* I1 H/ @5 W. }- @6 m
@.CurrIcon := "drivingHome";
6 g) N3 U/ m" _9 ?8 l @.DrivingHome := true;
; c2 {4 G. F& x$ S2 C end;0 r% A) Q* D! _" B& U7 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 E; H& C2 H0 s: J9 _# T part := @.transpOrder;7 q& q3 E7 J8 x7 [6 |, w
part.move(@);-- load part
* q. @, X. I5 B; l9 F8 ]: C @.CurrIcon := "load";2 C: f/ ]4 n; _) L* h( \
GlobalDistObj := part.globDestination;
' y/ j6 X7 {2 ]! \ w/ ?# h- S3 ` assignLObj := rgmanager.rgAssignL;
+ _- U# g$ B9 T: U row := assignLObj.getRowNo(GlobalDistObj);
7 b& y. [- p' D! x2 @ if Row = -1 then -- since 70! @- d; `8 q2 ~0 Y0 ~/ M# q
if lan=1 then0 a" J! z. R: V8 K# B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! ]8 T. @: \: x6 N) k/ o
to_str("in der Andockstation: \"",?.~.name,"\""));0 L% C" ], q- a6 J, b
else
/ {3 ]* G4 n1 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! q+ j( y7 i6 J0 |" L to_str("in docking station: \"",?.~.name,"\""));
, E1 V) K" K' H( r: B. B9 b end;
9 E# V# D- p: [! h/ ]0 K3 V6 `) d else' t I1 L0 s& _4 z+ J
@.Destination := assignLObj[1,row]; V# H, Q2 O$ J
end;
; ^7 f# @8 q. J, |( `) k newDirection(@);0 y) r2 b7 B3 Y( g q& J6 e
@.HasOrder := true;# _ S2 |" w* D3 ^4 G, s. t% G- G% M
end;; H/ ^/ y4 N. ]6 V8 c
end;
- ~8 N1 V* b% W1 }end; -- of the method
! B' z Q4 R3 L' k, e9 [6 ]* O! V |