/* called by: entrance ctrl of the object 'track'
' Z- m9 U' ?3 ^% L*/, s/ q5 [ r5 f" L$ N
is
* ], z9 x' d+ ` S4 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ k( R9 M* {1 n* I
do2 ] B- i- A0 @9 s, S# a/ l
Lan := rootfolder.Internal.Tools.AOLlanguage;
' Z& x5 T5 }; w/ H" ~; U if current = @.Destination -- else return3 d _1 n6 g5 W5 f& g3 W
then
2 S& w" }) N7 o8 ]5 D' j4 z @.Destination := void;% @8 J7 X+ g5 S: r0 d/ _
if @.occupied then
, ^: m% K% o8 W# B part := @.cont;
$ d F, E' B$ H7 Z @.transpOrder := void;5 ~7 \5 \$ f; n; E: A3 }% b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ r \+ U) g' s7 D7 I @,root.eventcontroller.simTime);
- O' f8 e0 e' {' k- s3 R8 v @.HasOrder := false;! u/ ]% h7 X9 z& O$ K
@.DrivingHome := true;
8 }% |! Y- G7 F- l rgManager.tryToStartTransOrder;- ^+ Q/ c! k) X; z9 [6 L
if @.Destination = void
/ n4 e5 {0 b6 G; n then -- no transport order for vehicle @# t: Z6 _) R$ u1 l) a
@.Destination :=
" D6 s: ^% S# Y6 L) \ rgManager.nearestFreeStation(@,track.~);
3 `+ |* u& r, I; c, i1 r# I' G newDirection(@);
5 b8 r' c# m2 R* v if @.Destination /= void then
9 B; ~' |, c/ t. r: ^4 @ @.Destination.NumReservation :=8 t% e* I4 w* j
@.Destination.NumReservation + 1;7 s; j; o3 O+ l) V- `5 y
end;
# q. i7 J0 x0 `$ o) W8 G% e' B) s @.CurrIcon := "drivingHome";
3 P) w: p6 G! R, K7 m7 w @.DrivingHome := true;( D. j. R3 q7 f2 A
end;
0 @) a! K* t. A/ @8 d, k3 _. Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station# u. a( g7 i/ x) P' ^
part := @.transpOrder;
# o( k: N2 T/ U' G3 V part.move(@);-- load part
' s1 v. Q( Y; B @.CurrIcon := "load";! h* E8 m2 [/ N! y5 p$ S
GlobalDistObj := part.globDestination;
: |. H0 X) ~( S# Z; X0 U: S assignLObj := rgmanager.rgAssignL;
; k7 Y1 ^5 T1 O row := assignLObj.getRowNo(GlobalDistObj);
# |" p3 M9 l; O+ V% x if Row = -1 then -- since 70/ {- |/ e" h4 v, X; X" r
if lan=1 then
1 n% o9 \5 u6 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 b( Z! C; H+ B( |. e# [# e* L
to_str("in der Andockstation: \"",?.~.name,"\""));7 E- H! B e2 K* k/ E( T
else
% u3 r& _: C6 a+ |, h: Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 I. Y' ?, N/ ~+ q, Q9 C to_str("in docking station: \"",?.~.name,"\""));
+ p# V% z5 d/ t( O$ H3 y& v end;% J0 O! F: |- E" W
else3 @+ w* V% J* I4 [" H
@.Destination := assignLObj[1,row];. e. d5 R$ ^. \& H0 K7 l
end;
; ?/ a; f- s) e$ {/ o8 h+ ] newDirection(@);
; x" z! T3 r7 B+ r" Y5 H9 z0 f$ h) } @.HasOrder := true;
# }' w' ^' D# A# Q! D) \# I7 V end;- d/ M6 M4 X/ M1 f3 V! {. ?" c0 t
end;, ]9 D2 z3 P, X$ S8 S Y
end; -- of the method
, ?( ?6 \3 h ^# s9 P |