/* called by: entrance ctrl of the object 'track'
9 g5 B- I7 L$ T' s4 `/ {*/
7 s$ L$ A" c4 X2 J, W7 Q7 Xis
# [8 {" N# \7 g+ _* h" K" C6 t" I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% \: n6 H1 {; n* Zdo
3 S3 q/ N5 q- l/ k% N' Z; x Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B7 \7 S" h# v1 [9 v4 o if current = @.Destination -- else return
* A+ c- b$ P9 X/ q D* l then
# K Y, ?$ ~) ~9 t @.Destination := void;, g/ w3 a7 y; s' z+ W) y
if @.occupied then3 o* @- L8 p: B0 R2 g/ e
part := @.cont;
+ f# E7 @. u0 H6 k7 u @.transpOrder := void;
0 `1 l, K# T4 w6 {( f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! H1 K# u+ \7 h. Z @,root.eventcontroller.simTime);
4 _) X3 X" M* ` @.HasOrder := false;! b8 H7 U) p9 {( W8 j
@.DrivingHome := true;. b) _3 I' v2 t; C) p+ h
rgManager.tryToStartTransOrder;
# X7 S$ F% z: m1 v if @.Destination = void
# u, B& N _, @! Z! u then -- no transport order for vehicle @$ Y- L8 g7 }4 Y1 I0 K
@.Destination :=( W/ O8 \* F% H2 ]! ~, \
rgManager.nearestFreeStation(@,track.~);
5 b% P; O1 J! U- l3 S Z' G8 P newDirection(@);
% a; O( \7 y( J/ {9 @, e if @.Destination /= void then! r# g. b5 ?5 U# ]# G
@.Destination.NumReservation :=, G$ ~$ l& s( U. @9 O- c# O7 E
@.Destination.NumReservation + 1;
: C( o9 B5 V3 ~ _$ X2 [ end;% c' P5 _' a4 H. c
@.CurrIcon := "drivingHome";
* O: E; t. K, e3 C2 N, ?8 D+ H# H @.DrivingHome := true;
0 J. l: n2 s' e- L$ h2 }$ K; E end;
! z( b- h9 w7 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ?2 O2 M1 F) F2 E# i
part := @.transpOrder;$ @4 s; T N- R( A U% f7 u7 I
part.move(@);-- load part
, J( }/ B3 U6 h( p0 c @.CurrIcon := "load";
. _+ K8 i# a l% [" Z& J GlobalDistObj := part.globDestination;
% E9 e6 M2 m" g# h# f; O- t6 ? assignLObj := rgmanager.rgAssignL;5 S8 M# b+ X$ P" M1 [
row := assignLObj.getRowNo(GlobalDistObj);) |& @8 O0 H: n7 ?5 E
if Row = -1 then -- since 70
4 W0 `1 W2 g, `3 j- |9 M# }' u if lan=1 then
9 r+ O# e( {. {( j+ O9 t# O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), }/ K! }* u, A/ B9 E) p
to_str("in der Andockstation: \"",?.~.name,"\""));4 B( I, Y* q) h" l) N3 h
else
4 W) L' H7 ^6 \0 `7 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 h d0 j4 |. N" B to_str("in docking station: \"",?.~.name,"\""));
5 V) F. Y; y( j# C) F& n' E end;% X+ r6 k' Z" x3 p/ @- |
else S, [, P' X. ^
@.Destination := assignLObj[1,row];
5 a4 z! X' A V+ `$ N l2 ] end; ; q& K3 l' N, o. ]
newDirection(@);
+ @+ {9 o+ I) R @.HasOrder := true;
! Y8 G$ a/ Z# R9 F! y: E end;3 o+ D x S" u3 e3 H4 f
end;3 @6 I7 M% H" X& [5 u. ^! x
end; -- of the method
4 m& _- S$ n+ u! B8 | |