/* called by: entrance ctrl of the object 'track'
+ a' P6 G V5 Q# P' |7 w3 a*/
' i+ K7 R" b2 o* m2 b$ Y1 ris& W7 ]3 ?7 }" `4 O9 A: K* V+ J
part, GlobalDistObj, assignLObj:object;row,Lan:integer; Q3 }# `: `' m# f
do3 H6 P+ d5 `" O; I
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ n% `" M% `2 `* I4 _# w3 R if current = @.Destination -- else return
& U6 |! e# t3 Q* a4 ] then
+ I3 Q4 V# h1 p6 \/ B" N @.Destination := void;8 r, e3 }; h: o
if @.occupied then9 E, ~% o: ?) q8 A
part := @.cont;8 a! r) `% |! k/ b: I* s* Y
@.transpOrder := void; v& U) L* O( [8 H( R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# T3 i* N1 t: o1 B! {# j5 z" T
@,root.eventcontroller.simTime);4 W8 }+ o6 g% Q* E% p5 p, n
@.HasOrder := false;. t5 f- U: w: Y; F! T0 E
@.DrivingHome := true; `' s7 z! P1 n; G* y3 w* D8 y
rgManager.tryToStartTransOrder;, j; Q7 {5 ]$ {$ m
if @.Destination = void
% a- |: E. Z: j then -- no transport order for vehicle @ P/ }/ v+ a2 x6 }/ s& i
@.Destination :=
2 O, B# a* B0 f rgManager.nearestFreeStation(@,track.~);
% V( J6 z; Z L6 F- t0 j newDirection(@);
9 I5 r: ~! J5 o l8 ^ if @.Destination /= void then
# [6 O: }8 `- k6 l' i+ H @.Destination.NumReservation :=% E: r/ _4 Z: K$ m, `
@.Destination.NumReservation + 1;& E4 ^; [% I8 `, E
end;
e) V, d' D# O @.CurrIcon := "drivingHome";) z y& i6 d: k. I: r
@.DrivingHome := true;' N, i& [6 P- |$ @8 b1 N- l
end;
2 w( Z- t# l7 b8 s' { @$ i& K8 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 N5 t7 u6 e3 s; [2 R d. H# r
part := @.transpOrder;5 f1 a' k: Q9 E- Y/ V, j* i9 g
part.move(@);-- load part
* }& j: N* s+ R @.CurrIcon := "load";
1 e- k9 o7 p/ F0 u$ P+ G. w GlobalDistObj := part.globDestination;7 {. V9 c6 k6 ]6 M4 a7 S* @1 J! w
assignLObj := rgmanager.rgAssignL;; k- _+ e1 ^9 E- @& L) S, Z( @
row := assignLObj.getRowNo(GlobalDistObj);
1 x- i1 w6 O! G if Row = -1 then -- since 70' |8 r* x; ?! [! b! M+ V
if lan=1 then
1 v! _' V, S" h' V( N) y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), q3 x8 {: i0 P2 ~
to_str("in der Andockstation: \"",?.~.name,"\""));+ A( ]- K) I7 C
else3 r, k9 I* d- X2 t& n0 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ o H$ I7 ^5 h- h
to_str("in docking station: \"",?.~.name,"\"")); 4 O% f) ~) s& {' ]. s/ ~0 f
end;
) J" x4 k/ P: J i$ S else
" s& @, K$ T) U0 w K% v @.Destination := assignLObj[1,row];
" P! F6 l* Z6 T end;
- }( J0 ]/ y' H# m0 h, | newDirection(@);. o s+ w1 w" D, \
@.HasOrder := true;
- @+ s, j7 ]$ v: E0 `- p* x end;
% v3 t& o4 P+ q9 b5 ~ end;: \3 q' r$ R; Y! I$ ]8 C; b
end; -- of the method% F" J0 F( [6 I
|