/* called by: entrance ctrl of the object 'track'# I( @7 r8 M* I" d
*/* R$ m. i+ H. ?
is, }2 t8 k3 g) W! e. m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( J, B$ @6 K& N% f7 [0 x: V) Udo
, O- s. w8 P/ Z" P3 f Lan := rootfolder.Internal.Tools.AOLlanguage;
* s V* _3 Z# _# _2 o0 m) ]# O. \; [0 @ if current = @.Destination -- else return4 |; ?2 _( v; s9 v; y& D
then
: J, G7 V4 a: C7 D" q o @.Destination := void;
( y. I+ u8 S' Y) D/ ?# l if @.occupied then; U$ P$ @+ Z1 A# E3 @- m2 c
part := @.cont;4 M+ d7 B0 v7 K( ?
@.transpOrder := void;2 E# x0 R3 N: e C& J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% y6 t) {7 d* F
@,root.eventcontroller.simTime);% h/ _2 z1 Q( ^
@.HasOrder := false;
( f, ]& {+ y5 E; E( d2 F4 g+ j/ T @.DrivingHome := true;+ Q! {& m, R9 K! j
rgManager.tryToStartTransOrder;
0 {: Z. F. e, w. h: }5 X if @.Destination = void/ t2 t' y5 e7 d2 r: j
then -- no transport order for vehicle @6 M; y7 A6 b( r( g1 R; S
@.Destination :=
% q( u4 I' O$ m4 N* i rgManager.nearestFreeStation(@,track.~);( d) }4 e8 G, D2 ]' G
newDirection(@); * {- s* F3 [( [9 w* A; e
if @.Destination /= void then$ V( A Y( F5 M. G
@.Destination.NumReservation :=
4 T1 K9 I6 F# |, @ @.Destination.NumReservation + 1;6 R# Z$ v6 w$ g) ^. w% s3 b
end;/ u& \# M( X* _
@.CurrIcon := "drivingHome";
- ~% W7 c4 \4 s6 s& D6 M @.DrivingHome := true;6 `7 \+ T# r% e
end;
, u3 V3 b8 n, A7 t7 }5 R5 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station, o& n) W" M7 a8 R! s0 k
part := @.transpOrder;
+ U9 W+ D+ g: m7 a part.move(@);-- load part
& i3 T: g" I3 K$ Z" t/ [ @.CurrIcon := "load";
# E2 F$ `6 ]6 b0 e2 m" M& u4 w. E2 { GlobalDistObj := part.globDestination;
9 p- y+ E" q' ^0 r assignLObj := rgmanager.rgAssignL;! Q2 }' w G4 f; s
row := assignLObj.getRowNo(GlobalDistObj);
" I& V- h8 M' R6 b0 Z7 W- _ if Row = -1 then -- since 70; F* G5 w D0 t. R- _
if lan=1 then
& f( m2 h* R: u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& o& G0 m, ]+ h- X1 i# Z) m to_str("in der Andockstation: \"",?.~.name,"\""));! w1 `0 p# n. B7 O: Y1 }4 P( n; i5 V
else2 \8 `- m8 `* h2 ]; w$ h' Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ C P- i7 P. p) K% L0 T0 v7 @$ m
to_str("in docking station: \"",?.~.name,"\"")); % p$ ~$ w9 o' U+ J! E
end;) \4 d7 f, N- S5 c
else
; H' J9 T- ~$ G; g' j& q0 R @.Destination := assignLObj[1,row];2 }, d- a. a2 L% `$ o8 Z
end;
5 h8 a- {; |2 G newDirection(@);
4 c" C6 w: E$ C) O @.HasOrder := true;4 `4 H2 N& d7 ?* I
end;
?$ l: A6 C+ k1 T, v# j0 G/ W end;
5 \2 u' c1 T0 e5 mend; -- of the method) ?! q% @6 z% u1 M2 P, D9 n
|