/* called by: entrance ctrl of the object 'track'
; x9 ]: R" W: D*/
: U# `- Q+ Y4 s/ k/ Sis
4 I- e8 S* C3 T8 _8 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;* r f8 `% M; K9 E1 t# J Q7 o
do: ]- n" B1 O Q0 t+ t4 K4 `# a
Lan := rootfolder.Internal.Tools.AOLlanguage;
; Z# q0 Q" @2 N# h8 d) I if current = @.Destination -- else return1 u. Z& @+ \5 ?
then8 f* [$ r+ V7 I. u: X
@.Destination := void;( E" O9 J5 ~8 \2 B# Y; U* Q
if @.occupied then4 y* s2 P7 R8 R5 U+ l
part := @.cont; R$ X" G. C$ e: v3 }+ e- R
@.transpOrder := void;* j# [; r( i# a' k3 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 p* `1 o9 k6 M @,root.eventcontroller.simTime);
P6 p! U; C W* X# ? @.HasOrder := false;* M g5 E( x# L* }2 y j
@.DrivingHome := true;
f' i5 M2 t9 x) Y4 ?- K rgManager.tryToStartTransOrder;* B. ~' j9 p! k) f' p- |
if @.Destination = void
& z% H9 S/ { U. m8 e" e! c then -- no transport order for vehicle @7 K# n7 R) M7 H/ y' S4 w
@.Destination :=
% Z" L5 E6 g$ n rgManager.nearestFreeStation(@,track.~);2 H7 F9 `! G& U
newDirection(@); ) r8 H C' K6 Q/ w7 v4 W, L
if @.Destination /= void then; @2 w- V9 o* ^4 Z8 r* c% Y
@.Destination.NumReservation :=6 _1 g! f; M9 {% F5 C
@.Destination.NumReservation + 1;
; M+ O) v1 i) p @- Q end;
+ g+ O9 J3 g( M# ^4 ~4 r' @ @.CurrIcon := "drivingHome";8 p, o9 m2 r8 j! n' Y
@.DrivingHome := true;
6 y+ c3 P, i3 I+ A end;
! |3 U6 ~5 l4 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 l1 L0 k# P' D% s, F, B5 K part := @.transpOrder;
5 ]/ ?1 V0 @( w+ Z7 o& S part.move(@);-- load part1 @( W d5 t) z* g
@.CurrIcon := "load";% j3 S* |- G* l0 A; @- C
GlobalDistObj := part.globDestination; p9 [4 y- b1 W( }& i* `1 g- i
assignLObj := rgmanager.rgAssignL;' O* L9 S6 \. e* P( R7 {9 b% ?
row := assignLObj.getRowNo(GlobalDistObj);
% h' c8 _5 |5 A; Q# N7 `4 _ if Row = -1 then -- since 70( \/ F6 r% @* z3 ]4 Q; p/ I
if lan=1 then
, k& }" A# B2 V. S! o6 c% z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ f+ j8 T( _0 C8 V, f to_str("in der Andockstation: \"",?.~.name,"\""));
1 k: `& E2 A2 O else
3 x$ y8 V( D- I3 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. x, z/ @# X7 ]5 h2 w5 J to_str("in docking station: \"",?.~.name,"\"")); u% r; o9 X4 Q
end;
9 M5 ^+ T0 ~2 D- [$ G else
& V( e1 Y0 C' V5 W+ A4 A3 ` @.Destination := assignLObj[1,row];# l" m* W. S; ?' J! }) c
end;
5 K4 C" V$ W1 A newDirection(@);
9 f" R* n# H2 V4 _0 M) j5 j+ S @.HasOrder := true;: I0 H) P. e9 o1 k
end;, {" {! Q! O$ |/ V) n
end;8 e% F/ W) E' c1 P3 n% E$ ^7 \$ v
end; -- of the method
- Z2 `4 f* _: Q0 |% d* b |