/* called by: entrance ctrl of the object 'track'
# f& q! m* z8 g8 o*/3 d& u- Z& N4 g6 v7 R4 {( T
is/ i# o- \' ^# F0 S/ A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- q7 ?3 t$ d( T
do. B& o, l7 s$ P: E
Lan := rootfolder.Internal.Tools.AOLlanguage;; s$ M3 i" _1 M
if current = @.Destination -- else return
" P; s7 g# Z7 _- A1 u7 T then
5 F4 f1 a: u6 S3 i @.Destination := void;/ X3 l* u" G( `2 w0 s9 B
if @.occupied then
: O) d* U: m+ O' B( P' ]* M part := @.cont;
' C& q! ~# B8 N( J' y) G+ i @.transpOrder := void;2 N0 V% N# ^( I" r, [$ r M( _' ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- c" B- }+ r7 o- ]) e$ E+ _3 b
@,root.eventcontroller.simTime);/ f# G6 }2 i/ U# |6 Y" u
@.HasOrder := false;2 \6 F3 ]) m2 @- {
@.DrivingHome := true;) O+ J+ B7 ^& \$ ]( b
rgManager.tryToStartTransOrder;5 s4 c& g/ i( I- j0 G4 R% o. X
if @.Destination = void8 I( W# j3 g" i7 ?5 G! K) W4 J& i
then -- no transport order for vehicle @
( ]# i6 T5 `. A5 a8 { @.Destination := c0 E9 x4 U3 y8 o/ k* B! r6 K
rgManager.nearestFreeStation(@,track.~);1 b& r" a3 w- ^1 k0 ?, d
newDirection(@); + M- h- z8 l, u7 `2 O- |
if @.Destination /= void then
; _+ Z: ~/ O0 s7 N8 U4 s# g+ q @.Destination.NumReservation :=
( U( S4 M3 Q6 a% |# `+ q2 H0 w @.Destination.NumReservation + 1;
6 s$ c- [6 N Z2 j- j" g( K end;
' d7 Y( M2 t4 H+ ] @.CurrIcon := "drivingHome";1 s: H/ Z8 F5 m4 h5 T
@.DrivingHome := true;/ Z$ _2 O" {& l( c, U
end;
% Z7 ~* z/ k/ E7 O4 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station* P) Y% _% Y' d2 b$ v9 r
part := @.transpOrder;
s) N+ N6 u* w' b part.move(@);-- load part, t7 Z0 m. w' J i( j( s$ G ^5 z/ V! b, s
@.CurrIcon := "load";
; h3 Q8 x' K# o: c" E& T, U, d* P3 V GlobalDistObj := part.globDestination;
- p$ M' P5 {7 ]0 A/ `5 C assignLObj := rgmanager.rgAssignL;; \+ S. i( E" c* e
row := assignLObj.getRowNo(GlobalDistObj);8 I0 B6 c+ C" Y9 ~. K1 u
if Row = -1 then -- since 70, K/ B, T6 l! r i6 c; }
if lan=1 then
, X* b' ]0 I( Q' l, r2 S% f0 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% M$ w% H( ^- P. I2 H$ u
to_str("in der Andockstation: \"",?.~.name,"\""));9 [* [7 _2 R# f' j( f8 _1 O, M
else
. p: C: W2 ^$ ]$ n- @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' e/ ?3 R0 l2 X- l to_str("in docking station: \"",?.~.name,"\"")); + `; M p& o8 {3 z, Y# e( `: B2 K
end;
3 S' r/ i0 t6 J# m* l- d. G" J1 I else
3 k( k- A3 i& d5 | @.Destination := assignLObj[1,row];
) A Y0 n% k. r- Y% { end; 9 [; G) C1 e! J* C6 ^( {8 S
newDirection(@);
. s# F3 Z! W3 U* x @.HasOrder := true;2 q/ p6 E! A8 O! i) H* y
end;- G- a6 \0 ] z4 T: ?
end;! u( e8 D; m# q2 |0 _) Y5 o
end; -- of the method
- I/ r9 \/ u( g/ a |