/* called by: entrance ctrl of the object 'track'
* B" C) E3 j! a; G*/
% t0 r- | ]* Y& \is
- o9 |/ b6 W6 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;" P, |1 l; c d. a
do6 \5 _0 _9 c& Q) a/ h
Lan := rootfolder.Internal.Tools.AOLlanguage;0 G, E2 A0 [0 l- ]& J
if current = @.Destination -- else return* k) J! k0 _2 ?0 T* x
then) p! c6 N) N1 V) }0 G# y
@.Destination := void;; [/ ]5 {" k; m4 }+ I
if @.occupied then3 k, t5 ^1 }; N/ {
part := @.cont;$ |5 n, H. p6 G7 w- ?( T& L+ ~
@.transpOrder := void;
: S, o# ]: @6 H ?- p6 F o, _ d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ E/ C: o8 k9 N# t* F, T
@,root.eventcontroller.simTime);1 Z+ n2 I& @, P" K1 L8 F' U( X
@.HasOrder := false;
/ d, o- \, m. s4 x& [7 e3 j4 o @.DrivingHome := true;4 l; q: t3 {1 W! M$ K
rgManager.tryToStartTransOrder;* `, Q6 ]9 k2 k% X/ Y' n
if @.Destination = void
( C1 j$ s8 b) h, U$ x" q5 x then -- no transport order for vehicle @
( e V a% W2 z5 m @.Destination :=& u" H3 q( n P4 Y# Q
rgManager.nearestFreeStation(@,track.~);/ m' y9 P$ n n9 j: E7 K
newDirection(@);
g2 U2 e1 p+ m( O( d$ k if @.Destination /= void then. f) t9 b0 Y- j8 _3 @# G
@.Destination.NumReservation :=
$ a3 r0 Q4 \7 _) S& N+ o6 B; \7 D @.Destination.NumReservation + 1;4 a% Y4 }/ i, C7 h( y3 e
end;
. B8 l* z. G9 B6 i3 K @.CurrIcon := "drivingHome";! _6 T: N- A& n+ y, K$ ~
@.DrivingHome := true;1 R4 i0 j% h$ t
end;5 t) _8 k- w1 Z# g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ R" T4 _9 F3 I5 ~ part := @.transpOrder;
* ?$ c3 M: K( B$ |# o5 W) U! S part.move(@);-- load part
2 U3 W5 x5 z# X0 ], H8 U" W) C4 N @.CurrIcon := "load";
& ] m- w/ J: {3 j( e GlobalDistObj := part.globDestination;) a4 i. ?. t8 r% R, w# X
assignLObj := rgmanager.rgAssignL;
* V# R7 C: Y/ o# R row := assignLObj.getRowNo(GlobalDistObj);
( u3 D4 \' [. p7 E if Row = -1 then -- since 70
, e5 k/ A( e" Q+ W8 n' ?! T( V if lan=1 then# n E( G- V c/ ]% `- D4 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% S8 v9 W# L. d5 z- {& _ to_str("in der Andockstation: \"",?.~.name,"\""));3 m& `- }( J* D7 g
else- x8 m" R* G. g% I5 V" C- F) u+ w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; W7 `, ?8 p5 _- j& t' p0 v3 P/ p: ~" @
to_str("in docking station: \"",?.~.name,"\""));
2 i0 z5 F/ `) l) p( S2 o3 F. q, ^ end;3 K; _/ f a% c9 M# x
else0 `7 w0 s! ^& [: [
@.Destination := assignLObj[1,row];
' h% m* V( z6 R6 t end; / l4 T- F1 S& \2 G1 O5 Z& T' A1 z5 b
newDirection(@);1 n7 n: \. S0 C+ i5 K! Y
@.HasOrder := true;- T/ U. D4 W- l9 C4 D0 X
end;
! ^9 G# L7 `7 G* B0 R6 j" Q end;
. C) |1 q. ]3 A' q; dend; -- of the method
/ t8 C5 Q' q8 I& j: R1 u. @ |