/* called by: entrance ctrl of the object 'track'
% V3 X. t# X2 o, w7 w# m4 D" q( W*/. T/ m2 \, w8 e
is
C, j! F0 F3 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 U* p7 V' @, S2 D$ h; l6 _7 I. H
do) m) M: E& {% @/ w/ \) p$ t
Lan := rootfolder.Internal.Tools.AOLlanguage;/ |! e6 N- }) h6 \- |/ G7 @
if current = @.Destination -- else return
- g/ j2 z, _: K# \ then
' W, f0 q+ v+ J2 J& I6 w @.Destination := void;8 k4 j3 Q1 h! z7 c* p
if @.occupied then: ~2 t+ t: [9 V4 z% L
part := @.cont;( g$ J, o7 ^, c) A9 _0 x" L
@.transpOrder := void;) F9 k. i6 w& |+ A8 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ N6 g( K+ a$ ~5 Y. n
@,root.eventcontroller.simTime);) g v2 N4 L# E9 @+ S9 U
@.HasOrder := false;
+ c" p/ i7 m# \+ D/ N9 H% s' o @.DrivingHome := true;
+ z0 t% G2 A: j rgManager.tryToStartTransOrder;: E B9 J9 o9 j9 V& [
if @.Destination = void
, v4 S9 |, u5 I7 D then -- no transport order for vehicle @' g. \8 q2 ], a# t1 I
@.Destination :=
( V, n# n2 i6 O7 u0 Q rgManager.nearestFreeStation(@,track.~);
" s6 A7 K- P0 `. k" g& _! M newDirection(@); J9 j2 D; a# C3 I
if @.Destination /= void then- Y% v5 W; h/ c/ ]1 h0 r5 g5 w$ A
@.Destination.NumReservation :=
! c) L. D! l9 J( o3 K. s, _' h @.Destination.NumReservation + 1;5 y/ Z7 O0 y7 v, r
end;; t+ {* ^2 ~/ m" b9 y
@.CurrIcon := "drivingHome";# v" G, W6 | b
@.DrivingHome := true;
5 r9 n# ?) t# r; ]' K end;6 J/ I/ o: H8 {% [# x/ K/ I/ t2 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 K+ U8 s0 M; U2 j8 ^; Y+ {$ T3 f" X
part := @.transpOrder;2 U! N6 r7 e" i5 {/ R
part.move(@);-- load part1 f) E$ g! J; d1 q' X; q
@.CurrIcon := "load";7 W) o& [: `7 P0 E
GlobalDistObj := part.globDestination;
" y( y8 c* {6 ^) Y6 d assignLObj := rgmanager.rgAssignL;
( s8 Y/ v+ E# {- Z" Y row := assignLObj.getRowNo(GlobalDistObj);
0 t0 z. M% z7 r/ b7 s/ x9 k; s if Row = -1 then -- since 70; B0 R8 K" f# T
if lan=1 then
+ r( e# o* {8 {$ X7 c6 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 c* X* C* M! w: w1 F: E
to_str("in der Andockstation: \"",?.~.name,"\""));
0 F# @7 n8 y* [ else% u) F. G, n0 E+ W/ ?# C$ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; \% V0 l2 x4 y% ]! A, a6 \0 ~
to_str("in docking station: \"",?.~.name,"\""));
: F* @3 Y) J5 O" C end;
: d* _5 w' U x: ~5 h( P+ @" Q3 S& s else3 B4 S7 W3 `2 ?: n# h
@.Destination := assignLObj[1,row];
* L4 t! \) |8 R4 w# C$ X end; & U. x9 g( U- p8 `
newDirection(@);. `3 y# v% q6 {
@.HasOrder := true;8 b- f G+ K* e
end;" g4 [6 C( V+ i; {4 s1 k8 p
end;6 I' [1 R) @4 l" ^; m c5 k
end; -- of the method
) L, U" Y8 m9 I. k |