/* called by: entrance ctrl of the object 'track'8 P$ {7 j7 g s2 i1 @0 J$ G+ Y
*/
% U/ e* w1 d7 Eis
4 a) K Q& {9 h# w' q! A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 x8 m |1 c; \0 m# U8 e( Vdo
" W) d& Z9 h, c( W: s) h, T7 h Lan := rootfolder.Internal.Tools.AOLlanguage;# g# h4 t2 B) P9 I/ P8 i
if current = @.Destination -- else return
' h* h' w$ ]* `! k- }2 j then0 ^2 ~/ |7 ~( {! c3 j9 e
@.Destination := void;
2 c. a9 W- x2 \: _8 A" B if @.occupied then: C% H8 w. U3 Z) i2 v [& z
part := @.cont;1 U* r# v' `' \1 Z0 i7 B
@.transpOrder := void;% R% p9 h. b; f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
p( l. l& y7 H @,root.eventcontroller.simTime);
8 P: l( Z9 L7 I4 G8 N! Z# R @.HasOrder := false;
% w, P' v! Z9 d5 y7 e: Y8 h @.DrivingHome := true;
7 y9 }" h4 A: K' q rgManager.tryToStartTransOrder;
7 D3 T" N% R! S- V- u8 c if @.Destination = void' A% ^- _+ S6 z. k
then -- no transport order for vehicle @' T# v% K- h4 i" `# M7 i
@.Destination :=
: Q+ v( n9 W C% y. H3 _- D' b1 _ rgManager.nearestFreeStation(@,track.~);5 u, N/ G0 S7 q3 N6 _3 ~
newDirection(@);
2 @7 z" \. j, q( n9 l if @.Destination /= void then: C3 f1 D G( ]6 [+ q9 ^2 B
@.Destination.NumReservation :=
( n" }/ ?8 ?9 S2 F @.Destination.NumReservation + 1;) @4 B/ n! [8 U$ W3 p
end;
7 }+ q& M$ A6 j7 } @.CurrIcon := "drivingHome";, j3 }. Q2 N9 w" t6 |5 `
@.DrivingHome := true;
0 [$ l* [% g& U) \ end;$ L: |* b% q& M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 t* y# ]- a+ b8 a+ ~ part := @.transpOrder;; q2 v% e0 w( w) x7 A3 L3 k( s
part.move(@);-- load part$ z: E+ m1 A' d' }
@.CurrIcon := "load";
" s3 W0 [' V. X7 Y GlobalDistObj := part.globDestination;
+ r) y8 W% ^* y2 k/ f assignLObj := rgmanager.rgAssignL;
, t) G( t: M4 \ x row := assignLObj.getRowNo(GlobalDistObj);6 _9 M+ _1 H( G( x
if Row = -1 then -- since 70
" Y- `, P; [, l if lan=1 then
8 g0 J- K* Z# \* i3 s& X+ E, L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ]# ^! J" S8 ~* E; o: Q to_str("in der Andockstation: \"",?.~.name,"\""));
; V4 C, o8 V2 ^. r9 Z' ~ else
4 d) T6 o% W# w2 z2 f! F* Z1 d# Z; [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" s; _, _5 e" o' O4 j. a to_str("in docking station: \"",?.~.name,"\""));
4 u; T) u F+ O$ J# x end;% p; u4 p, G5 r# \! _7 i
else# _& L- ]8 Q+ }8 |! o7 M
@.Destination := assignLObj[1,row];
/ s3 t- `1 Z0 f1 V: L# { end;
" O# k0 T& o: b3 f, F; n" o newDirection(@);# m4 K% n+ N" s7 ]$ t8 k# e
@.HasOrder := true;! D$ C4 \2 Y6 E/ Y( b8 L
end;
: k3 h! R, R' k& u end;! N/ i1 H; F8 _* v
end; -- of the method
O( [; b6 e- l( R |