/* called by: entrance ctrl of the object 'track'
% }7 |/ }# I) @4 V: b: T& C, ~*/
1 R/ G+ S: O6 u2 pis5 S1 }/ N- p& U% p8 O& m( V" j7 b9 m1 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ F9 M+ n* h; V1 m1 kdo8 v3 N7 h1 P1 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
& }, D% P9 ^: i7 S if current = @.Destination -- else return2 B8 H$ v8 e. b8 ~: J( r
then( D) b. }7 X F
@.Destination := void;0 q3 ?! n, k3 J; U/ Q# E6 R
if @.occupied then
! I8 [1 |/ _- l# s+ b part := @.cont;
9 t& o) H$ i: @! e0 h @.transpOrder := void;" b7 r9 Z R8 W2 g; k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ] D" H# @" M- \ @,root.eventcontroller.simTime);
4 g* A( {1 E) v- p% c, m( | @.HasOrder := false;) B; S/ E& d& s8 ~
@.DrivingHome := true;+ S& E/ G* t4 x, j
rgManager.tryToStartTransOrder;
4 U5 h: w( N \; }2 B Z if @.Destination = void
4 w9 o3 l1 x. t& z: p6 t then -- no transport order for vehicle @, w0 d* S& x7 a0 r
@.Destination :=% T1 Z7 m# G4 a& \3 S5 i! A
rgManager.nearestFreeStation(@,track.~);
& ^; s9 S" ^! T newDirection(@);
. x! G# i5 X7 w% |4 O' d if @.Destination /= void then3 h! Z) |7 N2 K6 ?& S. v& \
@.Destination.NumReservation :=
) M& o5 }$ y8 Y& F @.Destination.NumReservation + 1;
) S. u4 z4 o) h3 Q { end;
3 W: ^$ ]8 [1 p0 D" O7 J) X @.CurrIcon := "drivingHome";
! ?' }3 B+ u; t6 K& a( p1 I @.DrivingHome := true;- ~% M. |% j, n# _* D& [$ D3 E
end;
% L$ a; |+ L" J& h$ q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
q' x# Z3 D5 ~1 y' B/ s part := @.transpOrder;3 W9 _" Q Z/ ^/ h) c
part.move(@);-- load part
9 U7 B6 W [' Y5 [% t @.CurrIcon := "load";
. Y/ t: X6 g; `6 a' a GlobalDistObj := part.globDestination;
$ b' R+ L9 ~; j/ ]9 q; T' N assignLObj := rgmanager.rgAssignL;4 n. z. Q9 U' `# c
row := assignLObj.getRowNo(GlobalDistObj); w/ B; U/ B5 v# e
if Row = -1 then -- since 70
# G, [% p. Z* }& D$ ~ if lan=1 then
1 T5 V) \& h* ]# |+ `- z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- \& F: F1 a; \1 f) i) V m
to_str("in der Andockstation: \"",?.~.name,"\""));
& v; I, i, n2 M6 t' O else
7 k, ~& q2 u, T( L/ \/ ^5 k+ X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# C, X$ ]) S* q
to_str("in docking station: \"",?.~.name,"\"")); ' x( V2 t' d" F1 p% G2 T
end;
% Q! c, |3 R/ W0 u7 y else# [7 y/ H% q0 s; l2 d
@.Destination := assignLObj[1,row];- l- \# M- w6 Z& a& Q$ Q
end;
9 Q& q4 ]9 ~' G* M3 x newDirection(@);
4 c) V- N# x& u @.HasOrder := true;7 r- d, ~' e! d1 q
end;* K) y3 l) R7 Y) t( O( d& ?
end;7 J3 ?# P- Z! T9 C, H1 w
end; -- of the method7 A: E2 s+ U+ q$ x* ~
|