/* called by: entrance ctrl of the object 'track'8 |9 r- y* c/ N, k/ l" Z/ g: c
*/; o! ]; r8 M$ Q
is) W/ k4 \% [; i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Q% m! N) J: m0 v+ r3 Q2 V
do
$ W. Q# ^0 H, P Lan := rootfolder.Internal.Tools.AOLlanguage;# C7 J; @) |- d
if current = @.Destination -- else return/ K! D" [1 d, J: I. d
then
/ [- g* L A( U1 D3 { @.Destination := void;4 z* A4 R# J3 b! ]6 r
if @.occupied then" e0 d2 Q1 Y- g! A1 R( d* w6 L
part := @.cont;8 a$ V8 Y1 Y& W+ l0 K
@.transpOrder := void;
& _% k3 H9 E/ k1 ]# f( p2 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. x" I0 y5 J! P3 _# ~/ A @,root.eventcontroller.simTime);
9 M+ g4 X* H F i2 p, U2 H) p @.HasOrder := false;$ W# y3 p0 k9 v0 Q6 N9 X
@.DrivingHome := true; r) @( q2 _* V, W( a* U+ g
rgManager.tryToStartTransOrder;
( _# {9 Q F; r4 `7 E. G* Z4 t if @.Destination = void6 ` }9 G. N+ u5 W- O3 y) v) B
then -- no transport order for vehicle @
2 q. ]. m3 k' ?, V: B$ b. w @.Destination :=
( i8 e9 M# ]3 k0 v rgManager.nearestFreeStation(@,track.~);) [ J5 X% d, c% Z1 A( l: ^) G; f& e
newDirection(@);
$ G1 ]4 |% C0 g2 ~% o if @.Destination /= void then
: i; g1 q, x3 E1 r @.Destination.NumReservation :=: P8 O5 t$ Z' e3 @
@.Destination.NumReservation + 1;
" C( g% p+ }2 P/ x' |0 r% b end;
0 P' G: r( t. Z+ g @.CurrIcon := "drivingHome"; o# I5 y1 R; X' a: y, l
@.DrivingHome := true;0 D; B% Y3 v' N
end;
! I9 o4 _4 v" F# D! o$ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 c: D* I5 Z$ T$ D% D' I0 P
part := @.transpOrder;
7 ~" h8 g5 g# J% b- E part.move(@);-- load part4 o% }' m s3 c/ C' ?
@.CurrIcon := "load";
. k" |% Q/ H6 {# B* g2 X. a2 z GlobalDistObj := part.globDestination;
9 F0 _/ I4 E1 p9 D; R: D9 ^ assignLObj := rgmanager.rgAssignL;
1 R5 T9 m5 B6 L! X9 g% _6 s row := assignLObj.getRowNo(GlobalDistObj);4 y& ]# u1 `5 |+ Y0 ~
if Row = -1 then -- since 70
( \, \/ ?; p! {" A9 z* g if lan=1 then3 m5 w% o- _3 Z8 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. y' h* F. O; H# V4 D to_str("in der Andockstation: \"",?.~.name,"\""));
0 _8 p1 f' M" N else
6 [- B0 O7 f! X( _, W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 N; p1 v5 x* c9 r. G to_str("in docking station: \"",?.~.name,"\"")); ! Z7 z' T- m9 v+ F6 R2 j0 t) d
end;
- \( k9 A9 t5 v( B Q; F; G* A9 K; J O else
/ J+ w, G) Q+ k8 l; U: B3 `6 H @.Destination := assignLObj[1,row];$ ^2 \2 V0 f2 j
end;
( T3 F" Z W3 y9 p2 d newDirection(@);
% X# q7 i; M$ [9 Y# J# J @.HasOrder := true;
$ _" G, C" U0 S2 K$ t8 H end;; I6 }. e5 X8 f6 {5 W4 L# A/ }
end; b' `6 e/ P; z( ~
end; -- of the method
; L: D9 D. e1 E$ O& y; e6 C |