/* called by: entrance ctrl of the object 'track' Y" e8 E1 k; Y3 r2 m0 Z% J. h
*/0 r& P# k- S5 m: a; c3 z9 h
is6 P ~6 E" ?; d" o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 e" a9 n1 _$ D+ {' k
do( m7 T* L8 f3 N) {$ ~% v3 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
B4 K. m9 p# H& f if current = @.Destination -- else return4 A# t! x0 q0 r2 C+ _/ ^/ u! V
then
, d" H+ ?) p5 b1 Y+ M @.Destination := void;+ `' R7 p+ p+ Y @0 I9 { V
if @.occupied then
5 r% y R. L( n* N3 l+ F0 d, t5 n4 @ part := @.cont;
5 Q; b$ F q( ?+ S% w @.transpOrder := void;$ Z* P2 O9 C8 n. \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 h7 w7 H* S1 L$ [3 }
@,root.eventcontroller.simTime);
9 ]0 F7 D3 A+ g# }* K1 c @.HasOrder := false;2 n6 {; j9 H8 H \1 T+ u& G! m
@.DrivingHome := true;' e" B+ x% G- @8 f% t
rgManager.tryToStartTransOrder;
2 R0 S( J$ a" b if @.Destination = void
9 n2 s0 Q& u" }2 b( ^0 I0 P then -- no transport order for vehicle @
% z& J c2 L! c6 S: l; ? @.Destination :=
5 }6 @9 e. Q* T" [ rgManager.nearestFreeStation(@,track.~);' `5 J& V: G9 _% K, ]
newDirection(@); 4 r! d1 J' J& g* ~' N5 V4 z
if @.Destination /= void then
% c; B$ j5 i2 z `3 G @.Destination.NumReservation :=
: I+ d3 _6 T6 C% c1 a @.Destination.NumReservation + 1;
/ K! c8 G' |" G! M- E end;
5 [2 J) y9 w+ F; I& ?0 x4 z1 u# E @.CurrIcon := "drivingHome";' w" H$ t9 s3 I2 K5 [- M
@.DrivingHome := true;. U8 j6 G- R; `1 u
end;0 T) y& q. K- E! o6 o/ R: Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" l! F, i0 X. k part := @.transpOrder;: H9 I' f6 r3 m4 ?/ O9 n" X
part.move(@);-- load part
" x; D/ `/ Q& x+ a @.CurrIcon := "load";. ?; T4 q; N# S) J' Y
GlobalDistObj := part.globDestination;
0 u7 y1 i! }1 g4 \ assignLObj := rgmanager.rgAssignL;
3 i" g2 @0 V- n( d, } row := assignLObj.getRowNo(GlobalDistObj);
) A9 Z& Z+ m9 P4 ~- n if Row = -1 then -- since 70& z. v5 B' ~' D, d8 J% K
if lan=1 then
$ P$ f& r7 H2 F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; W# a* j8 K( A9 d; Q0 }# r to_str("in der Andockstation: \"",?.~.name,"\""));, Q$ F8 ~6 d% M9 u
else
" v% o" {4 |7 R* P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: [2 ~, } Q6 T6 b( a) h' \ to_str("in docking station: \"",?.~.name,"\""));
: ^* s! L" N! a5 o+ S/ a$ x end; g( T- T& d. D# R
else6 a2 d2 D/ t( \! X2 ]( l
@.Destination := assignLObj[1,row];
7 \& A/ _& d+ A: L, q) F end;
1 y: r- k+ X$ l" h' Y8 q+ x5 x' m newDirection(@);. y- [1 L2 K3 j! B- _. n
@.HasOrder := true;! B& K3 r, q7 y: n4 u
end;
3 Z) ~3 k. Y1 Z' G% n* S8 [ end;5 N: m9 W# |& U6 m* c- g: m
end; -- of the method* H$ f2 p* W# m$ ^' a1 }
|