/* called by: entrance ctrl of the object 'track'
9 [% O% R7 t* b9 l5 B6 ?; W*/
4 T8 ]+ Y' T8 @3 E* K; Y- l) \is3 n+ O8 b& i; @$ e2 K+ z- \9 M9 L9 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; X6 V9 u4 p, {* l( fdo
& a+ b6 r8 P8 y6 u$ a Lan := rootfolder.Internal.Tools.AOLlanguage;
! t; w4 N- D+ G7 W y4 k if current = @.Destination -- else return& ?7 {3 y. `- c4 g5 z: ?$ W. z
then
5 L) N w) o8 @2 {, B @.Destination := void;
7 H5 ~! f0 g4 I& ]" c if @.occupied then8 T# [- [) o) P, a3 l
part := @.cont;
- C6 i+ ?5 q% `/ D" ~( b# p @.transpOrder := void;; T# F& f2 y' j5 T) q" n1 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* n: q4 ^/ x) W: W @,root.eventcontroller.simTime);
$ g6 ]" b: B" ]. }$ n4 m @.HasOrder := false;
4 }' W7 X+ t' u @.DrivingHome := true;
3 } d n% n% G: a rgManager.tryToStartTransOrder;
3 k9 s) B' H/ J& z. @( O4 p( V1 L6 J if @.Destination = void# b Z8 l- k* \+ G g. F; D' s
then -- no transport order for vehicle @
/ x1 f8 [1 s9 } D( P @.Destination :=" {5 Y+ ?$ O: b, C
rgManager.nearestFreeStation(@,track.~);
4 M, a2 t$ k) x8 `, y+ K, v newDirection(@);
1 f* u1 ?2 {/ |1 }5 A' s; C9 o/ { if @.Destination /= void then
( l; V. A$ y \- Z @.Destination.NumReservation :=2 D4 W+ W7 H9 G* u5 }0 ^
@.Destination.NumReservation + 1;
4 U) W1 Y0 @* w7 ?+ ~+ M end;; h" @" m. J' B& K5 @
@.CurrIcon := "drivingHome";
: Z2 k, w6 q- H6 ?/ h @.DrivingHome := true;
; Q, g% f, f4 B; C! L( f6 Y8 b+ i4 e end;
( s' P( h% K) Z* S& o$ w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, [4 @! t+ D8 Y" { part := @.transpOrder;, H D% T8 p; w$ P* i
part.move(@);-- load part! z2 d. X3 Z5 _" P" l# H( h
@.CurrIcon := "load";: Y9 [) }9 J+ t' g3 H/ T
GlobalDistObj := part.globDestination;' L' n, O5 R" X* M) U5 K: x; |
assignLObj := rgmanager.rgAssignL;, U& Z! [( `: b q7 e( S$ j: w
row := assignLObj.getRowNo(GlobalDistObj);
) R; c: |; s& d if Row = -1 then -- since 70- i2 S0 f! C" p% ~) I
if lan=1 then
$ y, K0 @, c; R1 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 z+ ?+ o1 I: B. N/ j" x to_str("in der Andockstation: \"",?.~.name,"\""));
0 E+ N' F3 \2 b4 u, m# B; w7 j else( R' E& @& D, F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 q( M t0 p# a. d to_str("in docking station: \"",?.~.name,"\""));
% u1 M' j5 C7 { end;
; g1 \% P* V6 _" X$ j else
, x! X6 Q/ o* b# U& h @.Destination := assignLObj[1,row];
7 `* O+ V7 M8 B* Z end; R5 g4 V* S# `1 Y, o- h/ I7 k9 d
newDirection(@);
' e( R' v; e& } @.HasOrder := true;
" W. `5 ^- W: m# n: d8 i; Z end;
2 T) F {) k6 P/ w0 ]8 _3 ] end;, ? e5 n& e7 q" U' x$ T
end; -- of the method4 C) \' J- x7 H2 h- @! p
|