/* called by: entrance ctrl of the object 'track'
2 b/ i8 i: C* h*/% H( K5 U( R8 J+ \$ c* ]
is$ a, k3 r% E- J% w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 j( e& ]7 U$ x/ Gdo+ d* V, x( X8 Q$ Z1 U c
Lan := rootfolder.Internal.Tools.AOLlanguage;
- F/ Y4 `" e+ S! ^ if current = @.Destination -- else return
/ w/ D9 g7 K1 X& K: X6 B then: G2 t" J3 l7 J5 s
@.Destination := void;7 i( O$ r; t; s+ g. [: y9 e
if @.occupied then
6 A! h9 I) y( p: ]7 \ part := @.cont;
5 E- ?6 e0 o, O: x$ j @.transpOrder := void;
1 H/ T9 C) P5 b7 A* {9 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ]. H0 U5 P/ l0 H) d# C8 b @,root.eventcontroller.simTime);
: y. Y% W( d' {* u! S H( w @.HasOrder := false;
! o- T, a" U0 ? Q7 N8 ], M( [ @.DrivingHome := true;/ i3 p' C. `. u* G% O' }# n
rgManager.tryToStartTransOrder;
$ Q9 Y+ _8 Z8 m0 d6 ] if @.Destination = void
3 m8 W- ^" i2 B' r then -- no transport order for vehicle @! Z8 v& n; D8 y8 b8 D
@.Destination :=3 }, M) f( y* E' N! x
rgManager.nearestFreeStation(@,track.~);
, @% n1 D* c" G4 A0 X newDirection(@); / {' x6 g) V9 E& _& d( `& L
if @.Destination /= void then
% t/ F8 J: N5 d @.Destination.NumReservation :=/ S4 p$ o+ M K2 l$ c. \
@.Destination.NumReservation + 1;6 b N8 k c/ Z5 C6 ?+ P( R/ X
end;
8 a: e! d$ m/ X& B& ~9 h0 }' a) s+ M5 \ @.CurrIcon := "drivingHome";
9 Y. |% N2 B+ |2 w3 ~, z @.DrivingHome := true;8 y0 F. n. Q @. O
end;' T4 p+ q& b( ?$ {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' E3 ?, g' y, F( u8 T5 G part := @.transpOrder;
' i. n. W$ b- i* W- {7 P* r part.move(@);-- load part
6 V' K3 x7 y/ a1 z @.CurrIcon := "load";! M0 r# R( }* C; l
GlobalDistObj := part.globDestination;) U! H. f; s# Q9 R6 ~
assignLObj := rgmanager.rgAssignL;; j) p- ]4 C; W" W# Y" R
row := assignLObj.getRowNo(GlobalDistObj);/ a2 q" W. {4 @+ `/ Q* Q7 H
if Row = -1 then -- since 70; t8 O" b+ T8 r. Q' @' G
if lan=1 then* \5 u% M9 O: B Z4 r, @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& {' ^* G- v. n5 i0 J( ]
to_str("in der Andockstation: \"",?.~.name,"\""));/ Q& z( N& }* }4 x, r
else% F1 ~5 v \) l+ P0 W. b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 l/ f7 X1 S! N' \
to_str("in docking station: \"",?.~.name,"\"")); , ^+ o; D# @1 q% ~( L" f1 k# r
end;/ `# \% m* G) ]$ v0 o6 |% `
else* \! d1 a1 H5 `
@.Destination := assignLObj[1,row];
# \$ i! i5 v4 _# P" o8 X end; ) W! x4 }+ C& {4 h0 t
newDirection(@);
' e1 |! }& y/ y7 ?% [8 h' A @.HasOrder := true;" N1 Z! h9 D+ j
end;
# a8 r1 Y3 f5 Z+ |2 E' r9 j end;4 X- d- D8 G; o% R) {
end; -- of the method `/ {9 W) _ {: C. P. a. ]
|