/* called by: entrance ctrl of the object 'track'
' M2 G, t+ q' Y- O: {* T*/! @( D1 `$ I) t8 N/ Y3 f; o
is
1 X6 L" K/ X4 ?2 D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 r7 E" G3 `; |do
* F2 s7 \3 g: i0 L- S. |8 N Lan := rootfolder.Internal.Tools.AOLlanguage; w5 x1 U! c# m; F" o
if current = @.Destination -- else return3 D b+ C9 V5 A; G2 u1 f
then: U) |3 u; `/ q* W! {
@.Destination := void;- E5 w* K+ k; Q6 }, d+ |
if @.occupied then
/ h* P, v6 L5 ]' s2 _3 R part := @.cont;
9 `/ K* }& g# S, l @.transpOrder := void;/ h' S8 m8 ?' J g7 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 D2 h, D# E' E
@,root.eventcontroller.simTime);
1 `/ \( a1 d; m1 ]- Y4 `! { @.HasOrder := false;8 X" f7 X- P9 g! C _! D) }
@.DrivingHome := true;
% a1 }" A# `' [" ^ rgManager.tryToStartTransOrder;
4 K- h- g; ?6 L S6 E3 U if @.Destination = void8 p0 e- |0 O% j8 z U
then -- no transport order for vehicle @- ?8 _! j5 Q6 P- t) t0 q7 I
@.Destination :=; l; t6 v/ A' G
rgManager.nearestFreeStation(@,track.~);
2 ]5 A( y* Z5 r( O$ x. K7 c newDirection(@); 8 _$ ~" u: h+ n! |
if @.Destination /= void then
1 H" ]! j0 z8 N U) t4 @: ] @.Destination.NumReservation :=0 w, C$ h! V) s+ R- H
@.Destination.NumReservation + 1;
0 ]# d% S# C) x+ c/ I end;* s. {6 _' e' r2 J
@.CurrIcon := "drivingHome";
; t" M5 Y I, X$ a% ] U# W6 c @.DrivingHome := true;
& z3 i) J$ N- ]2 y. ~ end;+ V# G i, H1 F7 g, W/ @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' S* n, Q2 n4 x# Z
part := @.transpOrder;7 K- j1 Q8 e/ `+ P* ?
part.move(@);-- load part
" M1 z6 L. |. I @.CurrIcon := "load";) Y( L* K0 D3 I: ]6 x1 f P) }
GlobalDistObj := part.globDestination;; G$ ~% a' [( u) ?' M) F
assignLObj := rgmanager.rgAssignL; M$ f) U: I. o, ]* O
row := assignLObj.getRowNo(GlobalDistObj);8 g8 ^1 W' K2 Y# Y) ^
if Row = -1 then -- since 70' [4 t% A0 [% r e% `- p
if lan=1 then
- o! R' ?: n4 D8 x" m2 m( B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ r- c# g8 W5 ?! j: e0 l+ ~; I to_str("in der Andockstation: \"",?.~.name,"\""));
3 t2 h9 U% ~) f- g1 F8 i2 T else5 E' f2 }4 _. Q7 ` `# A# [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& H3 _( I- B1 I% i B
to_str("in docking station: \"",?.~.name,"\"")); 0 i# _ [, r* O2 G6 B+ H4 H
end;5 }! ?8 a' w2 ~0 N( @
else
% x) V; |& d1 x" z4 l9 x @.Destination := assignLObj[1,row];
# b* O2 y+ e3 p/ { end;
U( e5 P8 l% H7 L4 S newDirection(@);1 A) d$ S0 }5 K+ @8 o
@.HasOrder := true;
0 N) n( L$ c# Z H6 { end;4 @- a. T" k7 _$ t2 s! o
end;
; H6 [7 A2 u9 y8 T0 Y9 l& Bend; -- of the method
: {' `: v0 b& y" @2 f. M: ?, K/ h |