/* called by: entrance ctrl of the object 'track'
; h8 f9 g; Y; P$ v*/
8 X1 P8 M: \% }/ G7 Uis2 x, a4 ?$ _1 A; G* x2 R7 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 e. V( B2 c+ [0 Ido/ c. v# O o# f m4 I/ f$ D6 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ~( s7 ]6 A3 H! t8 X if current = @.Destination -- else return
7 z0 [ o# E y9 y1 A1 ? then
9 Q& q' P; U# Y# G @.Destination := void;4 n: u, S, A5 n7 K E0 u
if @.occupied then
1 a8 L$ |2 F, D* u part := @.cont;
( c) f- r, H2 d @.transpOrder := void;% a: S5 T: g% r/ C9 S2 D8 k [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) [1 f S3 T" f5 E' _6 i6 b4 P3 [ @,root.eventcontroller.simTime);
( N/ E8 h4 {. W- e3 B& f/ U @.HasOrder := false;2 P0 `2 W6 ?; E
@.DrivingHome := true;% i0 N3 _, n# D% z% ^( L
rgManager.tryToStartTransOrder;5 E. S1 v* d! G. ~5 o F- F" W
if @.Destination = void
0 U: A! C9 w/ ~8 {9 H6 \ then -- no transport order for vehicle @
) |& Q2 z+ V0 d5 Z8 d. ?) t @.Destination :=
1 N3 G) _1 w+ s6 ] rgManager.nearestFreeStation(@,track.~);
. K* c. V! L1 C5 J- \/ c newDirection(@); , \$ N+ R2 z$ k
if @.Destination /= void then
' O6 Q: U1 j- p9 z; n' Q @.Destination.NumReservation :=+ t j6 s& a1 \0 S6 }/ D
@.Destination.NumReservation + 1;$ l8 l+ C" q' P: D8 S0 u7 n
end;% x& ?4 ?9 g- |$ m) O
@.CurrIcon := "drivingHome";, e6 {; E" }/ [) O
@.DrivingHome := true;
( I5 A# H1 X; j! t2 M1 C end;8 p8 y, J% d# f: |1 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 Y" `2 l @, j1 ~2 W* h* w part := @.transpOrder;- O: r0 S* g; L* n0 \9 O; p" {
part.move(@);-- load part
+ x7 A: M. Z, \$ N; |8 c @.CurrIcon := "load";* ^% o; Q: h/ R' D% N+ _
GlobalDistObj := part.globDestination;1 l5 Z' f0 j v. D- R
assignLObj := rgmanager.rgAssignL;/ B T& n4 p+ J" p/ c3 N
row := assignLObj.getRowNo(GlobalDistObj);
; a& O9 N4 t3 W5 E if Row = -1 then -- since 70+ J5 t* z0 y" T' s6 b: g( a
if lan=1 then" S* D& q( M- W3 @) P. Q x* k0 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 e9 v2 W& m' Z( W$ t+ ] to_str("in der Andockstation: \"",?.~.name,"\""));8 X: A x5 i0 D% y* C5 _
else& ~3 ~3 N) v9 i. K% r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 p; }! X% c! t& W
to_str("in docking station: \"",?.~.name,"\"")); ' ]) i6 ?- ?' c1 ~
end;
1 K7 F6 _7 h& Y6 p; G$ N0 P) H else
8 `% P2 F% W3 |- T$ @9 \! R! H8 R# L @.Destination := assignLObj[1,row];( s$ u2 D! v: U9 {4 }" k
end;
0 A0 b' W0 k P; [) s* T newDirection(@);
' i8 k+ H" P. o8 B/ B* ~ @.HasOrder := true;' o3 L8 V) u8 X9 l) T! T, m: W; d4 M
end;! e& S8 h6 D9 _
end;
2 I+ e8 X3 b; G" w$ b. Send; -- of the method
5 y R& C8 X( n: t' C |