/* called by: entrance ctrl of the object 'track'
3 V: S i+ b. `, x( k, u) s*/% Y( A' X' x* N$ c1 R
is9 G% X* H. r% ^* ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 p% Y5 O7 O! q" F
do
; e" N( T" c% e5 c0 W1 }" r$ B% X Lan := rootfolder.Internal.Tools.AOLlanguage;
& K# N+ F* h3 ~ if current = @.Destination -- else return! j7 S7 i3 m! G- z2 b1 b
then
* J2 g/ G5 R- K9 E1 A @.Destination := void;
9 r2 `7 \4 U9 Y8 _5 e4 M ^ if @.occupied then
! h* E* v5 \/ d% g" Y8 v- \ part := @.cont; C2 [7 W4 ?+ p% z& V6 Z! F) s0 X
@.transpOrder := void;/ U' `: @* ]8 G$ a) C8 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, H/ k0 P* x% O3 R* M( d: ?4 A @,root.eventcontroller.simTime);
' h4 q! W8 ?6 r- N @.HasOrder := false;) Q2 }0 ~" g5 G) ]) m" u
@.DrivingHome := true;9 E h; g8 P& B k y
rgManager.tryToStartTransOrder;4 Y' G. d3 }& _* U
if @.Destination = void
' `, Y. C8 l; ~ then -- no transport order for vehicle @; K! l! _( H0 a. a$ _0 I) y( C
@.Destination :=# j/ |5 O b+ l& \) w7 k! K8 L1 i% `
rgManager.nearestFreeStation(@,track.~);
/ \9 k0 R& ~- w# I/ m newDirection(@); 3 x' k& {* f0 \$ `% [( x
if @.Destination /= void then( @* X3 m) s- _+ O
@.Destination.NumReservation :=" m. L2 u6 U3 o* {
@.Destination.NumReservation + 1;
$ V4 G# b( [0 a# }0 u end;6 J2 `6 f5 ]; w5 Q% z" |8 `
@.CurrIcon := "drivingHome";
0 ~$ Z* u5 q: g! B2 e( n0 Z) G4 V @.DrivingHome := true;
' V+ {$ \! i* j# f' Y end;
/ f7 f8 v) y. F! G4 Y# u U" h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" b# N2 ]: t" J$ F. v part := @.transpOrder;
& }: w+ u/ I% [8 N part.move(@);-- load part
5 R# Y* B- D a- d# ? @.CurrIcon := "load";
. R( v8 m& a1 y; P7 @* r( z* Z* _ GlobalDistObj := part.globDestination;
# D4 x+ N2 i k) m( H& U5 | assignLObj := rgmanager.rgAssignL;* A+ e8 f. y, H4 U8 N* e, o: k8 s
row := assignLObj.getRowNo(GlobalDistObj);
0 K0 U( e- X. {% A5 B5 Y7 f if Row = -1 then -- since 704 m# J Q I2 ~+ [4 ?" g1 H
if lan=1 then* r1 s3 {: b+ A$ Z7 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ }2 i+ z9 ]9 R& f8 Y& }) j to_str("in der Andockstation: \"",?.~.name,"\""));
- S' G4 R/ b& F/ {, p else5 J" l" y+ d, R# x% N }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ L; |* ?0 U$ m9 h to_str("in docking station: \"",?.~.name,"\""));
. \# Q& |; h1 [0 U/ U! Z7 L end;
; r8 t- q5 J2 u3 G else
% c7 |. s( }/ e1 e$ I g9 g @.Destination := assignLObj[1,row];: ^8 }: Q/ Y) O- {& w
end; ( B; Y" A# i4 ?8 W* E' u+ ]
newDirection(@);
. U( C6 X7 ~0 r7 t @.HasOrder := true;- I( c" |8 p2 o$ o3 D
end;
0 E N2 ^1 ~3 y2 U0 l end;+ D) v" S. ^# \9 [) f. b$ X9 t
end; -- of the method t; s- w a4 T5 z% m! h
|