/* called by: entrance ctrl of the object 'track'# b8 M5 ~8 z9 l- ?
*/2 ]2 n2 M! P: h2 D" _0 e; J; a
is
8 N- x% U% }, }7 \3 E4 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 P9 b' |1 }& g3 ~, ^, }
do' ?& g5 b3 z# d7 z! b7 b) C
Lan := rootfolder.Internal.Tools.AOLlanguage;" ^4 j0 ~+ W- X# T, r4 V
if current = @.Destination -- else return
4 V5 j) y" |7 e9 h; \5 S: F then
! q7 \* W6 g& U" D! }& U- h @.Destination := void;) A5 o6 M$ D. X8 t% o
if @.occupied then2 B" S, f2 B; ^& F* b& t( b
part := @.cont;6 x0 O5 q7 ?: C, |) r3 z2 ^) Q% e. e
@.transpOrder := void;/ J( p0 Y3 P. p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 i0 {1 j4 M. \
@,root.eventcontroller.simTime);
2 K0 L$ H3 o5 _( P: C) I5 W @.HasOrder := false;
0 ~9 }# n, Y2 r7 _ @.DrivingHome := true;
, P9 H5 i" ]/ u, r rgManager.tryToStartTransOrder;% P, A+ c$ x' c2 b! U6 d
if @.Destination = void
, }% Z& \0 J5 s1 \3 X2 b1 q then -- no transport order for vehicle @! W- x4 d+ U. A) ?
@.Destination :=
, ^+ u) x+ A2 N7 d% { rgManager.nearestFreeStation(@,track.~);
: V2 w, }' ?. Q% n8 m, m g1 _ newDirection(@);
7 K/ `0 l( z3 @- H if @.Destination /= void then* L2 R( A2 E+ y& R) T
@.Destination.NumReservation :=. r8 E5 \ m3 f; K/ G I; M
@.Destination.NumReservation + 1;
* p# l# P6 z( G3 L. U end;) S2 r" b& a M- x$ Q- G% C' L- L
@.CurrIcon := "drivingHome";* d. t: M" [5 ?, R
@.DrivingHome := true;* g6 h/ N( M4 A G7 |
end;# j: N" J$ l- |/ ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ i: U6 z. n+ E9 l0 ]
part := @.transpOrder;
+ T4 {3 v- _, g% A part.move(@);-- load part" d9 y0 g2 } i# {9 Y6 t9 _
@.CurrIcon := "load";
# e: ~) Y; S; X+ w8 ~7 R: P GlobalDistObj := part.globDestination;
3 i2 f. @% f" x: Q4 h! { assignLObj := rgmanager.rgAssignL;
0 T7 H( M6 U: K7 G) I6 R# K row := assignLObj.getRowNo(GlobalDistObj);! w. A& l3 Y' ], R. l
if Row = -1 then -- since 70" ` {$ }. `5 p- s% m
if lan=1 then7 `. \! t5 |9 W$ z5 l0 i" K+ y' }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 r4 |5 i7 ^2 N1 r: i% h
to_str("in der Andockstation: \"",?.~.name,"\""));! [, s: E. F% ], {" E7 J
else4 S. A; I# M$ ~2 d+ v3 ]6 L. ?+ n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
e9 H" w8 w4 Y; I; M% }$ J to_str("in docking station: \"",?.~.name,"\""));
5 P3 a. d& c( T% y4 E7 T end;3 Q! g9 P* G) l
else4 z( \; N2 Y0 \/ D- n
@.Destination := assignLObj[1,row];
( M, @- W: m3 }$ q) N end; 1 \: q; V' L2 ?' E: l' j
newDirection(@);
; V: d* g3 g( Z' B @.HasOrder := true;
8 A" u' O; W1 |" ]9 _2 v8 R end;/ W. n# P+ w- l X9 s0 a p
end;- x, Y# A; f. ~) \7 Y' y. b; Z
end; -- of the method
& J6 r6 [6 E/ E& Q' n/ B' Y |