/* called by: entrance ctrl of the object 'track'
/ n" B4 V7 l; @' o+ b+ r0 f/ M*/$ J6 G0 o0 H6 g5 \" u
is
$ w) ?% p: X# F part, GlobalDistObj, assignLObj:object;row,Lan:integer;- J. Y8 f( F7 V7 J
do
- _: O* S l! s$ ~ Lan := rootfolder.Internal.Tools.AOLlanguage;7 k2 ?3 J8 x$ i
if current = @.Destination -- else return
+ f& f+ L6 d' t4 ] then
& a4 ?- [7 x" _; [ @.Destination := void;
4 y- K9 i: S1 C: O if @.occupied then
R5 M" \* w/ G+ `# W part := @.cont;) V# U8 e- w, D9 f5 ]" o5 |* K
@.transpOrder := void;
0 X! i. R Q J1 L% p6 j& J& J' i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 b( s0 Q' g' s+ ~( n+ c
@,root.eventcontroller.simTime);; Z7 \) F7 g- V& t6 b0 d5 o+ l
@.HasOrder := false;1 g. _% w9 }1 E* N
@.DrivingHome := true;4 |8 B; w4 E% B d7 v. L
rgManager.tryToStartTransOrder;' j! {* E0 v0 u1 n/ |
if @.Destination = void" f n5 l9 f) J7 t
then -- no transport order for vehicle @& `5 F) E D8 \- g! Z) ?; W
@.Destination :=
! @/ P1 x2 e d. g; }- \2 a- I rgManager.nearestFreeStation(@,track.~);
* N3 ~3 Q: L" i2 B. _0 V* h newDirection(@);
& K( M4 }; ^+ |" G& e* d. W7 v0 h if @.Destination /= void then
. x1 a0 E+ ]/ ` @.Destination.NumReservation :=1 F2 c! q7 Q n/ w8 i1 K
@.Destination.NumReservation + 1;$ E1 \% z* E, x5 ?2 H" x# R. N- n0 a( x
end;; H0 m4 l1 l) h A( R- X
@.CurrIcon := "drivingHome";
6 q( |- T# x& B @.DrivingHome := true;
f1 ?1 o& G/ K# g. [% y end;8 @2 K6 ?7 I z3 ^" K1 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( G3 u$ Z8 h) K
part := @.transpOrder;
" n( A9 }& n9 ?/ z* I part.move(@);-- load part y2 w2 j6 Q* }5 S$ I9 ]! X
@.CurrIcon := "load";7 \4 d5 p. c' D8 E" h/ v' D
GlobalDistObj := part.globDestination;
% Q- Y" r; ~ p: n9 I* z assignLObj := rgmanager.rgAssignL;1 v' j, }* S7 d! w' C2 O! W6 C
row := assignLObj.getRowNo(GlobalDistObj);
$ T( p2 [, a1 T( } if Row = -1 then -- since 70
. k8 M, O" \; y# L0 W9 C if lan=1 then# V4 q' x5 q! ?6 N7 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, }2 ^$ \% g9 M* K Y to_str("in der Andockstation: \"",?.~.name,"\""));
0 P4 J8 T! u: [, F- I: d b else, `9 l& @" ~. B: u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 t8 O' e5 W% }0 P, f to_str("in docking station: \"",?.~.name,"\""));
3 m, m! T4 h- @% m: j end;$ e2 [: _& y1 I2 _7 W
else
: r, `% Q, M0 C( ^7 E @.Destination := assignLObj[1,row];
# H- M( E3 M6 L( C: e+ } end;
; l$ R% {. w, d$ R) w5 n newDirection(@);' w+ `3 ?' ]5 A$ a: u3 |
@.HasOrder := true;, k3 q+ U7 x6 A6 P4 ^: t
end;
1 D9 |; `' h0 _% G7 r end; v) L- c; \" }# v9 M4 `& ]# P
end; -- of the method
" Z8 z+ d+ Z! Z: a, D1 m- k |