/* called by: entrance ctrl of the object 'track'3 J* Y0 Z. B Q6 G6 K) |# K6 I
*/ `; c; L% C: I" t' S
is
7 S' n6 f% D& Z7 D$ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- }3 g3 q6 T% f f
do
3 p) S# [2 }! a( k, v: D. w Lan := rootfolder.Internal.Tools.AOLlanguage;
4 f0 }. E3 }' n2 j3 } if current = @.Destination -- else return
) U& |3 P0 T' T6 P8 k P ` then
6 a; S/ s" m. _; Q* L @.Destination := void;
b% T$ @% g1 f9 Y if @.occupied then3 w) R% e$ t: M. I: c5 O( Z
part := @.cont;
; i" D4 p2 `) f; i @.transpOrder := void;
1 C4 y4 F1 W4 @% j: r5 j. T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ B- `/ k! {8 e! n( b& l; j. S! Z7 U3 Y( X
@,root.eventcontroller.simTime);
m0 e- l" i. Y' @0 f6 q @.HasOrder := false;
! W. }: m. R" F2 f @.DrivingHome := true;. W! \* s, ^2 b
rgManager.tryToStartTransOrder;0 s' q$ i; \+ }& l# ?% @/ u4 H
if @.Destination = void# V/ d9 e, ~# ]4 ?8 A: e; s# _* B
then -- no transport order for vehicle @9 r9 t; S' ]4 l' x r6 O) s, o& h; g
@.Destination :=; p9 X! o- @6 M' |; O" O$ \" W7 u, G. Q
rgManager.nearestFreeStation(@,track.~);
; g' j- S2 ^3 U) l# G2 G newDirection(@);
2 f- ?) P& o( W( S8 {: Q: ]. l if @.Destination /= void then, K; ~* V) \- z% |
@.Destination.NumReservation :=
1 S1 ^. _6 }/ [5 { @.Destination.NumReservation + 1;
# v- H0 E; w( G8 Z7 ~7 D% P3 ` end;; p$ p7 ?( w2 Q
@.CurrIcon := "drivingHome";1 r4 g6 p+ S9 G& \4 v
@.DrivingHome := true;! s5 d+ ~! \# z2 B. y% ^
end;* `$ W, w3 Z6 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r+ v, R$ C/ W' R( X; p6 k- G9 q part := @.transpOrder;' Y+ L" G- H4 ^5 T# q1 s+ E- M% W
part.move(@);-- load part
5 }, M2 t& d- b* x1 j @.CurrIcon := "load";: |$ Z* p4 f$ q% z
GlobalDistObj := part.globDestination;, T" {! ^- \6 n/ F8 J
assignLObj := rgmanager.rgAssignL;
9 @' B ?0 _# `/ H/ w& a row := assignLObj.getRowNo(GlobalDistObj);
) g$ t; S# S0 a6 v if Row = -1 then -- since 70
4 G8 S+ X' V1 h, s" E1 ?! H/ Z* f if lan=1 then
a) [* u* C+ h# a4 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* M, i6 e# v+ s5 \" ]+ C: @
to_str("in der Andockstation: \"",?.~.name,"\""));- {5 H |; Y/ h6 V: ^9 Q: A6 ~
else
- F# ?" H3 _+ S5 y3 T& d# F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# p3 [: a- a: h" C, u8 D
to_str("in docking station: \"",?.~.name,"\""));
& J0 e0 e7 u+ e# ?8 y+ x! o- x end;# @5 @( t& a! Q9 i" L8 T. G% F
else
0 N1 m x9 k3 A @.Destination := assignLObj[1,row];
b* p) P) V0 r; x+ n' N6 [! ~ end;
3 b) Y/ F8 B4 X; H, k! Q newDirection(@);* J6 j* K" O/ I
@.HasOrder := true;3 ?. p s1 w- t7 L5 G3 N
end;, L! v4 Z5 r" G2 \
end;+ i; |4 [6 j4 w
end; -- of the method
) n( t/ @2 L1 N3 j1 I: H) X |