/* called by: entrance ctrl of the object 'track'5 }% j6 `% w! i8 W
*/7 s) f2 ^, m2 R- j! e5 u9 g
is0 q. S l E$ _4 R; N! x6 _* q `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 q5 z7 T5 e0 [: E& E% tdo
" j6 j, H0 R2 A Lan := rootfolder.Internal.Tools.AOLlanguage;* _% Q5 p& j, w' {5 q4 A
if current = @.Destination -- else return
2 t% c: m/ X, v: Q# C then
: y. X Y/ y; _: A; O3 ^ @.Destination := void;
4 B2 E# q* n: R8 v; ~% K( G* m if @.occupied then
/ f5 J( W/ a# } part := @.cont;) Y1 P- Z$ D5 D, e6 O4 G
@.transpOrder := void;$ X/ _9 c5 a: C4 `/ h3 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 C" H, E" {# l% ~7 p) W$ _/ q @,root.eventcontroller.simTime);8 C3 U# H( L, \6 }, A/ [
@.HasOrder := false;
' w% ^1 N( g3 |; O+ E d @.DrivingHome := true;# K$ w9 N2 `, m, H
rgManager.tryToStartTransOrder; F4 p. i# ~" {$ Y% P w3 s
if @.Destination = void0 h% C9 h4 C# J y& K
then -- no transport order for vehicle @
4 e i3 u0 W+ B" t5 a+ ]2 p- K @.Destination :=
( Q8 b; j4 Z. b rgManager.nearestFreeStation(@,track.~);
8 r# I5 T( D, y; e" \ newDirection(@);
# [4 A# o2 d2 m3 x1 A if @.Destination /= void then
" u6 H+ ~- e( [, Z) I. c @.Destination.NumReservation :=
6 f+ o" W4 Y2 w' z& \$ z! g2 l7 O& f8 R @.Destination.NumReservation + 1;
$ Y; d4 L: W8 L* p, F: n* ^5 @ end;' z2 _$ R) a& O& P1 K, t
@.CurrIcon := "drivingHome";8 S/ ~. ?- A A0 V7 P. H
@.DrivingHome := true;
! {7 e1 E1 \7 y0 P2 \3 M" L end;4 @; O2 c) ~. Z# N! X" ~/ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 O* k1 |; O' C' V d* S' b8 ~" O part := @.transpOrder;3 N% E( P4 Q/ T7 X% {+ {
part.move(@);-- load part
, y3 J: Y* c) \" y" b$ T3 e @.CurrIcon := "load";
6 N5 u6 }+ q6 M P! @ GlobalDistObj := part.globDestination;
_, _. n; S) ?3 e. l: D assignLObj := rgmanager.rgAssignL;
9 b f& L" b7 |' \5 \; F0 _+ f row := assignLObj.getRowNo(GlobalDistObj);
8 b! V; v7 p( R3 L t4 N if Row = -1 then -- since 700 d2 v& A/ g i4 ]4 z9 k8 C' r
if lan=1 then' @1 ~ q- p# C5 g# O9 G4 Y5 J+ M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 K0 P$ P# a s+ {" S8 H to_str("in der Andockstation: \"",?.~.name,"\""));
3 I$ J# x: c( l' b5 u6 s else8 f: V4 c( \8 @' W4 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' [0 a& _! q& E; f/ l; ?2 r to_str("in docking station: \"",?.~.name,"\""));
6 o, O% x5 u, h; C. p# P6 L end;/ o+ S T$ t1 I4 u" {
else
! ~8 ] p9 o: [& R: J5 }5 {; K5 }/ e" V @.Destination := assignLObj[1,row];
# B. k* T; p, f7 [4 O end; 9 }& Q3 w& w9 K+ T' Q% ]' h
newDirection(@);7 M6 O" `& G' L
@.HasOrder := true;8 i6 ^) o) P7 ~% p* I. a; ^5 C
end;4 U; f/ a& R, W; I& c+ ?
end;
: t9 N0 F' e7 s( c' p+ v7 D+ _* Cend; -- of the method) M% ]& {) ?( |( G
|