/* called by: entrance ctrl of the object 'track'
! ^$ a# w* J7 r2 J# C*/
r" s! r# |9 ]5 M! v- ? eis4 f) p$ M( Z; y1 w- F+ y) x$ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ ^1 K3 q% K! e, {do
& }! b u# s, b% o. H) T Lan := rootfolder.Internal.Tools.AOLlanguage;
s& @# ^5 G# c9 J) [; G if current = @.Destination -- else return
: y1 j3 A1 m# j- |6 q8 Z then# m2 l5 U( j- [( }
@.Destination := void;& N: {- k( D6 y3 [: j
if @.occupied then
# j* S6 j! X$ N6 a _+ C part := @.cont;; D6 V$ v( L: t# _' f
@.transpOrder := void; P. c1 d- N& M" X2 v, _4 F+ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 ^5 [ @: Y9 Z- E+ L+ `
@,root.eventcontroller.simTime);1 C% @0 ~0 Y `) t: I
@.HasOrder := false;+ {! K- ]6 [' A
@.DrivingHome := true;
5 m2 G% u: A( K( W" ?, g rgManager.tryToStartTransOrder;0 J( ~; g! B$ u" {
if @.Destination = void
$ q3 k/ S& T$ }3 h Z& ?+ T5 N then -- no transport order for vehicle @2 z" V0 ~2 `5 l! j: J
@.Destination := ~( L9 J2 R4 ?6 `5 E
rgManager.nearestFreeStation(@,track.~);8 D1 D% g% ~+ M) x2 u1 }1 {
newDirection(@); 0 n; E& S# J) x8 a" J( q1 _4 i
if @.Destination /= void then4 Y- z- j" `+ J& r$ b+ M
@.Destination.NumReservation :=0 i4 p3 d/ _ [! s
@.Destination.NumReservation + 1;6 b' Q1 e: ~& S8 Y7 _ Y) x
end;! B$ Q, D4 w, ]3 H& E* B/ }
@.CurrIcon := "drivingHome";3 F0 A% x8 k1 }( A$ `
@.DrivingHome := true;
; S. r" X- e( \8 z end;+ W3 Q+ `7 ]+ V- D0 o& Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y( S+ F. M0 d: x$ M: D
part := @.transpOrder;( z: `/ R, R9 v4 Y, |# T
part.move(@);-- load part
# U$ o) c1 |/ {, A; X @.CurrIcon := "load";0 k8 W$ r5 ~/ X3 o' H
GlobalDistObj := part.globDestination;
6 F! G; Y9 H3 \% b' ^6 e assignLObj := rgmanager.rgAssignL;
+ ^3 K# E, X3 Q \0 m( I row := assignLObj.getRowNo(GlobalDistObj); ?. Z5 S! t3 D) R: H. P
if Row = -1 then -- since 70+ {# r* w2 i( c- [ H( |
if lan=1 then
1 }6 }7 ]! O+ O$ t" J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ j: @: ~1 K# J
to_str("in der Andockstation: \"",?.~.name,"\""));1 t6 _6 |4 B8 u' H
else
0 m! ~" n8 p% X' }# E1 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: C& X, O3 g1 F to_str("in docking station: \"",?.~.name,"\"")); / W6 d+ i, \+ ]) F+ j- _( H. c
end;$ h* ?( q' L& S3 T0 w
else
7 J5 X5 u6 @+ s9 X1 [, |7 q$ [, E @.Destination := assignLObj[1,row];; Y0 z+ t$ @; X% R. X1 ?/ v4 S
end;
: f K+ o3 Q% R/ } newDirection(@);
2 J/ b2 ?( ]* B @.HasOrder := true;
$ R3 o1 B: m( \+ g end;2 Z/ E+ y& I! }
end;5 y! {" X- R! `3 b0 m; F0 a
end; -- of the method
( w) F% \, {: U6 R& U1 n |