/* called by: entrance ctrl of the object 'track'
X8 [5 O8 |/ y/ L0 m*/# T b1 i0 O0 ?8 y$ u/ K5 Z% n
is
" b2 r; W; d" G1 A$ U8 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;# |* {: ^+ H+ Z0 D6 G; g
do3 m' L. ]% \' L
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 {7 w" U+ |+ O; c2 I$ ` if current = @.Destination -- else return
* ~' q# U" c8 Z9 N$ @( {! l! r then
: O: _2 q [7 _4 {. L6 V2 ] @.Destination := void;$ g/ c6 S2 P' s) ~" i: D/ L- A
if @.occupied then: C2 ~; C& y3 T0 A
part := @.cont;
1 R6 x3 q7 U u; E @.transpOrder := void;
- f8 S# U2 e/ i. x, Y, | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 }! r/ C% ^- j& J6 d5 g2 Z% g6 y$ E @,root.eventcontroller.simTime);
5 K% X2 c* J5 ^- `+ k @.HasOrder := false;
/ n0 z" a8 x) {% W+ n1 L2 R @.DrivingHome := true;
% Y9 n! b) [& V* ~' o. ?& p rgManager.tryToStartTransOrder;
' ^4 ]: B& S( n6 L if @.Destination = void* D2 Z3 Y5 p) B: i% q3 K5 \
then -- no transport order for vehicle @
7 X$ D, m4 ~5 @7 N% t1 |9 F6 f7 W @.Destination :=1 d! c1 Z( l+ ^. q7 \* `) @
rgManager.nearestFreeStation(@,track.~);
l8 u: G( Y# U9 {- E newDirection(@); : P. l, `) U8 N5 K. ^
if @.Destination /= void then
) _0 t; E; Z* ~( Z @.Destination.NumReservation :=' X, V* f2 R+ |8 I) F0 z
@.Destination.NumReservation + 1;0 E6 I; ]( \/ t# L! S! o
end;: F9 E5 ]2 P9 |) R' C n! D# M
@.CurrIcon := "drivingHome"; W" a% t" Q, x) c# A
@.DrivingHome := true;2 J3 }& a9 u& f d/ f) n
end;0 o9 {( f# r4 x; b+ W2 M& a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 N1 u. G" |+ T0 D
part := @.transpOrder;
' C* V, D4 X% d: u+ |5 `1 ~1 J/ v part.move(@);-- load part& N4 `7 U8 K9 x
@.CurrIcon := "load";
4 L. H( S7 {% Z1 ]! l }3 W GlobalDistObj := part.globDestination;" F8 K1 F8 z3 E2 ?* D) ?0 R
assignLObj := rgmanager.rgAssignL;3 {7 v' B) B9 B& S! d% ~- _
row := assignLObj.getRowNo(GlobalDistObj);
9 R9 L' @# h+ m2 l1 k1 y if Row = -1 then -- since 70
9 K* f# `& @/ A" ^6 b/ @. L" A* I7 D if lan=1 then
9 O! n1 O. B/ q+ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; d- V. {- x+ w5 K1 R3 H% |& h to_str("in der Andockstation: \"",?.~.name,"\""));9 t5 u8 T3 j0 [4 o8 p, u
else
7 j3 S) r$ c, @# z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 |% W4 _. \* g( @' g" d. R
to_str("in docking station: \"",?.~.name,"\""));
b r7 d% w3 S- R# G" h4 \ end;
3 @, t$ _& G5 ?$ X. ^- ~ else3 b) D8 x1 C6 L6 \8 r' L
@.Destination := assignLObj[1,row];5 d& Z$ h$ N4 f3 y
end; ! E% R$ g0 R; i4 S
newDirection(@);) l" y$ D, c$ A
@.HasOrder := true;
3 |' Q1 d$ G$ x1 B end;& H# T; z- V# N9 |
end;9 h9 j4 U2 ` d- r' U
end; -- of the method# ?, Z7 m6 a: u) m
|