/* called by: entrance ctrl of the object 'track'
* ? g: s4 S7 ?% W* s9 h*/
; F3 H6 C; V) pis Y5 W P/ F- \7 v+ U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 H! k! V A0 ?/ W; f, W
do R4 o$ N9 a/ V% h
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 T/ ? J/ ^/ e, [4 k if current = @.Destination -- else return$ o+ b/ e& A! d1 j
then
# R* R1 r) u0 G" B @.Destination := void;/ O# Z) S1 M* [" G. B3 h" u
if @.occupied then
8 ~$ R: Q! s6 k& Q3 p part := @.cont;
8 ?9 l2 R5 M3 e* Q# m+ ^ @.transpOrder := void;3 j( t4 C8 o' G, J9 {7 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ Q* z+ j: `7 I9 @; `3 |
@,root.eventcontroller.simTime);- Q: @2 [6 ~' ?8 T) A) V
@.HasOrder := false;
% c4 ]5 l1 E+ H. u$ h& Z: Q @.DrivingHome := true;
$ H6 c4 G: O! Y A9 ], n rgManager.tryToStartTransOrder;: {) l/ g! @! R7 k% Y/ d% R
if @.Destination = void/ Q) a6 i( b& S! I8 _! o6 ~ ~
then -- no transport order for vehicle @
6 \/ t& I4 K. O1 G3 R% r$ h1 h @.Destination :=
2 [) \0 {+ v# x# } rgManager.nearestFreeStation(@,track.~);
. Z0 ]6 d( X4 G: D$ J; d5 L" v newDirection(@); ) Z% }2 B6 O- b3 j q- K9 C
if @.Destination /= void then
; H6 t! k4 j" C- U @.Destination.NumReservation :=* C) F" {8 l% R. r' g9 v8 m7 O
@.Destination.NumReservation + 1;. Z6 u6 C0 R9 \' S9 h- E8 o2 U& D
end;
4 b. A8 \: j2 I9 K/ k* A! C m @.CurrIcon := "drivingHome";8 e% J$ l1 a8 K- u n6 d
@.DrivingHome := true;5 O- ^* l& I( [' Z7 R* {; D/ |
end;
- h6 o; \2 Z( [; L else -- the vehicle @ is empty, both vehicle and part are in the same dock station# N$ p1 `7 v" C( ?" C3 Y& V1 d) o
part := @.transpOrder;
6 h+ z9 {7 G) _6 G" J part.move(@);-- load part. \0 I1 u' a9 U
@.CurrIcon := "load";
" ~7 i; _" t& L$ g; L$ }6 \ GlobalDistObj := part.globDestination;
! }5 ^" T: c* y* G5 I assignLObj := rgmanager.rgAssignL;" N- C$ }% D8 l' q6 l( A
row := assignLObj.getRowNo(GlobalDistObj);( ~+ j9 H0 `: l/ R: H
if Row = -1 then -- since 70
: H- x- ], ^# ]- _: V1 q if lan=1 then' i9 e. ~; Y b! s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. P- a2 {) Q/ x4 i/ A
to_str("in der Andockstation: \"",?.~.name,"\""));
/ \: w0 |' \- F, m else
! G6 s& l" U! p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 X3 W" S7 u2 t, {
to_str("in docking station: \"",?.~.name,"\""));
# j% I. u" K& x- l end;9 S( }, I- x) i; y. P% G7 e4 W
else% G. U% ]; Y+ y9 k1 e2 b( N
@.Destination := assignLObj[1,row];1 m- u' k9 e1 R. R# [/ K
end; ( Q. @ l3 N7 K
newDirection(@);
& Q% K9 u% N8 C+ Q4 } @.HasOrder := true;8 K9 D; M. J- a4 z
end;+ o. b! k( ?# K
end;1 c( q7 g+ M( S$ a+ g$ H
end; -- of the method
2 @1 q+ H) O$ B* x, x9 q) g) }* j |