/* called by: entrance ctrl of the object 'track'
F5 w, G, x9 S' j3 @1 k3 r' p*/
1 V" w- Z5 W# x! |- \& _is
: Z, N9 E# a) w9 U8 \8 A) \# u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [+ P! H& q- x7 e% Ldo% N' a. `) b& X& n+ C
Lan := rootfolder.Internal.Tools.AOLlanguage; O0 H2 A J' ~( e6 g* f8 P1 i# i
if current = @.Destination -- else return
0 _' G# E& i0 O then
8 G+ Z2 Q. b: u, @7 w4 P @.Destination := void;
# I' J7 P$ c$ g% C2 w% g1 L if @.occupied then
% j1 i W4 A8 \ part := @.cont;
|# a; Y2 c. P- | @.transpOrder := void; y2 U6 Q0 i2 J+ v# t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 `9 c7 K! w+ ~5 F: K
@,root.eventcontroller.simTime);
3 @% z, X; _# @, k" n4 w$ O5 [5 V @.HasOrder := false;
5 n; q9 o. e: x, p @.DrivingHome := true;
, m% ?) [3 d& j9 \" ]0 K rgManager.tryToStartTransOrder; e o& R* j M2 |
if @.Destination = void1 {: W; P. e; N O1 [1 D
then -- no transport order for vehicle @
: U3 k C- O9 g1 l8 x- S% Y @.Destination :=
3 B3 Q" }$ D2 [' X3 M8 _ rgManager.nearestFreeStation(@,track.~);
; T! J# N. u7 ?. I newDirection(@);
" e l- I# X0 h5 u if @.Destination /= void then! g6 F& `# G$ P' m, `5 m
@.Destination.NumReservation :=
" {1 q* |) t4 l @.Destination.NumReservation + 1;: E. ^4 {: p" ?: D" [0 g& o5 a6 s
end;' z4 _$ {. Q5 M9 L5 r U9 J" ^: I. ^. T
@.CurrIcon := "drivingHome";
: W6 r4 q, u! [! X9 ~ @.DrivingHome := true;; p: s. P* x' H: e
end;- h- ^- K, Z8 g* F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 U) e3 n% x9 A" E9 H1 b g
part := @.transpOrder;
: e" Q) G% x( D+ z! H$ _7 }* N! j part.move(@);-- load part. n& B* I3 H( s0 f; D2 `- f
@.CurrIcon := "load";
: D$ P3 Y! G8 s& M GlobalDistObj := part.globDestination;
% O' w! I" ? ^1 O: l; }; v' V6 I assignLObj := rgmanager.rgAssignL;6 Q) b( _3 K# r1 D( [
row := assignLObj.getRowNo(GlobalDistObj);
* J! `$ q5 e; D: Z! D if Row = -1 then -- since 70# H/ G! H7 d3 |
if lan=1 then/ p/ S& `4 Y. p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 b" r& Q! i2 ]. z/ D. ?& E, V to_str("in der Andockstation: \"",?.~.name,"\""));: l5 S0 T, E) C$ ~3 |! K1 ^* o
else2 X4 k% [! B& F! R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 O L1 o" Q* M) j t! P, u; ] to_str("in docking station: \"",?.~.name,"\"")); ) W s w% g, I) ^0 t- |# N/ U
end;1 D8 S/ ~& Z! ]( v* z1 Q- h" i- I( ]
else* S5 g5 _- b5 w" [/ r7 M7 m
@.Destination := assignLObj[1,row];
; P+ F. Q$ s9 h( K; ?5 g( J+ J end; 1 [+ K5 @& B. y. _0 ~
newDirection(@);# K" i5 e$ i2 G* z: v
@.HasOrder := true;
+ w, ^ I* o4 I0 M3 B r" B end;
) u( \% i6 T$ L" n end;
$ W% o0 X) u2 g0 Y; S; a9 Pend; -- of the method* y* c9 ~' |$ g j5 ]4 C, n" m6 B
|