/* called by: entrance ctrl of the object 'track'
. H* ~0 S1 b2 L9 z- ~*/! I8 X& K. g g3 v C
is
7 q/ E5 M" M+ v4 d" j& U4 ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;' v9 [; Y* L, ~# I8 Q) u& R
do
% v' E* ^. j* ~9 A Lan := rootfolder.Internal.Tools.AOLlanguage;
3 x+ t5 K: g; g6 v$ S: q0 ~/ E9 ? if current = @.Destination -- else return
& R+ x3 u, a4 N* M$ j- L% l: c then! @$ Q: V0 c, G, V& i
@.Destination := void;# Z7 e( T9 F# X2 F& w6 S
if @.occupied then
0 w' R( A9 I1 @. |9 w part := @.cont;
9 c! q- W& f$ u) W: [ @.transpOrder := void; D1 w0 T# K& Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 g! l$ D% v$ Q4 C4 [
@,root.eventcontroller.simTime);
; N; v' ^+ n- t& v @.HasOrder := false;
- c, W; w2 ?5 m3 Y @.DrivingHome := true;+ M( L& \1 c& K) s: i' y
rgManager.tryToStartTransOrder;, S$ l8 b+ Z$ {, v' @
if @.Destination = void1 @" M+ y# E" l# \$ I. m
then -- no transport order for vehicle @
+ x9 Z" v+ p1 I/ v+ O @.Destination :=+ }5 _! \9 s9 b) K7 w; e
rgManager.nearestFreeStation(@,track.~);5 T7 W) h/ m/ r. T: ?3 |/ T& L5 ]6 }4 D
newDirection(@); $ u' c( z& J% m+ T( m! t6 v e
if @.Destination /= void then
, M7 G3 {/ G) Z) J5 }0 u6 N* w @.Destination.NumReservation :=
8 b3 U: y: u! T/ R6 G3 [, v' _4 T7 Q0 b @.Destination.NumReservation + 1;, V( b4 T; c& D6 S
end;0 L, u) E0 _2 m/ K( y! P' g
@.CurrIcon := "drivingHome";/ W8 x2 Q4 ]% o, ?. V& _! j Y+ _
@.DrivingHome := true;
3 x$ ~0 G( t# Z: u R end;# i' `" \& _1 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 Y+ S% z1 ?+ e* k" V
part := @.transpOrder;
) g2 k- c6 W3 V; R' J part.move(@);-- load part
6 v# l7 h2 a( z @.CurrIcon := "load";# L2 Z1 ?' i$ v* k* x
GlobalDistObj := part.globDestination;5 L8 u' `/ D! H) u8 b7 q) X
assignLObj := rgmanager.rgAssignL;5 ]& x }, g8 Y1 T: f1 S
row := assignLObj.getRowNo(GlobalDistObj);
) c& ?+ a: D- F$ e+ G if Row = -1 then -- since 70( a7 P( H6 h0 i k4 Z- j" b; h
if lan=1 then8 W6 k, ?7 P; I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- @, c2 I& k0 C1 m7 m
to_str("in der Andockstation: \"",?.~.name,"\""));9 u4 \* P( v2 k0 K
else0 [5 Y+ x8 f) o( ^6 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," p) c& g( i1 m5 m
to_str("in docking station: \"",?.~.name,"\"")); 1 k7 W8 w0 V) I( f2 T
end;! @0 g8 s0 z' p) I" S- J/ `
else1 m1 v [6 L; G1 i5 M, r: _
@.Destination := assignLObj[1,row];
* c6 Q- @0 G p3 H end; 1 u, W! s. b: |! C; b
newDirection(@);
/ C' I2 `! J5 a! P/ g( q0 D @.HasOrder := true;
# c: P, Z( t5 p% @/ x! f end;% v' U, R& _2 W! l8 O6 S2 ^7 L
end; B8 p- t! S+ |( @' y
end; -- of the method! ^ @* p& y! O4 W) v! E1 \$ g7 e
|