/* called by: entrance ctrl of the object 'track'
' h4 D3 }$ h" f3 W7 s2 y/ |/ |*/. d; w) j& I$ o1 x) a/ M
is
5 Y3 M3 f" N* `/ a part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Y8 B, P; [( Q5 c# O, X0 r
do: W ]4 O: B8 d1 W6 t- J
Lan := rootfolder.Internal.Tools.AOLlanguage;9 ^, u( T- l. B' {0 U: S2 r8 \, N
if current = @.Destination -- else return
6 K; @% R' X O/ p then& N5 }* f4 u. P; l
@.Destination := void;
& i. G! l& M3 t if @.occupied then1 `8 `. [* T: i1 N7 f
part := @.cont;
. \6 `, j2 H6 I @.transpOrder := void;. Z8 G0 l# c* i+ [/ A, K! J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- e/ s' s$ e: Y# D
@,root.eventcontroller.simTime);
* Q* a2 ]6 ?+ A+ O: ~1 I* s @.HasOrder := false;
, h3 V3 \3 [4 N5 y+ o$ q6 j1 I @.DrivingHome := true;5 y- ^% |( _% z4 L
rgManager.tryToStartTransOrder;* h# O) v! v+ [/ X6 ~# d ^0 \
if @.Destination = void0 l3 u9 @2 w! D
then -- no transport order for vehicle @
5 m; |# {8 P$ v. o* V* | @.Destination :=
9 V2 _, d0 i/ Q. Q+ }/ D: { rgManager.nearestFreeStation(@,track.~);
) @4 M* F! r- u, @! L6 f# p newDirection(@); : s, K3 M' O8 @
if @.Destination /= void then# q; ]3 R1 W3 G* T( F
@.Destination.NumReservation :=0 l/ ]/ K% _1 L8 h3 X
@.Destination.NumReservation + 1;$ `$ g; L$ s# z$ E7 q
end;
5 P* p+ G5 b3 |8 _# i @.CurrIcon := "drivingHome";% }0 l: O6 K! w1 \+ I- U8 U* D& m
@.DrivingHome := true;1 ?3 G, R D4 B2 F6 M5 K/ n
end;
9 Q: c" S3 [ S4 \9 N a else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 Q4 S \1 S- v) {* Y, N
part := @.transpOrder;# f n# ?" h* J! K5 v# v9 |* z6 T
part.move(@);-- load part
* w- D; M+ E8 Y6 P( x( P R/ w& n @.CurrIcon := "load";
4 b. e& v2 F$ D" }% d; R GlobalDistObj := part.globDestination;
" m& w6 _8 S* p. d: k- s assignLObj := rgmanager.rgAssignL;
' l# }5 L& X' z7 v1 n6 G* W0 ] row := assignLObj.getRowNo(GlobalDistObj);) U% @/ r9 z2 `0 G$ Z8 D; R* z
if Row = -1 then -- since 70
& t6 ?8 b, W( ~% f+ ] if lan=1 then1 A7 z% t( ]( a) [1 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ] w! L: {$ }' J! q6 f) [3 q to_str("in der Andockstation: \"",?.~.name,"\""));' o& y6 {3 y: V( N6 w
else
E& |) p4 L6 @% B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 R% s9 n* t2 S1 c6 @4 i9 n& g4 N to_str("in docking station: \"",?.~.name,"\""));
! u$ ~1 O T. W end;
4 Z9 w6 p8 H- I2 X( ?9 y/ j/ L else
5 G1 U+ @$ h; j/ u3 \ @.Destination := assignLObj[1,row];: f; r' u* y; @7 @' s8 f
end;
! \ ~% P1 S G% @1 D4 w6 Z newDirection(@);
2 _- l3 y6 l0 ~& B- ?7 { @.HasOrder := true;3 w/ p: |8 @9 J, i& o+ S, o8 m j$ M
end;
& v" A% a5 P& Z( U) e( n end;
, }0 o* |6 O3 g+ [/ lend; -- of the method" ^. r/ A! g) f/ i
|