/* called by: entrance ctrl of the object 'track'7 z( e6 Z$ T5 b# T: q
*/- H) Y7 D N3 J
is
+ Z9 w) A; W2 [. ]5 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;. D* }( X$ i' f3 G
do
3 Z+ v4 r" V( [) C5 t5 G Lan := rootfolder.Internal.Tools.AOLlanguage;
$ j+ F) @ B, p4 g- u! l if current = @.Destination -- else return! H2 Q: W8 p4 \" y" L5 C
then
, m. C* X, |/ Y) `7 ~ @.Destination := void;1 G% i; j* L e) C; ]
if @.occupied then
4 L, D) w* O2 u/ E% f' [, f0 l part := @.cont;! o3 S+ M" Z' D" q) ]9 G
@.transpOrder := void;0 V6 t7 k$ Y9 t& \7 D+ | @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 S7 ?/ K% B8 ~% T9 m% {, p1 `
@,root.eventcontroller.simTime);4 b$ P5 d5 _) K
@.HasOrder := false;# H8 U' I9 n" w O( L* s6 J; f- {
@.DrivingHome := true;
0 P. _0 M) X$ W rgManager.tryToStartTransOrder;
/ z/ j' ?1 T' ]# {8 s2 b if @.Destination = void
( h3 h* v% N7 b5 P then -- no transport order for vehicle @
9 X0 @ E% F3 P/ x @.Destination :=
* Q% b; p3 Y. T3 t rgManager.nearestFreeStation(@,track.~);3 i/ S# O( P- W) W
newDirection(@); 2 \: n3 ?5 G N0 Q5 L
if @.Destination /= void then
' a- n) N; S. x9 Y5 _ @.Destination.NumReservation :=* X0 V3 V$ o$ D8 C
@.Destination.NumReservation + 1;
0 p* z/ ~: K# X; [( ]- y1 J end;
! k& g% q; ]7 ^% D @.CurrIcon := "drivingHome";9 e# F6 r% z/ ~
@.DrivingHome := true;) J* q$ y1 f1 ?
end;* G) l$ y7 Z7 C& {: u, u- J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 d- i3 o3 f% z4 D3 L
part := @.transpOrder;: h1 |4 G2 ^' ?& a
part.move(@);-- load part
; ], t8 I. P% s3 }4 i5 E! Z4 k0 [8 U @.CurrIcon := "load";2 h, \9 g+ E, [+ E
GlobalDistObj := part.globDestination;# R# g0 g# j A( N) o, b" a2 s) s
assignLObj := rgmanager.rgAssignL;% p$ X/ z9 M$ a5 V6 u
row := assignLObj.getRowNo(GlobalDistObj);/ i$ H4 P" A |9 T3 x* `
if Row = -1 then -- since 70& i2 @& E2 G. _) ]% }
if lan=1 then
. Q/ a4 F/ h4 ~! I% Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) I* u4 {+ D. {& ?% W- p. a" ` to_str("in der Andockstation: \"",?.~.name,"\""));
* s/ g9 V _6 _' U: Z9 g else" p, `& W+ i$ v1 V' ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 b2 y% k1 K0 @7 {0 p5 I
to_str("in docking station: \"",?.~.name,"\""));
+ F `' y0 M! G( C* p, l% ~# ] end;
( k4 f' Y* W5 Q2 J$ [) t% Z5 _2 } else# t3 f# g v6 ` l5 ^) t& H1 z
@.Destination := assignLObj[1,row];
8 d! W, ?6 f- S5 L8 h0 l" A end; " p6 M% K& ^0 g4 l( J+ }
newDirection(@);
. H# s2 P. P4 ^ @.HasOrder := true;
4 V$ H! m( i! r4 F( u3 i end;; R$ ~& F% i. g
end;
5 ~0 @) }3 @" W5 ~end; -- of the method' t. F! m- L' i8 T3 c% N% J
|