/* called by: entrance ctrl of the object 'track'
# U) @, H" X: W* F" P5 U*/1 o% U. \& }0 o; X( D1 M
is# ^/ Y, G5 J9 v! ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 ]6 S7 F5 D. [! ndo
: l" v6 l* K9 W/ a6 h; T! P Lan := rootfolder.Internal.Tools.AOLlanguage;% b6 c4 d- X7 U A: C
if current = @.Destination -- else return+ F9 V& C4 m! {5 q5 y
then% t2 f0 t1 `* @; w4 i% I, T
@.Destination := void;- @9 o4 ?3 _/ V
if @.occupied then
$ }* M# w& R) m# Z G. b& x part := @.cont;
' J: ~, M6 }: D( T2 U" _ @.transpOrder := void;. o6 F3 I5 {5 z# }( Q p/ n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) ?, V$ d0 l: T+ J6 q% b$ k @,root.eventcontroller.simTime);
! }+ I7 o6 r; E) \! L: ^3 \0 g @.HasOrder := false;
9 Z5 c3 D0 D3 d7 i7 l @.DrivingHome := true;
7 l3 ?/ l0 x) G" e; a# V! u rgManager.tryToStartTransOrder;
- t' `+ O2 \0 [ if @.Destination = void* P2 y' ?* B8 q/ [; F8 d$ ?
then -- no transport order for vehicle @
- U. i! e# @8 K0 j @.Destination :=
5 S* o. E9 A9 ^ rgManager.nearestFreeStation(@,track.~);
* i. ~8 t$ S5 n* \1 f {8 k/ P newDirection(@);
; S- T) B. w0 Y# H if @.Destination /= void then( n" e+ U8 s/ ?' U3 Z
@.Destination.NumReservation :=
4 d2 ]/ a1 {3 K/ {" n/ T @.Destination.NumReservation + 1;
+ p6 l, X# `, b2 U1 `4 F G, M end;
9 z; `" }4 n$ F+ n4 A @.CurrIcon := "drivingHome";6 g7 m2 p% F0 z. W
@.DrivingHome := true;
$ s) c9 y9 s' r+ o end;4 x c2 x; f4 j; F8 X3 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% }0 D8 F. d/ n part := @.transpOrder;
; k. t& [" m" ^& l part.move(@);-- load part" O/ J: Y: i; S5 A0 Y
@.CurrIcon := "load";
9 r& ^# x3 s& E, V/ j6 z- D GlobalDistObj := part.globDestination;. I! p$ [ B$ r4 K1 q
assignLObj := rgmanager.rgAssignL;
6 `8 W4 c: x. m& t row := assignLObj.getRowNo(GlobalDistObj);( _. g* [! Z, F) r- W) f/ I
if Row = -1 then -- since 70+ X% Q* u' z( [
if lan=1 then. i( D' w" N# S6 \) V$ z' D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" i/ t+ u# ?" R1 X7 u7 S% ~2 s to_str("in der Andockstation: \"",?.~.name,"\""));- _- S# [) b1 y1 H: r' v) S: X
else
0 V$ A( S/ N+ m b4 Y5 e; H; k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 H% q3 b# j" v3 e- z( p
to_str("in docking station: \"",?.~.name,"\""));
3 ~+ u3 e# r ^3 m; l end;% ]3 J+ T+ [* F3 t
else
; a" c: y' ]! e @.Destination := assignLObj[1,row];% c* Z# E* Q, m9 L A, t
end; 7 I, p, R5 Z+ L
newDirection(@);- [4 Q. c( V* l, _/ Q
@.HasOrder := true;
+ Z, s/ a9 b9 e$ F% a3 c7 m+ ?0 r# j end;/ r- [ a. r" [3 \3 N$ l
end;# x5 F5 X5 {5 J# B
end; -- of the method
2 J! q1 O k( o9 k* k |