/* called by: entrance ctrl of the object 'track'
" O4 }& I, D( h9 z*/6 b5 I0 |; E" B
is/ m- v5 }! _" ]6 m8 ?! d3 p: C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- G- @: x+ ^+ a* t, w5 o5 u3 V: H5 rdo
9 b+ V! V3 l# P0 \) p1 J* K$ s Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }9 c1 C# E- }, A# x if current = @.Destination -- else return
0 N6 V3 d, s. G! ^, r9 k5 R then& r! u- s$ d; j
@.Destination := void;
9 o: N( s6 F F3 a5 G if @.occupied then+ a3 X5 k4 k$ l4 v- _4 Z
part := @.cont;
5 d6 s6 z# W! G1 C- f @.transpOrder := void;5 b- j3 {( n8 t& _# K8 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, z. Y V0 F+ O! C2 b' |9 |6 A
@,root.eventcontroller.simTime);
% F4 [# q5 b& z. S! P& V @.HasOrder := false;
' R6 E9 p. i4 a, y @.DrivingHome := true;9 H* ?3 F* r, Q
rgManager.tryToStartTransOrder;
" |8 ]( G. _0 {9 a$ ~0 |- h if @.Destination = void
3 @3 V6 d0 `; a( j" d then -- no transport order for vehicle @: {& w9 @1 y9 m9 h& `
@.Destination :=
' o" L5 x! U( Y rgManager.nearestFreeStation(@,track.~);
4 y! W* p- |. F% i newDirection(@); ( c' _: K( Y1 f9 G3 N0 z; w* D
if @.Destination /= void then( L" z; @7 k6 B9 U
@.Destination.NumReservation :=" t: j0 }. o5 u, C w4 [
@.Destination.NumReservation + 1;
$ d5 c- [1 F; ?8 N end;
, \/ |5 F" ?( i- o @.CurrIcon := "drivingHome";
a& L# ^5 `& y3 ^+ ~ @.DrivingHome := true;+ r3 a& ~( {& h- [. x/ ^
end;
( J& L/ v! Y+ E/ Y4 D. F0 Y! W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \. z+ g4 Z7 O. M+ D* f2 { part := @.transpOrder;
. T1 j6 i8 t% A part.move(@);-- load part( S& e6 W5 S/ [8 T, C) L. B5 S7 ~
@.CurrIcon := "load";" L3 c6 m' w: W' G& k
GlobalDistObj := part.globDestination;7 L0 o% s/ R$ x' w/ V
assignLObj := rgmanager.rgAssignL;2 a# F8 w1 N6 J3 Z9 K) ?
row := assignLObj.getRowNo(GlobalDistObj);
% f0 v9 N! w$ Q4 r L9 f: X if Row = -1 then -- since 705 I2 S' N8 m; r: P1 w
if lan=1 then* m9 {% d" d: A% J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, C9 Q1 B& G: h6 h' J [. W% r4 e
to_str("in der Andockstation: \"",?.~.name,"\""));
+ V- d" W! i8 @3 v else) J; B, Q8 P8 K0 I% |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; _8 P1 \' K# s3 g% R/ I
to_str("in docking station: \"",?.~.name,"\""));
! k: W f8 `/ r; O2 h3 p0 x: a9 d end;6 e9 |1 k) A r- U/ g4 g0 J
else) U' g4 U. D) S2 g5 V+ W
@.Destination := assignLObj[1,row];. @; u k2 O2 Y4 x+ z' G5 p
end;
( e' _7 a0 M# ^2 b newDirection(@);
( I$ ]6 o3 F/ z4 D+ C @.HasOrder := true;. H+ D0 T1 d! V1 _- j
end;
; z4 S+ s7 _& x. C6 I9 V end;7 f6 |- Z3 O6 a5 R1 I6 G
end; -- of the method
+ m( u6 w+ L( G( I |