/* called by: entrance ctrl of the object 'track'
! v0 z* R) v3 q/ M i" j*/4 }% D7 }) g# i7 D) N
is
% J: Z. M, {) j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" }. N; n5 I% S, Hdo4 p: \# j* h( m, b
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 \3 ~, b: v3 H if current = @.Destination -- else return
( {3 C! M0 M( Z then
) z6 f8 Q0 O7 G0 a @.Destination := void;
8 @& O9 ?9 K2 ?& T0 l5 z if @.occupied then
# }( y, ~# R; K+ E' y part := @.cont;# L w( ~( Z5 b* o- A7 i: O
@.transpOrder := void;
; |; i, [- H4 H7 R" f) |* P" g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 _# _: V9 D3 ?1 t2 [+ q @,root.eventcontroller.simTime);
% K7 O, m; L4 M. b @.HasOrder := false;, L" Z d! c/ @* ^- `: W2 i
@.DrivingHome := true;/ A4 c: [7 `3 Q* b; x: n4 V
rgManager.tryToStartTransOrder;, V3 ?. @( Y" @$ [1 f" P
if @.Destination = void
* Q3 R3 ^, c( x( P then -- no transport order for vehicle @
1 k _- W! S8 q" a: J @.Destination :=
7 O. m4 \& H- A rgManager.nearestFreeStation(@,track.~);% W% G4 V- P0 Q! r+ T# E0 S
newDirection(@);
6 h( A* s% ^1 w- `+ s if @.Destination /= void then6 o) J- {' z! S
@.Destination.NumReservation :=
% S9 `8 o: n; J @.Destination.NumReservation + 1;
2 e5 o& }9 U o' x. N; i' e" q end;
$ Q8 K+ {& W8 I @.CurrIcon := "drivingHome";
) I1 H" V$ t" ^* L1 B+ f Y: K @.DrivingHome := true;" z+ d/ l2 F- Q' q. V& g7 ^1 P
end;
/ H6 D: g3 H) [& r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 r. x! _$ ` ]8 v7 F part := @.transpOrder;
8 @2 W* J4 V% x5 ^# ~/ m% l' Z2 ^ part.move(@);-- load part7 J8 r% ^, k8 x* ]
@.CurrIcon := "load";( x) z8 U G$ \" Q
GlobalDistObj := part.globDestination;
; G+ r% t% S7 T( `. Q4 } assignLObj := rgmanager.rgAssignL;
8 j; m# d2 W$ i! n/ d row := assignLObj.getRowNo(GlobalDistObj);( _5 G# Q; U' A# `
if Row = -1 then -- since 70
9 U% c3 q. m* C) J6 P if lan=1 then
" [. U& J4 K4 x5 y- ^" T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 s9 F0 `6 |) |8 v5 ~6 x, p
to_str("in der Andockstation: \"",?.~.name,"\""));% V: s& h! l1 ?# d0 z1 _- h
else
( A& C; k4 B' H+ P9 _8 ^! y( F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Z: G( @" I Z, b# z) q/ g
to_str("in docking station: \"",?.~.name,"\""));
' U( N& H, `! L7 r" I; m0 ~, h: R8 a end;3 ~+ V' Q$ X" j+ K/ [% A
else" V6 w# ^9 c0 R) f5 H. x3 t7 _! y& @4 c/ C
@.Destination := assignLObj[1,row];' l5 ?( R0 O! I8 C3 C5 \" H
end; # @; c f2 S$ j3 r2 S- b
newDirection(@);& Q* d4 ]& @- Z7 k6 a- M4 `
@.HasOrder := true;
& z) e4 e7 {, c2 ?: _* v0 |' Y end;
4 Z, `; F) z/ B$ G' k# f) l end;6 q( s7 p4 _# B) x9 g3 T$ W; u
end; -- of the method
6 O6 {: \2 c: C1 K, N |