/* called by: entrance ctrl of the object 'track'
R' M+ q6 ?& h% ]*/+ e7 e$ N4 `' g$ D7 K+ V6 G' k
is
6 ] B" D" K k part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 _" K/ ~7 L+ o; m; L1 L
do3 h2 Z# Q) e" g! M/ q/ @
Lan := rootfolder.Internal.Tools.AOLlanguage;
: A1 F9 U1 y# { f3 H if current = @.Destination -- else return/ t! t8 @' \! a
then2 C3 F/ v# D# z; j& T1 t0 S" c! o+ e1 ~
@.Destination := void;% @" k$ u; [0 |9 Z& w( M5 D
if @.occupied then5 b- K* x* ^, K- ^& o/ u% [
part := @.cont;( t5 }3 [7 W- P6 C9 V2 L) E1 |- y
@.transpOrder := void;$ S* d4 p) `, g& M( k% n5 _- ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 j( Q2 x: _. G2 U @,root.eventcontroller.simTime);
7 n) o! W: M, S/ Y: ~" N* G% ] @.HasOrder := false;4 Y1 x# H/ B0 {. m
@.DrivingHome := true;4 q" T6 ?% y8 V1 X
rgManager.tryToStartTransOrder;
8 ?1 h2 Q# `) g: l# ] if @.Destination = void
; ]- n8 Q- r$ c; K) q6 L8 t then -- no transport order for vehicle @
0 h2 \" D, D0 M" s2 ]$ r @.Destination :=' a% F/ R' z" i2 m% f
rgManager.nearestFreeStation(@,track.~);
! P/ B+ V% e( \ newDirection(@);
, Q: }& J" V2 |: ^# P! M if @.Destination /= void then
, q, C( o7 K* T: C1 @ @.Destination.NumReservation :=! D; ]7 G5 ^# U3 T. `7 T$ n, `4 }3 b
@.Destination.NumReservation + 1;
) J/ l! O4 \! V- P7 ]$ t3 E end;
3 D# A" w1 s3 U1 w4 ^8 a @.CurrIcon := "drivingHome";, X! ? a0 t! \0 w
@.DrivingHome := true;
* X1 ^* K) a3 Q; {$ Z end;
* B- e$ w' D. O* T; R" E5 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 t# {( X! j L5 J* R part := @.transpOrder;; _5 g. q3 h8 }8 {7 J( e* K
part.move(@);-- load part
- R! `; i& @- `8 T @.CurrIcon := "load";
9 l* a) _: G% k4 d; Z$ {0 H8 ^ GlobalDistObj := part.globDestination;. q; H, F' a& `4 ~7 O' \
assignLObj := rgmanager.rgAssignL;, w4 w! |+ A% q* F
row := assignLObj.getRowNo(GlobalDistObj);- n h" h0 S( g: ?; l7 O/ }
if Row = -1 then -- since 70
+ I2 r% y2 R% h6 W if lan=1 then' G% `3 P& q# P: ^: V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 ^8 [ d# M: l to_str("in der Andockstation: \"",?.~.name,"\""));" @7 y. h4 z9 {( S9 c6 q) s' I
else
2 I9 R6 C# @/ I: H5 X' ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& s X1 c, O0 ]
to_str("in docking station: \"",?.~.name,"\""));
4 I$ h% O0 P. m" h; r- n# R end;
, I2 y% T: V1 ^ else( m, n5 C2 J5 G: I6 W! c
@.Destination := assignLObj[1,row];5 o% A# D; s6 y2 C+ o
end; / C! s- p% h; M
newDirection(@);
# {- G. R5 ]* A' G9 L0 p @.HasOrder := true;
6 f3 u9 y- T# G" I0 X5 V( q end;6 n) `# v/ E2 C' H* q, R7 R
end;
; G6 M {' N3 B; E9 R6 Gend; -- of the method `( K+ M' y2 P& {, Z
|