/* called by: entrance ctrl of the object 'track'3 n" [/ B2 @6 A7 l$ R: y+ a& @
*/: B" k; b% i/ J, p* B* \" A
is7 N( I) `2 V5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& N9 I. U0 M) `; u* D' ido
! J2 X- }# l x& P Lan := rootfolder.Internal.Tools.AOLlanguage;
, F$ R! B: A8 N' h" ?! d6 d if current = @.Destination -- else return
* ?$ P7 R3 y$ f% B' ?# z6 a4 v then
1 T: C+ o- G& B n$ z @.Destination := void;( Q: e) G5 A5 y
if @.occupied then; E6 c% S7 V6 n7 d; R ?
part := @.cont;
/ W$ G% L/ B9 k0 q/ J( v; { @.transpOrder := void;
& g% V+ C. o1 W0 U# U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 f/ k, a; o# {4 \7 h
@,root.eventcontroller.simTime);
- d) |# Y% `( h+ Y* c @.HasOrder := false;
5 d( Y8 e8 y& p( v; l9 s/ B @.DrivingHome := true;% Y6 Q' D* G& W
rgManager.tryToStartTransOrder;
- L& ~$ x7 [+ E E- J8 j if @.Destination = void
& k; X' y! e& W# p then -- no transport order for vehicle @. }, B3 ] R* X0 T L' W+ W. v
@.Destination :=
R8 y6 y% L& C6 ^' k rgManager.nearestFreeStation(@,track.~);% w/ X, A' [1 t
newDirection(@);
* N5 {$ ~8 ?9 Z+ n/ \$ B if @.Destination /= void then- W0 W# o5 e8 ~3 n$ d. I& K
@.Destination.NumReservation :=
! L/ X+ k5 ~: w I* y @.Destination.NumReservation + 1;
' Q4 q/ j7 W" o2 I2 B# j end;
, x2 l0 f6 V1 C: E# e9 w0 i @.CurrIcon := "drivingHome";8 l4 l9 g. S0 t4 [' R- `* `
@.DrivingHome := true;
! p: I6 L" H# Y( p% g, b( } end;
# A, v( Q& V) V# v2 O9 l: m- i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: S( Q' ?- w) f9 k, p part := @.transpOrder;- v6 o y- \/ O( ]! t/ e
part.move(@);-- load part. q% l+ o+ g* |# W' l$ ^. R0 Z
@.CurrIcon := "load";
4 n+ q7 l) i% r5 W* T4 Y GlobalDistObj := part.globDestination;9 R* r7 ^# |3 C* Q
assignLObj := rgmanager.rgAssignL;* x* O; c; T9 C% a) R9 V1 k/ @
row := assignLObj.getRowNo(GlobalDistObj);: J& g3 a% c7 @' c$ o
if Row = -1 then -- since 70( A8 l2 n% @+ Z1 k& a% u" g
if lan=1 then9 C- V# p5 x& g# ]- o9 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 L; T- d) m) J1 @8 r7 W to_str("in der Andockstation: \"",?.~.name,"\""));
; W( i1 u1 e3 i8 y+ G else) ?# |( n9 p& F, h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 }7 m5 c+ M: I to_str("in docking station: \"",?.~.name,"\"")); ! E) d) m! d, I. W4 Y+ _
end;
6 y0 u. G2 \; [- W- h else# y9 E: s# e- J! [
@.Destination := assignLObj[1,row];. M" Z, m3 J% V5 O3 ~
end; * x, e6 k# z" C, d% O; t+ J
newDirection(@);
) q# v9 F4 L' }' K @.HasOrder := true;2 a9 ?/ S m b5 q! s9 `9 A( m
end;5 Q# m1 A% p0 w( d3 Q7 `- L
end;* s. ]# o1 Z. n* J" d2 z/ h* {
end; -- of the method
, `4 l0 Y" S( M% l4 E n |