/* called by: entrance ctrl of the object 'track'
. Z% p2 b5 B( z; W*/4 d4 r V0 a" E1 D4 L/ u z, I
is
. X- `% C& j3 ^* ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 m: h; ?1 J2 O6 i" z% Y) `do
% L) s7 x8 c9 K7 c* r* A! A/ U$ b( L Lan := rootfolder.Internal.Tools.AOLlanguage;! A* s6 j2 T; P3 {# c4 i
if current = @.Destination -- else return
8 o ^5 o+ L4 H5 Q' Q then' b4 w4 i5 h4 L. N% m3 O0 l% b
@.Destination := void;
7 Q/ y+ u( u" H0 Z9 Q% p if @.occupied then1 d; F9 a' _" @6 Y9 H5 V* g. R3 c+ d
part := @.cont;. r' d" t ] f9 J" o
@.transpOrder := void;6 o* Q2 X+ c. u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# s4 D" X4 T5 z$ j
@,root.eventcontroller.simTime);# i) U3 G- E2 u" H; ?
@.HasOrder := false;* {0 j' A& }+ m! X7 F
@.DrivingHome := true;
2 s5 D @- I* F7 ?/ W: Z9 U/ h5 ~ rgManager.tryToStartTransOrder;
! T* ^# N( n2 ~! p# ^* W if @.Destination = void2 o3 X" B: F6 p0 s5 q- H! T
then -- no transport order for vehicle @5 G9 Z/ m# P, o+ X+ S% ^
@.Destination :=
# {: D, `: j o/ }2 f8 Y* B5 u% D rgManager.nearestFreeStation(@,track.~);+ r9 T/ o: F2 N7 V
newDirection(@); 3 B8 b' X k$ r- l1 u g2 w
if @.Destination /= void then5 g! t5 J8 J+ a. V* M2 ~
@.Destination.NumReservation :=$ ~/ u- D, n# [; M$ A( ]$ S, r, u
@.Destination.NumReservation + 1;. q" ~) S( A% u9 ]
end;* T0 k a3 ]& m) b
@.CurrIcon := "drivingHome";
3 r& ~0 h, }6 E( d1 c @.DrivingHome := true;
" m- x& p! g1 ~1 y end;
8 A* d# {. u& k6 Y4 ]3 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 \; w- l7 D( |* f- y Z7 v. x part := @.transpOrder;* H" D/ E' Y4 Y8 J
part.move(@);-- load part
& L0 S; v9 I e9 _ @.CurrIcon := "load";
5 N9 \1 @/ P/ [! Q1 R* [ GlobalDistObj := part.globDestination;
u5 E+ O8 a$ W, R& {) ]0 y0 } assignLObj := rgmanager.rgAssignL;$ Y( ^3 @" y3 Z% _
row := assignLObj.getRowNo(GlobalDistObj);
: P( N- H! p( k if Row = -1 then -- since 70' w% \' r- b5 P$ o
if lan=1 then
" g/ S- Z% D2 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# X- z3 Z! B0 E
to_str("in der Andockstation: \"",?.~.name,"\""));: t }3 z4 K+ J
else
! u6 I1 \; g/ @1 G7 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- N y, Y- r; l& o; i to_str("in docking station: \"",?.~.name,"\"")); % G& z6 F- A% S7 v) O
end;; d& B0 |! w: E2 x
else2 @! b/ a9 n' u' \0 p6 w
@.Destination := assignLObj[1,row];
( G7 ~) Z3 o3 L ?$ ^6 f end;
, k* F8 }: s8 m! \) c# [0 t8 h& n newDirection(@);
9 c h- h% k3 M6 D; r, [ @.HasOrder := true;
5 W: O9 C$ O$ ^ end;
' Q% D* i/ n/ \! \' X# w+ F end;1 K- x% p0 S3 ]$ u1 D
end; -- of the method
( T6 w3 v; x& f" n9 d$ ` |