/* called by: entrance ctrl of the object 'track'. d5 ^9 i( m( @8 o0 P
*/ z( ]/ q% e3 o: g
is
( L8 o2 T0 o+ D) n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 k% g* Q0 `6 N, l, R2 U5 Hdo
) w2 G$ Y( q$ b, k Lan := rootfolder.Internal.Tools.AOLlanguage;; u5 r/ V0 A+ y! i4 t5 n' [
if current = @.Destination -- else return
6 G0 K# I0 ]/ m( F# w then& d# ~8 B2 Z0 n k5 c+ U
@.Destination := void;
+ m5 b# e" g- D: G% q if @.occupied then
3 t& B$ V- p* Q; g2 @3 b part := @.cont;3 @( x% B8 {/ q' n
@.transpOrder := void;
1 a2 {, H9 L( ]# x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- f9 R& q* q" t+ N9 b3 F5 G2 ~ @,root.eventcontroller.simTime);
( y+ a# d8 f- N+ m @.HasOrder := false;' u6 v8 J; Y8 b8 F$ V9 t% l. L
@.DrivingHome := true;
' h$ N+ @ T9 } rgManager.tryToStartTransOrder;- l+ {5 _( P# c
if @.Destination = void
( n. A2 l8 E+ p0 A* ?% _# R then -- no transport order for vehicle @
9 e( F! h& H6 ]* o9 n7 _ @.Destination :=
2 G- V9 a4 {3 j& i rgManager.nearestFreeStation(@,track.~);# I1 R. z6 I0 w+ ^ @$ Q; m) B
newDirection(@);
" o, j7 t$ Q0 B# [% { if @.Destination /= void then! I* p5 W9 B% O
@.Destination.NumReservation :=
; r$ r* `; x- }0 c0 `# @5 K @.Destination.NumReservation + 1;: [2 g3 G: i1 F" K1 y) w
end;; Q1 e. j. \( H" U
@.CurrIcon := "drivingHome";
+ }( U% h4 W- ]; {. M# ~9 D! Q% t3 D @.DrivingHome := true;0 D- v: j5 ]6 Q1 R9 T
end;
' O- [( H: Z$ D# K: b. i% O else -- the vehicle @ is empty, both vehicle and part are in the same dock station: g. J" L8 d! M
part := @.transpOrder;
1 ]# I0 v, B# r U: y* k1 s# A part.move(@);-- load part- q4 L }& G- g( M! s/ j( O
@.CurrIcon := "load";
- b; G7 K% {7 z g+ X+ w GlobalDistObj := part.globDestination;$ Z" b/ M2 b5 a: d
assignLObj := rgmanager.rgAssignL;
4 N3 h1 Y( X, |9 O row := assignLObj.getRowNo(GlobalDistObj);# S. |+ S4 K! s% ^0 \
if Row = -1 then -- since 70+ {0 d5 ^1 k9 x/ M" u
if lan=1 then$ I& F4 S1 ]7 M2 O' w& i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Z6 X* W. Y3 n9 \& X# O; v
to_str("in der Andockstation: \"",?.~.name,"\""));
8 Y: H4 l% W; T: V4 B else q( X9 Q7 z! y; k: V ?$ L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 F7 C4 ?5 N$ ?( D8 | q
to_str("in docking station: \"",?.~.name,"\"")); . ?7 z3 D; R0 O7 e. C3 E# j, J' V
end;
- ~# _: p% n7 s5 ~- l else8 Z9 ]! r" n. k1 R% Z5 c" M
@.Destination := assignLObj[1,row]; y4 H* @1 ?5 z; {; W
end; 6 h+ K' B5 C4 E$ ~) [5 W
newDirection(@);, z5 m3 @, P% Q' g P" b7 s
@.HasOrder := true;
/ b* ]) ?0 V; L- J2 @! V8 E1 z& L$ w1 ~ end;
. g! S* x! E/ c* O/ ^ end;
* Q6 P D5 L( ^, j) @# nend; -- of the method. A& B% P9 W' Q0 t _4 I4 s* g; r7 |; c
|