/* called by: entrance ctrl of the object 'track'
0 k/ c+ b& z7 J7 b*/. V, B8 [0 X3 ~% H1 x6 e' o
is7 P+ b* w/ |. Z v0 p7 n8 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' r" I/ f$ {! }% Z6 ^do/ U; |5 Y1 y" \
Lan := rootfolder.Internal.Tools.AOLlanguage;% d) {; R6 ^1 a' a! J
if current = @.Destination -- else return* F, a8 E: m# G. S( m2 y1 A; k
then
5 R% a1 J& u2 e. d2 ^% c4 J. h @.Destination := void;2 J& X; f5 n( `, ~8 \5 ^4 [' D
if @.occupied then! W L* P1 D& |3 S
part := @.cont;
! @; k" [9 o+ T @.transpOrder := void;
3 k0 G$ `" ?# S6 P. X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 H3 o% N+ T# l2 Q# j! X* W% z @,root.eventcontroller.simTime);
' Q# |- \1 f- _6 g @.HasOrder := false;
3 O+ ]# z( `: U @.DrivingHome := true;) G( u: ^ T0 Z! e" J
rgManager.tryToStartTransOrder;: G" z5 x6 t& }7 g
if @.Destination = void
; E/ {! D# j* i1 H0 Z. e% I then -- no transport order for vehicle @! s$ ]' Q/ ]) |, [& t! ?& n; B* a
@.Destination :=
/ ~# M7 L0 ^7 g8 l2 V3 y rgManager.nearestFreeStation(@,track.~);1 G5 d) Q; S' k# K! ~: Q8 I
newDirection(@);
3 C e6 C1 L4 |' q3 \3 V if @.Destination /= void then
6 h" w7 J- U8 k' _ @.Destination.NumReservation :=. v1 U0 [0 n2 d
@.Destination.NumReservation + 1;
5 Q" R4 o& Z/ B7 M end;/ e. L7 X7 m m7 D. n9 t1 [6 P
@.CurrIcon := "drivingHome";
* C" o) m$ G/ G$ n4 U @.DrivingHome := true;6 j. N% I8 {+ \5 Z1 ~9 }
end;
1 K4 a1 k( v! b! J C else -- the vehicle @ is empty, both vehicle and part are in the same dock station" |/ M9 E0 B q
part := @.transpOrder;
# W* [3 D d$ \6 {3 o% v part.move(@);-- load part
8 ]# q6 U( K) X7 w) h @.CurrIcon := "load";
/ p8 T, o, E0 h `% M. S! ~0 _ GlobalDistObj := part.globDestination;1 Q& L; _' z! X7 u% v
assignLObj := rgmanager.rgAssignL;
7 X3 u+ Y- [( c3 J1 i4 M# n row := assignLObj.getRowNo(GlobalDistObj);% g# u5 c( Z' b, V( l+ R: s) y8 P
if Row = -1 then -- since 70; q5 u2 y+ R8 M( o
if lan=1 then
# j* Z( p: E& b) j# c% ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- j |% R+ R- ]# w) _9 h, A) x
to_str("in der Andockstation: \"",?.~.name,"\""));
9 {% e) C& ?) a* f/ o/ a$ O else
G" S% x/ P2 D: o* h* ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% X5 F) ]$ ^7 W( W+ m to_str("in docking station: \"",?.~.name,"\"")); 5 F- e$ D8 v2 C/ m( N) |1 D
end;
4 O+ F* B& P5 l- F9 x) Q* y else/ X+ M; R/ @& O" Y; J4 r
@.Destination := assignLObj[1,row];/ D( e2 w, s! Q
end;
2 H% C; u( H7 m- ^6 b( f0 n newDirection(@);! {/ t6 ]. {& w& U2 V6 Y) `& \+ {
@.HasOrder := true;
. b% \% w" g; `) |, D; F5 d end;7 s7 }/ U' N3 D% M1 b: f& }
end;
+ \( I5 x1 x p( a) o' `end; -- of the method
3 \2 M5 K. k, N7 L. w1 F |