/* called by: entrance ctrl of the object 'track'
1 G0 F8 i, V7 G0 a. `*/
' u" Q+ p! [$ {is
% J8 Q7 v X+ e) ^! F" ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 {/ E- R# b4 \0 a$ i4 m- A
do
+ L' n C( Y5 W. F- [ Lan := rootfolder.Internal.Tools.AOLlanguage;
2 |1 ]. I! {; Y# U4 {$ X if current = @.Destination -- else return1 u/ V: n3 B8 b0 t9 H9 i
then% r9 y# |# R# U4 ]7 }5 _& K
@.Destination := void;! X ] ? E- a" e6 p+ t/ o) l
if @.occupied then" F& k) B( Y* \' x0 l' s
part := @.cont;2 P- N( G" m; `4 t
@.transpOrder := void;, c3 C' X% z1 r% T1 r. A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' B: ]; ~8 ^4 P r
@,root.eventcontroller.simTime);! a5 ~+ q5 s5 ?! r% {
@.HasOrder := false;
8 ~0 M$ y1 _5 ?" y @.DrivingHome := true;9 I& F% T9 \; G
rgManager.tryToStartTransOrder;+ X/ A3 k7 \; f" o! m
if @.Destination = void
& S. b* m6 b0 h# V, c then -- no transport order for vehicle @
. v v* \! E: {4 s @.Destination :=1 t9 _) c! G5 V, J5 u5 D1 g
rgManager.nearestFreeStation(@,track.~);. P! r) y2 T- j
newDirection(@); ( x7 I) g+ B/ K4 G* R9 x, I
if @.Destination /= void then
" j7 s- i9 @% k$ R3 | @.Destination.NumReservation :=
7 M! Z" Z3 u) h% w" D: X @.Destination.NumReservation + 1;
, i: [5 Y" w' H# d+ E9 h! F1 z end;
3 n; C0 G# [2 ]5 o( H% G H! N# z2 d @.CurrIcon := "drivingHome";/ f6 y( B* w4 b+ G
@.DrivingHome := true;- H) R+ M" @% Q) Y3 x3 A9 X
end;
" e" w2 {8 [# J else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ m6 ^4 B" D# B( {
part := @.transpOrder;# R, f& u/ m# C1 S( U1 N
part.move(@);-- load part
4 {: l8 T' M7 ^: y# s/ | @.CurrIcon := "load";
: r& h h& M6 ?- w4 G' G% g7 ] GlobalDistObj := part.globDestination;& ~& l) F" V9 u4 e2 p7 w1 I
assignLObj := rgmanager.rgAssignL;, L" w3 {. b' j
row := assignLObj.getRowNo(GlobalDistObj);0 U1 {2 ~% F& `$ }! E
if Row = -1 then -- since 70( v1 R* A; {6 s* _; q
if lan=1 then+ h& G+ w- g6 X: y+ d/ s; v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 U: D# P" r4 Z/ b8 |+ m to_str("in der Andockstation: \"",?.~.name,"\""));& F; n7 v( s& b
else
( i3 C! M9 q8 D. q, L o* S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 Z7 v+ v0 V- v" r3 y d
to_str("in docking station: \"",?.~.name,"\"")); ; m3 K( R2 q# F
end;2 w( k9 a/ G: ?6 _2 }
else
2 g9 V3 d: }2 p0 _7 |7 @; K @.Destination := assignLObj[1,row];
% U3 C0 }. _% {7 h end;
8 v' N" d# E9 K2 E n6 r+ g: ^8 b& `9 a newDirection(@);
+ A: ]+ q& S; T7 P @.HasOrder := true;
$ ]5 b# }- g3 [6 x7 D1 f; j" G end;/ n/ h! I! p1 F$ T* P0 X7 C
end;
, ?/ e' d2 @2 v6 C9 x- }end; -- of the method Y# J; z& J7 c+ h( h+ c
|