/* called by: entrance ctrl of the object 'track'
& ]$ Y! ^* ~+ o& e2 \*/
2 A+ J9 S$ |: D! u) nis
- Z3 j3 i; I& h7 T: @5 {4 E8 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;) @ o V3 R9 Q: a2 X3 p* Q( h: q
do( v. g. C4 I( g9 d
Lan := rootfolder.Internal.Tools.AOLlanguage;" F3 h2 e4 q" f# ~8 ]
if current = @.Destination -- else return
$ S7 A& K B N$ M! ^ then
3 W3 D" M) H$ t$ r" g1 m6 S( i @.Destination := void;
, I3 `1 C% T: e! p if @.occupied then
& D, Z! M* b3 I3 P% G. @ part := @.cont;
7 n2 i4 C0 U9 n; s! T# f @.transpOrder := void;
7 {. h. C) m7 @7 {+ j, ~0 }2 M+ h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 f1 B F# r+ a# U- H3 P0 |$ Z3 \
@,root.eventcontroller.simTime);
8 X1 f# b& y, I @.HasOrder := false;
0 r8 K9 r. Z9 r" I) G8 Y/ a5 W @.DrivingHome := true;1 e, \4 x; d! D9 I2 V
rgManager.tryToStartTransOrder;
3 D9 [! U* j* `5 }, z if @.Destination = void7 x Z6 Y# A" p' f0 i
then -- no transport order for vehicle @
X1 y( D0 Y. G7 C @.Destination :=& i9 c4 u0 ?0 p7 C3 R( \) z
rgManager.nearestFreeStation(@,track.~);% J1 r$ f0 z$ E
newDirection(@); ( J9 J# d5 }& ~, h3 U
if @.Destination /= void then$ a, w- P( k Z% a' e3 s
@.Destination.NumReservation :=
1 n6 E* B9 Y8 u) o) b @.Destination.NumReservation + 1;
- C* K/ v2 t+ P8 b end;6 l# e9 g, J' E; Y% H2 t
@.CurrIcon := "drivingHome";0 S5 H0 Q; A6 ]9 f$ W7 Y
@.DrivingHome := true;2 a+ G# t! M/ u5 [/ Q' H2 X* D0 M
end;
5 T4 |8 [$ ]+ @) [3 h, k; V3 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station% q' S4 e: }+ W q+ K6 H
part := @.transpOrder;
. p. ]3 w0 M# N: o1 J9 z part.move(@);-- load part4 v2 w9 d1 z& f' N1 e7 o) Y d
@.CurrIcon := "load";/ G# Q8 f! V: E
GlobalDistObj := part.globDestination;
) ^3 [2 P# a* ^+ C assignLObj := rgmanager.rgAssignL;
' V( `* w R4 O, }% f2 P. h ^ row := assignLObj.getRowNo(GlobalDistObj);! R: d7 V3 m" C3 u! _5 a
if Row = -1 then -- since 70
( Z- n: N3 Z6 q' m+ W; G1 o- ? if lan=1 then
# S9 U( f2 ^ P# u; X+ b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; x5 O6 K/ _7 r ]' m1 M# X# s& j to_str("in der Andockstation: \"",?.~.name,"\""));
7 `) n! R. t; e- c/ B2 x else; e4 c6 ]! V. G7 X7 h6 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 O/ A4 ~& Y, p, P; _" v
to_str("in docking station: \"",?.~.name,"\""));
& ^- E# l$ j! A' b. k4 f end;" [4 d$ k) s" `1 q8 u2 s9 p/ s
else! F3 C' X1 k' t' {$ j& G- t! Y
@.Destination := assignLObj[1,row];3 X, x4 W# D# T: H% C& ^
end; ( I% S! t8 P$ s4 H, N& u7 J) ^
newDirection(@);- B* N( d+ g* L9 e, x( q7 V* i
@.HasOrder := true;7 B8 t/ K) c0 X2 r4 M
end;) G2 \# Y. F$ ]; S
end;
# f; P7 y( m2 Q5 j' X; nend; -- of the method
" `( l( ]9 h; X+ z: A) ^/ J h" F |