/* called by: entrance ctrl of the object 'track'1 H! [9 x; D$ G) S3 T
*/% i" _" v' W2 _/ D4 r+ J
is
! W- W$ u( U7 w4 ~$ T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* n. q1 s1 ^2 [& Gdo5 C5 n0 b7 C0 w6 e4 S* h# f+ g
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ [( U [4 d/ M* _2 y# }$ `. U if current = @.Destination -- else return
1 h' Y9 M6 o3 z6 K then
- X) k( O& z3 A. D$ [ @.Destination := void;) I' F0 }) R5 T& |) @
if @.occupied then# ~1 E/ p/ B5 Y4 r! I2 y
part := @.cont;: b% V" \5 `5 h5 C4 p
@.transpOrder := void;
5 N6 K* k3 ?1 T8 G# C k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' D; i# h: v! ?. N' @' t
@,root.eventcontroller.simTime);
7 b# V( m" C+ ], ]; f7 x7 ]5 p4 @ @.HasOrder := false; I! n: g9 B n+ c9 o2 B
@.DrivingHome := true;7 U- u; `' u5 ]3 ^3 M
rgManager.tryToStartTransOrder;* S" B6 P) Y0 ^2 a- N
if @.Destination = void
) V, J: `: v* j* z then -- no transport order for vehicle @& T" u9 G# j S) j+ y. a0 q* L0 s
@.Destination :=
% l$ W$ _0 Y. U+ p# d5 h rgManager.nearestFreeStation(@,track.~);
* q3 x. Q1 _/ F2 T3 p newDirection(@);
3 B ]7 h, L. f/ z( a$ i: W if @.Destination /= void then
: ?: I0 y+ j ?1 } @.Destination.NumReservation :=6 q) @! A, g7 v
@.Destination.NumReservation + 1;, s- S/ ?5 E6 t/ z2 T
end;3 e* Z4 B, d2 Z0 R5 z- E* ]8 a! n
@.CurrIcon := "drivingHome";% V- h8 A4 i4 O$ h* _# Y/ p
@.DrivingHome := true;$ y; F% ^5 E# v8 K2 p) L) k
end;! W- Y6 b( r8 f9 P; Q/ O, r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 [ R) j; ]# H( W$ A) |9 U part := @.transpOrder;
. V. o) j! C, Y, d, h8 W1 g0 x part.move(@);-- load part
3 p# a' e% N) Q$ u8 b5 O @.CurrIcon := "load";% Y# x) C: G& h
GlobalDistObj := part.globDestination;
- H2 b# k' M0 T; X0 l assignLObj := rgmanager.rgAssignL;! s6 ^* W. `' p% T4 ` \. y
row := assignLObj.getRowNo(GlobalDistObj);
1 Z! [( S! {1 ~" C/ a4 \; Z9 r( ` if Row = -1 then -- since 70
! g; H% L/ K( |- {1 b& c) k6 q if lan=1 then* w3 {5 k. L, q3 y1 D; l' f& _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 x0 g4 r! M. ^" g% g/ Z ] to_str("in der Andockstation: \"",?.~.name,"\""));
+ i# N: A. j4 X* u! w3 Y else
8 U0 m# k- \% F3 `/ u$ F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 p3 w0 O( R- o* l' q$ ^
to_str("in docking station: \"",?.~.name,"\"")); ; f( ~( w: V! H& @& D6 H
end;
# b4 Q2 K3 l6 W% g1 g' @# w. b else6 ^: O6 X& r, _ c: I9 t
@.Destination := assignLObj[1,row];: l# T* e6 G4 B, c8 `$ ]' ]7 C
end; 3 n# m/ E+ ^% F9 Z
newDirection(@);) y* D# O* v& `
@.HasOrder := true;. M5 i6 d/ E. e7 u2 n1 `9 w
end;
+ q Y! `, X8 Q' ~0 l8 a1 { end;. O& e$ C# u0 Z# B! v) ~
end; -- of the method! K! a; K2 ]( L+ n" m* @* M: S
|