/* called by: entrance ctrl of the object 'track'
2 C; L- o/ F$ q+ b1 x& { K8 Y*/) b# e# D5 z2 Y4 d0 g" F
is
$ r& f$ `" t4 M4 k/ O1 h/ f9 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;# T0 w2 ]0 Q9 k B l
do
8 @( L) r5 D- x5 Z Lan := rootfolder.Internal.Tools.AOLlanguage;
' A' d6 B( E% g2 H% K9 b if current = @.Destination -- else return
% t( J8 E* w e8 i* Z then
1 E$ g5 }' r8 m: q9 G! \" o @.Destination := void;
3 z6 ~& x, R4 [5 p9 R" ]$ \* t if @.occupied then
% O; E: E- r; p% V7 S3 @ part := @.cont;& k1 O, ^( N9 G: G+ I1 r' i+ L
@.transpOrder := void;
) A; ~/ K. N8 W: ] l% z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 k9 l7 E- d3 N8 H! E! G @,root.eventcontroller.simTime);
U% _8 |6 l9 c0 ]$ l @.HasOrder := false;: i; Y( e( }/ r7 x# [* a
@.DrivingHome := true;
8 G0 q$ q. f L0 Z. ^4 \( { rgManager.tryToStartTransOrder;
% l& C5 v. t' V4 V: V if @.Destination = void
- j+ G9 U% ?: |* f( T Q then -- no transport order for vehicle @
% Q0 h) L* d2 k3 L @.Destination :=- h w5 J/ u# [1 O3 a/ Y- J
rgManager.nearestFreeStation(@,track.~);
5 M4 Z, n7 W$ \% h newDirection(@); a, J" `/ H3 H! S# O7 r, y
if @.Destination /= void then
4 ]% g6 G* Q# ?; |/ ~+ m @.Destination.NumReservation :=6 v6 v* J) l& F4 `, `) v
@.Destination.NumReservation + 1;+ }+ K8 a3 F6 Y# C8 s5 s! N% n( n/ i1 X
end;) Y: ]- [9 R9 a0 B1 T
@.CurrIcon := "drivingHome";
! J) i. [( L% X) p9 `! ]# W @.DrivingHome := true;
* q7 E: g5 {" [; Q end;
1 P+ m' m( L5 n9 N: F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. V" v& Z5 L1 S |' [: f part := @.transpOrder;
. ? O: h' H# B part.move(@);-- load part
$ K' V6 U# { n+ c @.CurrIcon := "load";
0 z7 ^5 D" m$ }% o7 |, T& N% j GlobalDistObj := part.globDestination;
- Q: q: ^6 z" n+ V/ U assignLObj := rgmanager.rgAssignL;
" u2 c1 I: ~9 o. o% g row := assignLObj.getRowNo(GlobalDistObj);2 @0 U2 w3 ^' v/ I+ c! ~
if Row = -1 then -- since 70
2 p6 d2 D4 H' h if lan=1 then
4 C7 Q( {( b9 E/ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 \) ^4 I. `" M) [- k6 r to_str("in der Andockstation: \"",?.~.name,"\""));0 x! Q6 s h& f; N
else6 Y: w3 C& i* |9 M& K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# {; l2 R) k% o( A! L: F. U; H to_str("in docking station: \"",?.~.name,"\""));
- D/ r6 Z( _" l! a# O end;
- x! ?2 k! i, f7 ]4 _! ?7 U else) l( q1 k# L5 ^; u9 Z
@.Destination := assignLObj[1,row];
5 X1 a+ D9 n7 W" D/ O end; 3 g; R4 `: k7 m, ], E- ~* q
newDirection(@);
5 B' {( [) I9 d7 @. k+ |. Q& N- I @.HasOrder := true;" N* O# e3 _) ^
end;% S2 U. c' P* C9 p! e2 Z
end;8 @, u) v$ e+ Z; F5 m- V2 B
end; -- of the method
3 c$ L' M4 P S5 J |