/* called by: entrance ctrl of the object 'track'' w! {+ g2 j) {4 t6 B: f# N
*/, M" a1 ^$ ]! Z$ l3 \+ R
is# c9 i- Q! R. T8 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ h" ]/ c6 N8 Z
do
( a% h' y& F; U) Z/ e6 J: \ Lan := rootfolder.Internal.Tools.AOLlanguage;2 t: d: }% K6 g$ H
if current = @.Destination -- else return
+ E/ v+ a* V( R: n6 U5 O then2 ^' o( ~* H. l/ P# k) S+ L
@.Destination := void;
4 f r. l1 D1 B3 a! z$ b9 M1 @: j if @.occupied then
& p: P3 y" i! Q/ {& M2 X, M$ E3 Y part := @.cont;
2 X) ?. [* ?5 P; n: }% r @.transpOrder := void;6 ]( ?9 Q4 L4 k) f1 h6 @9 A4 s% U& H! w6 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
N1 J% ^% |$ k6 V d. a @,root.eventcontroller.simTime);+ C% k8 L7 a* H6 w
@.HasOrder := false;
9 Y! [& U) b$ b* T @.DrivingHome := true;
, N& e" X8 _3 p, f. u0 [3 s rgManager.tryToStartTransOrder;
9 q3 R" u9 O+ v1 X2 z$ L& b if @.Destination = void
$ T. y* t: R) n; A4 h$ u% T then -- no transport order for vehicle @" c: ]" X0 l& u1 x) m, G# |
@.Destination :=. C; N" B+ o) ]/ v0 c8 j% ^+ |
rgManager.nearestFreeStation(@,track.~);% b A2 P2 B% f$ B7 Z$ n2 H
newDirection(@); . @2 W6 Y% N! m, q, B( y; w
if @.Destination /= void then
2 C9 B2 V" ?' k; H5 f, `& G) S @.Destination.NumReservation :=) Q8 ~$ g/ G- ~
@.Destination.NumReservation + 1;% M7 G; i3 W" T, ]
end;& g/ X: h5 u y( ]6 e7 ]
@.CurrIcon := "drivingHome";
/ s$ k4 e v7 t2 k) y! G @.DrivingHome := true;! r; G* J" l: @5 o" ^" i+ C1 d
end;
( \% d) i7 P' W% s- p% r- { else -- the vehicle @ is empty, both vehicle and part are in the same dock station- u7 l1 {$ w$ ~8 H1 K* Z. O
part := @.transpOrder;
; B/ c8 X" c' @1 @0 @! g+ W part.move(@);-- load part
5 q" F/ T* }) u1 p7 R @.CurrIcon := "load";
" g. t( d) @. _. u5 r; \. X) \' O; J# | GlobalDistObj := part.globDestination;& S( {% ?) [9 l6 Y
assignLObj := rgmanager.rgAssignL;
& u$ Y4 O' M4 j* i5 |; c# b1 `1 M; d row := assignLObj.getRowNo(GlobalDistObj);/ d# y. Z$ r# H. }
if Row = -1 then -- since 70( G, H' z& A$ Q( E; q5 `
if lan=1 then& l& ~, \2 R9 g6 d! [0 C% @) F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: a8 _4 H" X" a! I' O) G* {) i to_str("in der Andockstation: \"",?.~.name,"\""));
& R. P7 V3 v8 c else$ c% H# h" d# N r, Z0 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& i1 b6 W0 _; t/ J7 _( d8 h# O to_str("in docking station: \"",?.~.name,"\"")); 8 z8 |$ L9 m) r& ~( Z8 W
end;
1 x, V! a% l/ ^5 {1 m4 }! I else
8 T$ u2 @" X# G6 u1 M L @.Destination := assignLObj[1,row];' I# R; G: J! U. l& \( v
end; ( l8 F2 Q6 D8 p1 N$ h5 K' i
newDirection(@);
4 n$ i/ m' @" n' _2 g @.HasOrder := true;( g0 b. G# B! x: r
end;1 X7 F! p1 J3 o- g% M2 U! I
end;3 H" U" j' N7 d' ~4 j& _5 e
end; -- of the method
/ B' W, T1 v' m' C0 m |