/* called by: entrance ctrl of the object 'track' ]9 ?- d" |# z
*/
. k/ _3 _$ s, h7 V$ dis
w& p Z# `. m4 S& c6 J5 p4 Q7 S part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 W2 o6 u m/ M+ S- U
do4 U4 q7 \" u% Z; [
Lan := rootfolder.Internal.Tools.AOLlanguage;- }4 C5 A. C2 ?3 n9 P' q; P) [
if current = @.Destination -- else return
6 u& u0 X- Z# }1 v9 Z9 I then9 _" m0 e$ @4 e. Q h
@.Destination := void;* X9 h+ Q/ E( h" M5 j
if @.occupied then
; g0 b; ?* k+ k# D part := @.cont;
3 p' X* b& }* N$ k8 [ @.transpOrder := void;$ I, b% M9 }6 G* O; U- O' Z6 |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- P! U' c8 I# x/ }+ n
@,root.eventcontroller.simTime);
, _4 @( Y5 c: C @.HasOrder := false;
4 Q$ j | c, w2 c- R5 L, u1 Y- z @.DrivingHome := true;
5 l, J. {, y/ u( Z/ i& R+ J3 N rgManager.tryToStartTransOrder;4 b% f. p# I. g$ r; _2 K1 u" ~. E
if @.Destination = void$ w. j! f; x! D- _
then -- no transport order for vehicle @# t5 a% _* T$ L/ V
@.Destination :=
3 E3 K4 Z" T, u; u: C rgManager.nearestFreeStation(@,track.~);
4 q( e8 X7 P3 N0 P' U( G newDirection(@); * @! Y# D+ G& ^
if @.Destination /= void then4 q( O. K+ }8 u! N) K
@.Destination.NumReservation :=
$ I) D& E9 Q. n' | @.Destination.NumReservation + 1;
! ^4 ~9 S8 l" y: W7 i/ ~/ Z end;$ Q$ H! n" B. ~0 |3 H8 K* q$ C* a
@.CurrIcon := "drivingHome";
0 \" M6 _' I; C2 F3 D/ { @.DrivingHome := true;
" c3 W. c1 V2 h+ c3 C! ~ end;! Y* x: @& s5 p; N- {/ W" y2 E$ D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 z2 t* ]( a* ]6 r9 [# b/ b I part := @.transpOrder;
6 c& w( a. }! U& Z4 X5 L- R- R part.move(@);-- load part
- a' L t+ q' u2 [ @.CurrIcon := "load";7 `7 R I* u ~3 p1 }
GlobalDistObj := part.globDestination;5 D/ X: |7 G* Z' |3 z/ m
assignLObj := rgmanager.rgAssignL;6 U5 W% Y8 M# G3 A8 I* O
row := assignLObj.getRowNo(GlobalDistObj);
" R$ \+ B" I3 h if Row = -1 then -- since 70
C% [4 W- x* P- {# f2 c if lan=1 then0 g+ @& w! `9 _! O* H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 V; z- P) O7 t4 f3 P4 S to_str("in der Andockstation: \"",?.~.name,"\""));
- R! V) @5 P: L( H3 c- r# F else
( e% G# N, _( [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 U; Q1 J+ u" M, x1 ^: _! P% N4 \3 Y to_str("in docking station: \"",?.~.name,"\"")); 8 N4 H0 V* h8 C. K1 E$ w
end;$ y! H6 y$ v% t; M( N$ x/ E% C
else1 w# w* R) N- x4 `' j. k) [8 b
@.Destination := assignLObj[1,row];# K' M* t$ Q1 o$ W% i
end; 3 I2 D# P. [2 H7 Y( [. P
newDirection(@);
1 }0 k, {) N& b: I+ x7 y6 r @.HasOrder := true; E* C5 ?/ I: v. h5 X: ~1 z0 [/ a
end;
0 g3 B5 `0 d: c. A5 u, g end;2 M( l( M [4 A& s, `
end; -- of the method
5 C1 E4 k2 H: V3 T- J/ `1 ^8 m |