/* called by: entrance ctrl of the object 'track'
, N4 {' e5 ]( u9 q' V*/5 C: Y- S5 F4 R; g, B2 h
is
- ]) W: O4 Z# Q1 d* e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" n9 p& K; s9 u4 i+ P7 t# I ]0 xdo
. E& z0 T4 q w Lan := rootfolder.Internal.Tools.AOLlanguage;/ _; N5 x. s1 w! l
if current = @.Destination -- else return
( V% x6 s8 P9 D7 i) D7 d/ ?" B then! {! w! J" T2 |; n% _* v: H
@.Destination := void;
0 D/ j% T, ?/ z if @.occupied then$ j$ M( |9 r" ]% Q+ R* K
part := @.cont;
( A( y5 Q- @1 A5 x, V, a0 b% I* ~6 x @.transpOrder := void;) Y, J1 W5 i3 A: `# ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 S4 p1 x2 T( _+ k4 d! r7 w$ g @,root.eventcontroller.simTime);
$ t6 p. `7 q0 ]& I @.HasOrder := false;
7 j" o' ^( t1 t, u @.DrivingHome := true;- E9 }1 y4 X8 a$ X
rgManager.tryToStartTransOrder;0 s" O& M2 P2 e& t. V
if @.Destination = void7 q6 T0 m" C+ M+ r0 |/ ~
then -- no transport order for vehicle @: t! b4 i! m9 y* E* v+ t+ H: ~% [
@.Destination :=- p" E3 [* F7 {. r3 Z$ o6 u
rgManager.nearestFreeStation(@,track.~);# i @1 z' l/ e9 W1 g) t! _
newDirection(@); T! ?+ n5 g7 x( j
if @.Destination /= void then" R) o% [& Z8 Y6 j; _, ?- P
@.Destination.NumReservation :=
: Q9 ~; V# _6 p5 M @.Destination.NumReservation + 1;+ O: u" u9 I7 ~
end;7 W! v" F0 }) _" g3 S
@.CurrIcon := "drivingHome";0 j9 {8 X. s8 N7 t
@.DrivingHome := true;
! L8 H# M6 ^# w4 f5 e0 q2 e end;- ^5 r- b' ?3 h! A% F: {* b& z' N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- C: M" H: H( a5 A; ^, g1 z part := @.transpOrder;
, f6 g: m+ g# C" m part.move(@);-- load part& k9 q# h" s+ z, u8 l
@.CurrIcon := "load";
0 V5 c' N9 Z1 M, H. [ GlobalDistObj := part.globDestination;' o: U9 L, K& V3 j3 S+ ^$ o
assignLObj := rgmanager.rgAssignL;
9 d- ^0 c( n, v" t: j row := assignLObj.getRowNo(GlobalDistObj);3 B: R% y) \! n7 V% m- Y6 ?6 `3 k
if Row = -1 then -- since 70" M8 }6 r% ~* r* h" F& H
if lan=1 then
! R& h1 B+ t8 [& n* b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 c6 _: }7 w5 T2 b; W
to_str("in der Andockstation: \"",?.~.name,"\""));
! o, \: q: ~+ {, o else
/ s+ }8 Y- {* Q% T* s! n- d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 E5 w/ {! \% G9 d E& \0 |
to_str("in docking station: \"",?.~.name,"\"")); ) R, c+ [3 s) C
end;; ~# H& d' L/ I7 E+ @+ i0 H
else
1 ?0 d& P5 ]+ ^* y$ f @.Destination := assignLObj[1,row];" a4 [0 x9 d8 e i4 W u: F) f
end;
. V# N1 n8 T& ?( R3 y$ a newDirection(@);
9 D1 b$ X: U' b! D* T2 x8 p4 L5 x @.HasOrder := true;2 u+ M0 R0 e, ?; `0 |1 r' a/ k+ v
end;" d Z$ K- }* A* n
end;1 K( s p: B3 b' v: b" K7 N
end; -- of the method
; L! t, {0 o9 H. ~6 Y |