/* called by: entrance ctrl of the object 'track'
3 H" r" o7 k4 q( J0 l3 \*/
; r5 x5 z; u5 b6 r' jis
4 S- ?# v1 C) k5 L5 `; k part, GlobalDistObj, assignLObj:object;row,Lan:integer;( t+ n' G3 w. U- l8 v. P
do
2 q/ j, S/ B; D* ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
; p6 f' n- a: Z: R8 b if current = @.Destination -- else return
4 R8 U( v* g- ]5 f2 U then: O6 Z% ]$ u: u4 v# f( M' O
@.Destination := void;+ F+ _; @( M/ c
if @.occupied then. w8 o! r% t$ I m6 r1 r
part := @.cont;9 F: A+ L! y" F, i/ \ K
@.transpOrder := void;
- G) d5 t% j; T9 ] O5 z* e/ @* e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 R* o$ k7 t( w' q3 T @,root.eventcontroller.simTime);
: h9 p( r/ H6 C3 Y @.HasOrder := false;( A; I# d& @1 _# D" b, p0 J/ ~8 @
@.DrivingHome := true;2 [/ r4 Q% u# o8 ~
rgManager.tryToStartTransOrder;7 z: T. W: F& ?% b9 u1 d
if @.Destination = void' E' h6 p/ n( [) g$ R4 u
then -- no transport order for vehicle @6 Z) I' r( S+ s, k" F( B- X
@.Destination :=
- [- \% a! z" j6 Z3 L' ] rgManager.nearestFreeStation(@,track.~);1 y$ W8 X5 {5 ]- |, v
newDirection(@); # d* I/ E( v5 L. u2 R
if @.Destination /= void then
# p( U; R; f3 q6 z/ u. ] @.Destination.NumReservation :=
+ n9 L. K+ U+ i/ F @.Destination.NumReservation + 1;+ u8 P! a9 a% g+ G2 W" ?5 _
end;
2 R$ ?) S" s C; Q1 t* F. n% k3 Z @.CurrIcon := "drivingHome";$ G9 ?: f. |" Y2 g i T
@.DrivingHome := true;
( R7 h. I4 M' D! D& p end;. e8 N: k' s* y' {- s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; V0 F/ n" o) y1 o0 \7 W3 G7 j& }
part := @.transpOrder;
" P5 l" i( H t part.move(@);-- load part
& r# Q- t5 w' @ P/ S2 w' o( E @.CurrIcon := "load";& {+ l+ x: a4 f3 _1 _7 O; S ?" x4 t
GlobalDistObj := part.globDestination;8 M% H% {7 Q7 T7 N2 |8 ^: Q* }2 v3 Z
assignLObj := rgmanager.rgAssignL;6 ^" A* V" J% e6 F; G4 L& R$ X
row := assignLObj.getRowNo(GlobalDistObj);0 a) L1 S* b" ?
if Row = -1 then -- since 70
. f( C3 [. n* Y0 G. K1 n if lan=1 then
' F! [& C/ o9 ?# t; t6 j5 ?2 f2 Z" I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# v3 \% D! u, o) o to_str("in der Andockstation: \"",?.~.name,"\""));
- ?) E1 e3 |* i" v3 c; _( v else: K$ r6 F, R. W9 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 o6 C% ^: [( B1 l' ?# n to_str("in docking station: \"",?.~.name,"\""));
. H# t; V/ G0 h. W. @ end;- j, b( k/ C+ S, |
else
1 b5 l1 K( J4 t* @* @! e2 e6 q! H: r @.Destination := assignLObj[1,row];2 ?. u$ F2 }+ g! R4 [& M- l# j
end;
" b- W% H( Y' a5 k; a( ? newDirection(@);' i* \: s! r9 {
@.HasOrder := true;6 i, x6 T8 U" X6 H
end;
4 c% k, \" F( f! y" _ end;
! {& O G$ o$ y3 ~" V o/ s) u9 aend; -- of the method
: M: ^& ?" g+ l+ m1 G1 |9 C" Q) \ |