/* called by: entrance ctrl of the object 'track'
2 Z% z1 U4 N1 B( r4 _*/9 k9 t' |) ]2 b# O3 U* P: b
is7 x, d" J, n' r* R. @; s& c& \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& V# l" d1 V9 I/ {do
- q- j; W, n. I4 }- Q1 ?3 V Lan := rootfolder.Internal.Tools.AOLlanguage;
! A& W; M$ j i0 ?% m! K" B; Z& D, _7 W if current = @.Destination -- else return
1 i& N: l! o# {9 `* U then( p! K1 c' u- w8 @, z
@.Destination := void;+ N* c) L h1 E1 X7 Y- i
if @.occupied then2 R! G0 [9 q C! z$ M
part := @.cont;# l4 r* o2 F+ `
@.transpOrder := void;& O' P: o6 d* J1 P6 M7 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- ^6 U" @/ ~. S5 K
@,root.eventcontroller.simTime);0 N/ f* Q# e b! a4 P% z
@.HasOrder := false;; ]. O; n+ F6 {( r5 a3 I
@.DrivingHome := true;0 [# j0 @+ i7 W% w
rgManager.tryToStartTransOrder;
: t C) c- L$ s if @.Destination = void
+ G* k/ F4 e1 Z) A then -- no transport order for vehicle @/ f; i8 J, Q! ~5 i
@.Destination :=# y, ~- ?' o. W1 U8 ?! Y u3 z
rgManager.nearestFreeStation(@,track.~);; j1 K1 ]8 x) H+ [
newDirection(@);
. ?3 a6 p9 D, M if @.Destination /= void then
. H% i* F% r. n6 o& ? @.Destination.NumReservation :=
* \8 b5 ~. x% T2 O$ B% N/ u# E! ` @.Destination.NumReservation + 1;1 z5 ?/ z8 e) x. s: c8 X
end;8 O/ }( G4 e- G- ?! D
@.CurrIcon := "drivingHome";8 `- ^) |( E8 \# [
@.DrivingHome := true;
; {) S8 `5 {, ^# d end;8 Y0 K" c+ ?& Z5 s! Z" x: Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station C( [ }' F1 Q* }6 R: M7 B
part := @.transpOrder;3 I9 A, |( _7 ^ O
part.move(@);-- load part
! U1 s- {" d5 `8 X. Q' s1 N0 I8 I2 E @.CurrIcon := "load";
: g; X0 j# {. b4 p7 |$ [ GlobalDistObj := part.globDestination;3 t1 a+ D* Z/ w
assignLObj := rgmanager.rgAssignL;
* S- M O& {4 C. T& l0 c/ O, W2 ? row := assignLObj.getRowNo(GlobalDistObj);
}3 _' D1 @+ O9 L if Row = -1 then -- since 709 d/ d, J8 N" y' V2 D
if lan=1 then
" a- e/ O* r: q/ X8 F6 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ O" S8 Y1 l0 Y% V
to_str("in der Andockstation: \"",?.~.name,"\""));' ]% q: ]0 i6 K6 c
else
# P9 b5 z( W6 X1 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q& x, d1 j6 c; P' Z
to_str("in docking station: \"",?.~.name,"\""));
/ ?6 X- T# x/ q, k$ E end;
1 l) a. l2 Q- I% N; A! I' m2 p else! P' {) G. S; Q. o: q
@.Destination := assignLObj[1,row];
6 W- `9 }% L$ P; x& o; e end;
/ G2 I* X! v% Q9 q$ t" j# i4 B: B newDirection(@); ?* N; a+ d$ o9 d+ L
@.HasOrder := true;) c" ~) c# n! [) u4 a H5 k
end;
) e$ Z, o3 h& W a end;& o, Z* w1 y$ X l: m6 U: e' K
end; -- of the method
% |- T" G& F9 `2 d& e# s, E |