/* called by: entrance ctrl of the object 'track'
$ y; @. K7 Z6 U7 q% P$ q: M*/
0 Q# `! m& \ f4 }$ {7 T( \* z' lis
/ w- `0 X6 e1 f% i7 F+ e' C part, GlobalDistObj, assignLObj:object;row,Lan:integer;' Y% p A& N# R5 D5 P
do
5 J# E% f G7 F: p0 R' S Lan := rootfolder.Internal.Tools.AOLlanguage;
2 F" c& u. Z* Y4 ~2 M% X if current = @.Destination -- else return5 f F. c$ o1 K3 p1 a
then9 c9 m6 l) y% e3 ]( C8 I
@.Destination := void;: ~- N+ w/ H/ v3 W7 L- _4 n
if @.occupied then% { ]& h5 o& G# M2 R! f
part := @.cont;
! {6 t& D7 y/ g5 { @.transpOrder := void;2 E/ I; t) M0 ]: S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; E8 Q: Q- Z4 |; y+ B/ H
@,root.eventcontroller.simTime);( G( H9 o8 }% Z
@.HasOrder := false;) f6 R% C# Q5 C2 U0 v% P
@.DrivingHome := true;) b6 n' w8 q5 q
rgManager.tryToStartTransOrder;
2 ^3 O* Y$ R; E8 G0 P if @.Destination = void
k7 s% _; D2 g then -- no transport order for vehicle @
- o3 N% n; r& U: q. I1 g$ s' t+ A @.Destination :=9 G0 x2 I. A g3 w
rgManager.nearestFreeStation(@,track.~);2 i$ _2 c9 V5 U# H" F3 L$ L
newDirection(@);
% ?7 k. h7 {( N0 ~- n if @.Destination /= void then
1 ~6 ~7 j9 ^8 Z9 L9 r1 N @.Destination.NumReservation :=% X1 ^" t9 D: h! C- l4 @0 [! ^
@.Destination.NumReservation + 1;$ S; x Q" E5 N0 v6 K" W A# \' j
end;9 v7 u! b- r, u3 F7 w
@.CurrIcon := "drivingHome";+ J# V9 r+ `: f1 Q
@.DrivingHome := true;0 L" N$ U6 `0 l# U
end;0 a* x: E: y6 P& d, f* v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. d' k6 K/ W0 Y8 H/ d) G6 D part := @.transpOrder;$ d: _& M9 l7 q( C3 u) @
part.move(@);-- load part
& j2 Z: K8 {) v9 h, R" w @.CurrIcon := "load";
( U, K- ~+ b: Q$ c- F GlobalDistObj := part.globDestination;6 J; F) P& C! }4 o
assignLObj := rgmanager.rgAssignL;
. [! C5 O( I8 ~. e4 G1 ~ i row := assignLObj.getRowNo(GlobalDistObj);
. I& c$ W* a; q: y: l0 U if Row = -1 then -- since 70- H& l& D. M% p( {& s ]6 k
if lan=1 then
0 k7 K4 T, ~$ K4 W/ r$ I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 x; k( Y7 B6 T6 _9 ~) J
to_str("in der Andockstation: \"",?.~.name,"\""));2 V1 ~. I: v9 X* N$ C/ x5 B# J7 j
else
2 b; g* D# t, o* s* b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 B) Q, ?& b: C0 n
to_str("in docking station: \"",?.~.name,"\"")); 7 M; a/ j2 | A. [* k
end;
( q+ E5 z& E% \: p else
* X: I7 {0 A& I- y* U* E: C( a @.Destination := assignLObj[1,row];
/ A" X3 | w# M: z4 \$ s end;
; `, ?7 }& `( \: W3 s; @ newDirection(@);
+ I j! t$ J5 U- V# @ @.HasOrder := true;1 W* U+ E$ d3 |7 |/ X: H9 n; X
end;$ U# s8 {7 s4 ?- ~, W* i" T
end;
O( |" ]5 I* a. P- O# jend; -- of the method
6 T2 W5 M. Z2 }* M |