/* called by: entrance ctrl of the object 'track'( f' D4 Q# C& v
*/' \ R" n- J, l1 t- k
is
8 L$ E. O4 J: g) D5 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" m+ P" K8 l& H; d) t$ n2 E0 |do8 ^, J5 P' F, O, k2 O n
Lan := rootfolder.Internal.Tools.AOLlanguage;! C! _9 }. @& x6 f5 S& F. {
if current = @.Destination -- else return
5 ]1 g: p' v* E+ C; G$ d then
1 @2 r4 {4 u( b/ |- f q! f' `, h @.Destination := void;$ Z9 s0 k2 h, h+ ?8 z" H9 u# p9 M
if @.occupied then4 c" K N' Q2 x
part := @.cont;
$ j+ w! u X. H% S7 `$ N- b @.transpOrder := void;: k- O1 W# v; n( Q2 A. y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 }4 G* l( M9 w! M @,root.eventcontroller.simTime);
% s; l/ i# F7 J0 ]3 D0 ~# [5 U @.HasOrder := false;; k7 b* l7 g# r( x. S$ c( c ^; G& _% X
@.DrivingHome := true;7 b# n/ r: y% b
rgManager.tryToStartTransOrder;
* f' d X5 |: |$ r& R if @.Destination = void% p7 C5 w% h* |$ [+ Z
then -- no transport order for vehicle @
; X% ~6 K" ~. a: t7 z# T# a h! t4 @ @.Destination :=
) P. h! P* \* l$ Q! W rgManager.nearestFreeStation(@,track.~);0 y# `) e2 X8 ~; `
newDirection(@);
& a' O4 x1 @5 x/ s# Q+ T5 u" _$ j, x if @.Destination /= void then0 {1 N0 _5 i8 T9 Q' p6 |, [" g: y
@.Destination.NumReservation :=% P% R0 D$ D& S0 X: s' F% |; N4 m }
@.Destination.NumReservation + 1;
" b$ v3 W" a) f" Y% D G. x end;
$ ]+ Y v, Z( g2 m3 o2 f. f; @ @.CurrIcon := "drivingHome";
7 O, Y. c2 S. Z# Z3 c; _ O @.DrivingHome := true;* u5 w: p8 X) \
end;
! n j% r# M- m& N x else -- the vehicle @ is empty, both vehicle and part are in the same dock station, \/ R- X2 j2 ]4 f! D
part := @.transpOrder;
" r/ d8 {! r+ H/ [ m part.move(@);-- load part# L2 ?( W8 ?; L# A& C: H4 T
@.CurrIcon := "load";/ Q0 @, s4 o6 b: F; X3 }; ~
GlobalDistObj := part.globDestination;
: K# _) U p& K: i5 g/ n assignLObj := rgmanager.rgAssignL;
" K+ }+ G8 y+ d8 n. m row := assignLObj.getRowNo(GlobalDistObj);( ^5 M* u X6 e
if Row = -1 then -- since 70
1 \0 w, P0 H- f0 d/ w7 g" H if lan=1 then
8 G- J E/ m3 c8 P! s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), t' j; S1 [; z3 d7 X) E
to_str("in der Andockstation: \"",?.~.name,"\""));+ b: n3 d8 y* `; z( C
else7 E9 D7 F8 h+ ?* m" J$ T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- ?$ G5 V) b9 h) y4 \( f- r+ b5 P
to_str("in docking station: \"",?.~.name,"\""));
/ v, g: V6 |2 ?) o end;: j4 i1 |% a& K7 b2 K9 L
else' ?! |5 y, s3 _$ M. Z5 |
@.Destination := assignLObj[1,row]; N+ Z' p1 U: V. a* r6 z
end;
; K, d4 z# V- v* `2 S5 v3 v& J newDirection(@);
- k+ Z/ U, B* D @.HasOrder := true;
7 R6 n6 u1 ?$ n, p/ c2 a end;$ Y; k. W2 c& B6 C% n
end;2 ?4 s/ r4 K0 o' D% K! o% T
end; -- of the method
5 e9 c0 T* y, l; T# f4 I6 u |