/* called by: entrance ctrl of the object 'track') X# N; v9 g$ H! v% k$ ~. `. J
*/
8 P& d# E4 b W% Y5 ~- [! Pis
+ g3 S- w' |" s6 K* @ part, GlobalDistObj, assignLObj:object;row,Lan:integer; Q4 y* f4 t3 X5 r. V
do
1 T) W9 d- |: h/ H+ Q, e Lan := rootfolder.Internal.Tools.AOLlanguage;7 X2 ], m1 v- Z5 K; e0 L
if current = @.Destination -- else return2 y% _& H# S* h6 t3 n1 k- V
then! B8 a# `/ L+ @9 z K# s
@.Destination := void;( Z" i9 G0 ^* Q: }" y0 \
if @.occupied then& n5 P8 G3 q5 v1 K
part := @.cont;. z9 W, K& E2 Z4 G5 q3 `
@.transpOrder := void;
) W- ]8 N. W: m' B/ b! p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 m- i- T9 s# a @,root.eventcontroller.simTime);
/ j6 b9 i' s, r4 U1 A b2 g- l1 ] ? @.HasOrder := false;
; H% u# |% h! o8 L0 J' Q0 i @.DrivingHome := true;4 m# Z& U0 k2 Q) N4 S
rgManager.tryToStartTransOrder; l( F/ X2 U5 I/ r X, W' v
if @.Destination = void) y* Y+ f1 V& z) r& X; |
then -- no transport order for vehicle @
@$ o1 J) |; K8 Z. c @.Destination :=
' o1 u5 ?9 |4 `8 M& W rgManager.nearestFreeStation(@,track.~);
( L' F! {, T; K3 E0 P# D newDirection(@); : c* ?& i/ S5 Y/ {; @5 `. r
if @.Destination /= void then
0 Q* f1 t" [2 f( C) E! _9 E @.Destination.NumReservation :=
! B2 C# O! w4 |* c4 X; I5 e @.Destination.NumReservation + 1;
# k2 ]8 C8 _% E1 [# l0 x end;
' B% r) _( E4 v. P& ~! Q @.CurrIcon := "drivingHome";/ E1 }( n+ ~" k" g3 [
@.DrivingHome := true;% r( r4 P6 P6 G( k, v( Q
end;" a" _" Z! F" l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! q/ I3 ~5 f' f: {! N3 z- r
part := @.transpOrder;3 }! t: w" c6 i) h5 ?
part.move(@);-- load part
, C. R: b7 Y0 P% x: W! w @.CurrIcon := "load";5 \2 A) W6 @7 ]. }
GlobalDistObj := part.globDestination;* c: f" r- }% w' m% _- _. Y
assignLObj := rgmanager.rgAssignL; b4 J2 a; Y; T: k- d
row := assignLObj.getRowNo(GlobalDistObj);. _0 R6 q8 M) s: y4 \. ~
if Row = -1 then -- since 70
$ R% f9 E, v, G* |3 p N if lan=1 then# P. L" w- p, `, y% A* C! i4 [( Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ j5 P5 c' E- W3 L% H to_str("in der Andockstation: \"",?.~.name,"\""));
+ i# x2 |* c2 z% \9 _% r else
! u9 G, I) v: O( ^) L3 d0 M; S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 ?, o2 H: T- V+ o( U* n/ i
to_str("in docking station: \"",?.~.name,"\"")); Z, x* P) p. P/ F9 {: t4 H
end;' }1 W! l9 v! w: d) a( ]2 ]
else' o& z" @7 H7 l0 z
@.Destination := assignLObj[1,row];+ S! g0 Z0 ?! D; s+ W. v; K3 P
end;
; c) `7 \. y2 w, ^( i8 | newDirection(@);1 ^$ p/ h2 a- ]" U2 [ U
@.HasOrder := true;
" j& E0 l& S+ b end;
1 I! i7 z8 }( j5 z# S3 H, p/ j end;
: T' P; l! F8 m3 tend; -- of the method
& q+ n# |- b; p, I! _) T9 W( t |