/* called by: entrance ctrl of the object 'track'
+ N1 L. x6 N: H$ d# `*/& B# h" L- t/ J" b) ?+ ?: E
is
. f" g- P1 P/ `8 |% q part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 C9 i& _6 X4 i* N/ ?7 s
do
# ~! [- [. f: f Lan := rootfolder.Internal.Tools.AOLlanguage;; v( o8 T* K# A5 l1 E+ B* q1 c
if current = @.Destination -- else return
+ [3 K3 R, w% z2 K then) C; I: G& m3 q
@.Destination := void;/ D# d% W8 c2 }% n1 N: D
if @.occupied then- s; \, A, M g F
part := @.cont;9 u( S; ^1 Z& Y
@.transpOrder := void;
, r7 ?, H1 m( q; V% _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 e. D* P/ }. V1 S! q- O* c9 H0 i+ k @,root.eventcontroller.simTime);
# e9 m' v; F7 Y9 f8 T. r @.HasOrder := false;) X2 u" ?7 }! n
@.DrivingHome := true;
* }7 `4 L# {4 r* E( Q2 z rgManager.tryToStartTransOrder;8 P# S# ~9 X$ P1 s
if @.Destination = void( c6 K$ {3 f) E/ s1 T* a
then -- no transport order for vehicle @$ L9 w8 ], P. h8 h
@.Destination :=
5 K/ ^3 O% T l& Z% ]& \ rgManager.nearestFreeStation(@,track.~);
/ s" M! m# w+ J% z newDirection(@);
( w" P. P+ u& p H( N Y- U if @.Destination /= void then
% I9 I9 R; \3 m# |( } @.Destination.NumReservation :=( y# j4 r( R* X) D1 p, {
@.Destination.NumReservation + 1;
# x7 k6 t5 K& |4 V end;
' b5 M4 Y$ x* z% K( u @.CurrIcon := "drivingHome";+ j' O1 ^3 `1 ^) l1 d4 T# M! h! C
@.DrivingHome := true;) ~: h2 s, Y) l* [6 t& ]% H) U
end;
, d* y+ S! I8 c$ h( D* j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 Q/ u+ p. u `- C part := @.transpOrder;5 a0 ?+ u8 v4 g' v
part.move(@);-- load part
' e# B# m) @% |1 c0 W4 q6 {1 G @.CurrIcon := "load";. s& I+ ]3 ~- u% q/ u b, |0 `
GlobalDistObj := part.globDestination;
, A8 \& x1 t g' w assignLObj := rgmanager.rgAssignL;: v" c+ ~+ y% U5 h
row := assignLObj.getRowNo(GlobalDistObj);; o/ Z+ E( g. Q1 \8 w/ U
if Row = -1 then -- since 70! t/ t2 N- s; T$ [" L
if lan=1 then: U c1 Y2 t: B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 N6 \7 m( d& U3 g) F M/ V) M to_str("in der Andockstation: \"",?.~.name,"\""));* \6 G4 O# S1 z) r! f1 l
else
6 | y5 m; Z. D: w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 h3 z5 D, D% U" m
to_str("in docking station: \"",?.~.name,"\"")); - ?2 `. o3 I7 n: z
end;: D* q8 s3 I Z9 j i) k; A' s
else5 H! g- T, y, T( n4 h6 H
@.Destination := assignLObj[1,row];
0 \$ y$ n4 J: N8 ?; r+ T, p% l end; : D5 X3 q9 b, p) [4 n
newDirection(@);
& r! W2 R6 g- T l v0 E9 x @.HasOrder := true;' F6 ?3 |( W4 ~+ ?0 v4 z; k3 i# v
end;! ?# w; C: Y. H
end;
+ G/ }5 R1 k' f Eend; -- of the method7 f# J( F5 }0 I) D) h
|