/* called by: entrance ctrl of the object 'track'9 S; \; H# u/ ^
*/% m# n: c) K+ e( L
is3 E% v, X$ C6 v" ^. r3 f8 E9 A: N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, t( Z# L9 H# Tdo
2 q9 L4 S9 b/ `3 T Lan := rootfolder.Internal.Tools.AOLlanguage;
" n+ f0 k; r0 y1 z0 [& m if current = @.Destination -- else return
* F$ t% @( d/ U0 U% { then# F! m4 }* V, d6 l
@.Destination := void;0 w/ r4 u& o+ H7 K. M- Q/ c
if @.occupied then
4 w! m" F/ {9 K* b part := @.cont;7 |6 X$ W& B# ]$ ~4 T9 g/ B' P( g
@.transpOrder := void;0 d3 A8 ~8 A# X+ k8 y" l( S3 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ {" v- q/ o: d
@,root.eventcontroller.simTime);
, N" t/ F) R3 T @.HasOrder := false; E6 ^1 O' W- m1 {4 v" L, y
@.DrivingHome := true;% l8 h2 O1 V: [- d7 k$ @4 x
rgManager.tryToStartTransOrder;
" }% s. y5 t( ]& Y8 y if @.Destination = void
9 Y& V6 s# w, d# p5 \ then -- no transport order for vehicle @0 E3 b0 A8 u% f. X8 p
@.Destination :=7 P# L4 s! f3 e5 j7 S
rgManager.nearestFreeStation(@,track.~);6 _5 g4 \5 j4 @3 I% b
newDirection(@); 9 V/ Z7 D9 q% X7 _
if @.Destination /= void then& P {6 E8 Z* `9 u, l
@.Destination.NumReservation :=
! w, V/ p+ C) s$ B7 q% J7 n+ x, J @.Destination.NumReservation + 1;
* y( h. r. Z6 ~& d8 K' a# A% d end;
% T1 D7 w. Q2 a: |# J. U @.CurrIcon := "drivingHome";
9 J1 p/ j& _1 s) J @.DrivingHome := true;9 ^6 K4 w+ V; N- c% L& D
end;
% H) Z. H* L, E else -- the vehicle @ is empty, both vehicle and part are in the same dock station. ?" X: _9 w5 d! ]0 F% j
part := @.transpOrder;' d, E9 c# a$ Y0 S, U$ O$ q
part.move(@);-- load part( K: V# D0 Y( z/ {& C& ^
@.CurrIcon := "load";
. u8 D0 y/ W1 F$ D, i GlobalDistObj := part.globDestination;
o+ H, h- X/ F7 o) {" D& k1 \. U assignLObj := rgmanager.rgAssignL;
- _! h0 M8 N" r; [ row := assignLObj.getRowNo(GlobalDistObj);
) X4 M* t+ f* \% h( I if Row = -1 then -- since 70
" h! ^, `8 g" P6 G if lan=1 then s6 s) e6 a* A) G8 ]8 C# B. W; P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: G* P7 ]2 x- B5 q
to_str("in der Andockstation: \"",?.~.name,"\""));
4 S/ K' l1 O. q9 G else
3 [" g2 T6 x7 w/ [3 X' e/ C/ P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* L) p0 u, y }. s% B, O) ?
to_str("in docking station: \"",?.~.name,"\""));
9 `; c7 P* E' d2 Y1 E end;4 d7 w" F2 _: q* I+ B+ e
else# [5 M F2 y# i3 Y$ B
@.Destination := assignLObj[1,row];
y7 n3 S& ~1 p% U6 I( ?! g, C end;
) O! E/ D. `4 K, Z newDirection(@);
9 F, F8 l- t1 R @.HasOrder := true;
( f2 v. ]$ p" E. i2 e9 V7 v1 ^* v end;
3 ^; Q, Q- @# k5 ~! ~' q# X$ n end;
3 R7 ~# K9 l! yend; -- of the method
, {: Y0 O5 p4 `$ O2 ~6 t |