/* called by: entrance ctrl of the object 'track' a& G/ \. a" I" F, i' C( M8 i9 M
*/9 E1 `) d$ h0 ^3 Q; J9 N
is- D% o0 I1 i+ M" R' K* `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 H6 e1 m: D1 d
do& c4 E7 H6 F" t; v5 S) r
Lan := rootfolder.Internal.Tools.AOLlanguage;8 u' ^: \6 p- A
if current = @.Destination -- else return$ W- [: S9 E/ A( g. o/ f' |. |7 x
then7 U6 s# j/ A+ a- Z; b
@.Destination := void;
) H! i6 ]. o7 U if @.occupied then
" H- G/ s0 v R! O; l part := @.cont;; X- Z: m* C6 t+ [$ t
@.transpOrder := void;8 w9 B6 I6 I& A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; w: q% j" j! o; P: b7 Y
@,root.eventcontroller.simTime);
9 R$ V/ E! {* h @.HasOrder := false;3 h: U) ?2 F6 k) t! \2 v7 e
@.DrivingHome := true;7 Z( g. M: @& p# {9 `/ I9 i
rgManager.tryToStartTransOrder;$ _! E. C2 y# G5 G A: l- q5 y
if @.Destination = void7 G& k9 n/ K' N, D; s
then -- no transport order for vehicle @
, Z+ }& L# t! O9 R; y, R8 g @.Destination :=
8 t0 D# Z; N8 y8 X. _ rgManager.nearestFreeStation(@,track.~);
( C- c- |' @1 c/ T( K' ^" }7 D newDirection(@);
+ Z( ~2 o+ H! I; m& ? if @.Destination /= void then
4 v) P% }* E$ Y0 f* i O @.Destination.NumReservation :=
8 S0 t3 N+ K/ L @.Destination.NumReservation + 1;2 r: |" ~7 n- T/ A0 I# B! Z* e6 }
end;2 R% j+ V$ E ^4 w/ C
@.CurrIcon := "drivingHome";. ]1 i3 I# ]; ]0 p! f# Z6 p
@.DrivingHome := true;
1 S: n- U8 Z6 @ ^; @+ z0 _ end;5 I3 G( _+ l4 `$ ~: G7 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 S& P- } O" p; P- r
part := @.transpOrder;, X9 @5 Q+ T$ D: W. u
part.move(@);-- load part
3 @, Z: p4 K/ f* J* S3 o# v @.CurrIcon := "load";
( K- O5 R. U. _' A/ C8 ` GlobalDistObj := part.globDestination;: `: \, {' e$ \
assignLObj := rgmanager.rgAssignL;
5 A$ ~9 p* R, l0 V& K# E row := assignLObj.getRowNo(GlobalDistObj);* K) f( _& M4 l8 c
if Row = -1 then -- since 70% ?( q" \ ]4 d% j
if lan=1 then2 o9 i& D8 ^0 q8 j" A e2 V/ n/ k0 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. `+ c% } A9 p
to_str("in der Andockstation: \"",?.~.name,"\""));
' i8 C( u7 x# M. n# T9 @ else9 F5 Z4 D7 S- I& c8 X5 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 }& I. v, t8 v# c( E& T
to_str("in docking station: \"",?.~.name,"\""));
2 G, s" ]1 R( f- L end;6 O. ]% A6 Z1 ~! }3 B3 z e5 @5 Z
else+ s7 t" I2 S2 L2 T* A- f# C p
@.Destination := assignLObj[1,row];/ B @8 v; J/ Y( D% I
end; ; a. ^& |3 m0 a1 T" p
newDirection(@);* i" {8 {1 i$ M* a1 t0 u' U# @5 j. v
@.HasOrder := true;
: M5 R/ e% y7 g; @' P end;! y. u8 c: M0 F1 `) `, W; Z
end;5 B6 b; w4 Q* [% ?
end; -- of the method
: B- s0 a3 i& z+ ]- E |