/* called by: entrance ctrl of the object 'track'
* b8 I& Q0 Q* q) l! ?) C*/& N' A/ Z( b9 ?& u# @9 n# {
is
1 j* T5 `/ V6 o7 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 _" D! N1 n, d1 V1 k
do
& E5 W6 C( E, o4 J5 U Lan := rootfolder.Internal.Tools.AOLlanguage;
9 _3 y' P! k4 f if current = @.Destination -- else return
" R5 f+ H7 b2 F2 d- x' b then
2 S1 U6 J% B, J9 f2 N @.Destination := void;
/ f/ A3 q* N' z' L0 G( O% v v if @.occupied then7 J, K; h2 \* {4 v* R+ j- F
part := @.cont;
4 [! w( V- ~6 ? S @.transpOrder := void; Z5 ]0 [- s. h1 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' @8 m4 s( X0 j/ P! H2 b. A8 Q
@,root.eventcontroller.simTime);
8 W$ H, ]( X1 g. U" n @.HasOrder := false;2 d( m) N6 U/ D" J
@.DrivingHome := true;/ X9 q ]# d+ O/ ~& t
rgManager.tryToStartTransOrder;
7 {/ g$ Q0 n" W$ I, k& U if @.Destination = void
G7 n' J4 J7 @- n then -- no transport order for vehicle @
" z; A- I7 M6 q @.Destination :=7 O; Y% s) j0 u. Q% [9 J
rgManager.nearestFreeStation(@,track.~);
" G6 c- s- _" B2 u0 w& C( X# t newDirection(@);
0 V0 Z9 ~! W1 j. b; \ if @.Destination /= void then
1 |" n. ]( I' e- \& |+ j! f @.Destination.NumReservation :=* n& \" n3 T/ X
@.Destination.NumReservation + 1;
; j, y9 e2 e* U6 [4 ` end;
# |# V) Y9 g! N& I2 S( R: E @.CurrIcon := "drivingHome";5 `9 z1 v' ~4 r) M- R. _- p
@.DrivingHome := true;( u+ b2 P4 c. R" ]' i* w' h$ Q
end;! @( B% d+ F: m. A+ ^* I5 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; l, a% T9 R6 V+ `
part := @.transpOrder;
$ d( ], g" x2 E4 w$ h0 O3 x% a; b part.move(@);-- load part; p. J5 l& A/ R7 }# K# G
@.CurrIcon := "load";
; ]; i9 l4 |9 { GlobalDistObj := part.globDestination;6 U. w! A, S. M B0 I
assignLObj := rgmanager.rgAssignL;
. P/ K6 f# D* u, a& e1 x" g row := assignLObj.getRowNo(GlobalDistObj);$ E- H$ G4 P. Q# u; y) `' L7 L
if Row = -1 then -- since 70
0 F3 v" N# @) Q if lan=1 then6 A- o" W% ` j) H2 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: F( |* [" G& X3 e$ a& p! P to_str("in der Andockstation: \"",?.~.name,"\""));
X) U6 \* q5 |$ O. p else5 L: f: [4 R. r r0 L0 K: R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 \$ b# ?* }9 I4 d' a4 z' g
to_str("in docking station: \"",?.~.name,"\""));
4 q" H2 X* Y* i8 N7 e, {# {, v* C end;
- P( O: Z! r$ G# c4 [ else
- [4 c7 c% U6 k$ j; `! @, {4 Z @.Destination := assignLObj[1,row];1 j( z( T) a1 m4 a
end;
- g/ E0 B# M+ Q4 }$ ]; Z6 H* m% c- h4 M newDirection(@);( s" X# ~6 U" p" d% v
@.HasOrder := true;
# N" z3 U0 [2 L* }* H end;
0 o& s9 P+ w; B# |6 q end;
( I8 o- L2 C9 L& Y( H9 Tend; -- of the method
- `" f7 S. R$ b( }, J6 n9 ] |