/* called by: entrance ctrl of the object 'track'2 D' N" P: b7 [) d
*// T# Y9 _3 ?9 P/ x9 n' ~
is- {+ h5 p* U& L3 q) G$ P4 f, m$ C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: G5 j0 p4 d9 F; T9 A" D% _do* W; ^; a8 q6 ?! m& d
Lan := rootfolder.Internal.Tools.AOLlanguage;
- ]! R% n# u- r1 ?0 t" R& h if current = @.Destination -- else return4 l/ ]. V5 K) R
then$ Q9 g1 ^ P. S9 f. I
@.Destination := void;
3 J+ e2 \0 F" G5 k, c3 F9 ~ if @.occupied then
, G1 }2 M" K1 M9 C' {0 W2 { part := @.cont;
! Z: g1 V3 u3 S @.transpOrder := void;* O: w" r( q. ^/ I7 M% x9 c* W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' W5 H1 s! g4 ?# A+ n0 ~2 [ @,root.eventcontroller.simTime);
, n, y: o" }4 r5 J. p @.HasOrder := false;, e+ o( o1 w- x/ @# c
@.DrivingHome := true;8 i& e1 ~+ F3 f1 J
rgManager.tryToStartTransOrder;0 k% Z! E6 c4 D3 }- j( i# Z- a
if @.Destination = void' g: v. b5 W9 J6 ]
then -- no transport order for vehicle @
" u$ E1 q5 G6 B& { @.Destination :=- f1 S' k m8 M6 g! m* C
rgManager.nearestFreeStation(@,track.~);4 M3 n. f) ?. |8 Q" v- K( h
newDirection(@);
0 E' r' f% P' @" p1 U if @.Destination /= void then1 e; W3 |) U0 a1 P2 ?: T5 `2 z
@.Destination.NumReservation :=; {5 X0 U* S6 d7 c
@.Destination.NumReservation + 1;
6 W4 E- c$ w1 {$ ~6 [9 B end;+ G# t5 I: A" h% m' c6 z1 G" s0 v
@.CurrIcon := "drivingHome";. }* o# D$ Z# X1 T" S$ C
@.DrivingHome := true;0 m1 k5 ?0 `2 z# `: ]6 s
end;
( M% h' U- y; u& I4 {1 ]) y5 R+ C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; f0 N* z9 I$ w3 p0 E2 ^' C8 N& t$ i part := @.transpOrder;- U1 n3 t# q- ~
part.move(@);-- load part! i- b: t( B) e; z5 s3 V0 k# o: f
@.CurrIcon := "load";% g: `' P4 \1 V" e6 h0 m ^( Z
GlobalDistObj := part.globDestination;9 `, t) L1 Y2 D1 A- r
assignLObj := rgmanager.rgAssignL;
- W V6 E, f2 Z- ` D Q) Q row := assignLObj.getRowNo(GlobalDistObj);/ O* e; }% @, h& A* d+ u7 f
if Row = -1 then -- since 70# ^: L3 w9 z% `0 H \3 ?% W$ U# r
if lan=1 then
: s0 v! c3 p# Q* p+ \" B( H v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 J& M% h' N$ ]8 ]6 ?; M to_str("in der Andockstation: \"",?.~.name,"\""));# V: |* Z! ]4 W% z$ {' w
else
, p$ b' Y" e3 G1 q( t( P, ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& q# x) h. X# s7 O' }! o% V u) G
to_str("in docking station: \"",?.~.name,"\""));
9 k3 z% J& A z Y/ S J! F end;7 H2 u8 K! R% {7 W5 S; T$ A. M0 U
else
9 A+ V7 Z5 }8 X @.Destination := assignLObj[1,row];; A7 ~6 f7 B4 ]
end;
5 X0 b5 Q+ e+ F! e4 G8 ^( A G newDirection(@);
+ c( s4 s- j0 V( x6 o @.HasOrder := true;; l+ k; m4 U2 u! A) Y2 K
end;; W: P% F% @2 Y' T- K) x3 K# c; _4 h$ x
end;; k: g o. ` p0 g
end; -- of the method
, Q* D9 r; v, q1 J" Y% a |