/* called by: entrance ctrl of the object 'track', M- `- g& n; R8 S6 f7 Z, v
*/
: W, ~* O B* |% m6 O+ ~is2 R9 K- ^' I* T" K3 I, q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* r- W i& x k
do
% B$ Y6 t4 ?' p9 ?. b$ H; ~' p0 H7 H Lan := rootfolder.Internal.Tools.AOLlanguage;! O4 i, y( z8 L/ Z: r( J5 g* ~
if current = @.Destination -- else return
8 E( G8 }+ v2 Z/ J: q then" Z' t# t( l7 G+ z! z* z
@.Destination := void;5 k- [6 |1 V6 Y( v
if @.occupied then
m2 \" l4 b. x part := @.cont;
& s |0 l5 z) d0 [2 _0 Q* [) t& v, T @.transpOrder := void;& b8 ?7 L+ n2 S1 Q3 R$ ?# F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# j) F" d+ w k% `" H
@,root.eventcontroller.simTime);
, ^( ?; t$ r1 t, i @.HasOrder := false; M9 L- a& p# B" q7 n4 P0 L
@.DrivingHome := true;* q; u+ ?# r; x
rgManager.tryToStartTransOrder;
7 L4 o' G. h/ D& S( d if @.Destination = void1 P5 q" t* J7 @$ B( S
then -- no transport order for vehicle @; q5 {+ q/ {+ L3 X0 Z* \
@.Destination :=" R! d% w8 a! t! l; G8 M+ E
rgManager.nearestFreeStation(@,track.~);
" Z3 O! n2 U5 v; Q' U- i newDirection(@); ; P; d" ~- G. |- w
if @.Destination /= void then
9 W1 D- P! G* g, V4 Z& a/ r @.Destination.NumReservation :=6 Y l; M; ]8 L6 m' N$ g
@.Destination.NumReservation + 1;# q% h* j2 S9 z% M. I
end;1 {& ]6 D& q; f! N5 T, b
@.CurrIcon := "drivingHome";" X( a$ ^- a3 o8 j, p8 Y
@.DrivingHome := true;" b( J& @' z6 e' U- A. {
end;
, ~$ h1 k G5 b8 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station- N( U& ?/ d. b' t
part := @.transpOrder;7 B6 n, {& S d/ T
part.move(@);-- load part
u# p# a; O3 R L% D# D @.CurrIcon := "load";
8 u" k8 t: i+ Y# \6 H GlobalDistObj := part.globDestination;
( M/ m, O% C/ K assignLObj := rgmanager.rgAssignL;
1 G: y! K! C; z V" A0 d; B row := assignLObj.getRowNo(GlobalDistObj);& E0 N1 m l' X; ~
if Row = -1 then -- since 70 ]# y6 ~* f9 _, n4 F! k
if lan=1 then. O( {8 K" K1 Z- O# x& M! z2 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
x, r& \7 u4 x" ~# Y to_str("in der Andockstation: \"",?.~.name,"\""));; Y( `. N% a) U5 o/ O6 g; n
else
/ Z1 Z* Z. v D6 ?8 s, O1 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& M4 T" }! p2 C- A8 C
to_str("in docking station: \"",?.~.name,"\""));
% z$ Z8 F- V. G4 {& N" Z end;5 }, S9 E, n$ d, k" P; X
else
- F0 R8 {% M* q/ a6 e. E5 Z( { @.Destination := assignLObj[1,row];- B, x7 B) k7 I0 f8 ]8 G
end; 3 X0 d1 T) R+ n+ W5 ^3 y
newDirection(@);
, e" v, F) |8 H' j1 l# @# p @.HasOrder := true;
7 V5 K n1 x8 Q/ s# U( Z8 x end;5 k3 @$ ]& @5 m t9 p' M
end;
/ V% d, s* M% k* Q. i! rend; -- of the method
1 N! r1 F$ i5 S4 y |