/* called by: entrance ctrl of the object 'track'" L3 @9 P/ H5 W( _* [
*/. ^/ O0 n$ J( a8 t
is
7 r8 }& f3 K8 |: R, V# B# d8 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;: K6 f: d/ ~1 T, b* e
do- X6 T# A" B" U& n
Lan := rootfolder.Internal.Tools.AOLlanguage;6 g1 c7 r" G$ g! a9 p
if current = @.Destination -- else return
) e: W6 G; F, M( C2 `8 _. R y then# N7 }& `' R% R
@.Destination := void; |+ J# X5 m" s& q! i
if @.occupied then6 E F, [0 s+ t F" O. v ?
part := @.cont;4 m/ f: d2 |/ s- }+ j
@.transpOrder := void;
3 O: d7 W6 t! @. U& T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- W/ B# z% j+ ~8 Q; Z4 o
@,root.eventcontroller.simTime);! z7 K6 l9 G( V% C" c
@.HasOrder := false;0 O( v, N$ p4 m/ u/ s
@.DrivingHome := true;4 ]3 v5 {9 p% u4 K- ~! D3 @# w9 s
rgManager.tryToStartTransOrder;
0 f" T5 @" W' A7 n if @.Destination = void, y' n' j3 [- i9 c
then -- no transport order for vehicle @
1 i3 L4 Z) U$ \; V# E @.Destination :=
. G7 q9 U9 g+ b& g rgManager.nearestFreeStation(@,track.~);
. m9 [2 M) [% q* A newDirection(@);
$ t- I; i' w2 n! A1 Z, C# Y9 P0 B: |8 C6 ^ if @.Destination /= void then
9 T! x, d2 {! P7 p+ S' s @.Destination.NumReservation :=
5 m' N3 C! X( _& t9 v @.Destination.NumReservation + 1;) c5 {7 L# L( B2 n8 [: E. Y
end;# N! x2 P8 b. B Z' Q
@.CurrIcon := "drivingHome";
3 Z: o# @. b% p3 o: x+ u @.DrivingHome := true;, h5 K4 l; K- L
end;
. ]- ^+ k; G# D6 @, y$ z else -- the vehicle @ is empty, both vehicle and part are in the same dock station* x! C2 H/ }# f- i: u( g
part := @.transpOrder;
5 T4 \/ [2 @/ C0 p, T% g9 O/ W part.move(@);-- load part
0 }+ `$ M7 S4 h4 C8 v7 D2 V# x2 y @.CurrIcon := "load";
0 [ L( M! @) k: P$ }4 j$ E GlobalDistObj := part.globDestination;
0 n, T9 f6 Y: R% g# [1 k assignLObj := rgmanager.rgAssignL;. d6 w- k/ c- ^! L, E3 [
row := assignLObj.getRowNo(GlobalDistObj);, g; G2 r% @) a$ s0 ]) h
if Row = -1 then -- since 70
& R' ?6 h/ o! a+ _- a: s2 m if lan=1 then( d9 r. S) p" M1 g/ _, v* i( i# x5 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( E Q- m4 \$ O) a. L
to_str("in der Andockstation: \"",?.~.name,"\""));" v: q1 ]) b$ |2 m% P% S
else8 U( V5 }: J, L6 _' d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* D4 [; L% g3 M H C to_str("in docking station: \"",?.~.name,"\""));
9 l1 e2 k' o0 w$ i) r7 I end;
. x5 ]: i9 U# s& Z0 I* \0 d' v else
% W/ H: f! }7 U% c% j8 e @.Destination := assignLObj[1,row];
N* x/ `0 @! U3 M8 i% K7 e, J$ H end;
$ u! S( X% D9 }) N4 @2 X newDirection(@);
, C& l q0 c# w$ b6 B @.HasOrder := true;
7 E6 ?& z% O! o- m) M' {# W end;4 {/ E0 l( K5 \1 ]4 g% e# B
end;/ K/ d3 H" ?/ K. i5 a
end; -- of the method
3 l- F' ]5 d$ G- ^ |