/* called by: entrance ctrl of the object 'track'
a* M7 G' W) K ?*/
8 r% ]& k" t b) ^is
8 N$ [9 Y7 B! }2 S3 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- ? n; O+ n' [6 Z; xdo. s. N- N9 k |
Lan := rootfolder.Internal.Tools.AOLlanguage;
" G" k7 H: h) W9 T/ S if current = @.Destination -- else return1 N# i6 K% J# O L0 b
then/ A# f z8 V* N6 M
@.Destination := void;
# A! k1 l: Y2 f8 n/ Y if @.occupied then
* r& k* O6 F- ~ part := @.cont;
" I ^* e2 p! v, F @.transpOrder := void;
. h, P9 q! \0 I4 M0 N% c1 ` @5 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& j, N% W/ G S/ D @,root.eventcontroller.simTime);
9 l6 u* Z# E. S5 t j @.HasOrder := false;# T; I" Q3 I: `9 g' n5 ~" F
@.DrivingHome := true;% r2 y8 M, L0 F1 {# e
rgManager.tryToStartTransOrder;
' D; c, I5 R5 V( U+ i2 h! D; D if @.Destination = void$ A8 n1 J3 |: j6 H
then -- no transport order for vehicle @
4 q5 R J+ d3 S; G" E+ d) F* h0 Q @.Destination :=
( z0 t8 v- z* g+ }3 Z: C rgManager.nearestFreeStation(@,track.~);
# _" Z) e0 y2 Y: N newDirection(@);
. u8 J S# I% w4 \ if @.Destination /= void then
; V. a, w1 i% L( d @.Destination.NumReservation :=
6 B* W: S# d/ s0 B @.Destination.NumReservation + 1; r& l3 v: s( \/ f
end;
3 T5 F6 h8 f$ m9 D- F @.CurrIcon := "drivingHome";* _; A1 ?1 N: g' T P7 w
@.DrivingHome := true;" K4 e- N' d; c' z- ^& Z. s
end;: ~" z! K9 n! J% o9 y9 \* N I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 y- e6 X) T% a6 X0 z
part := @.transpOrder;1 s5 u. l! y) D% e$ G$ Z
part.move(@);-- load part7 S5 @, [) F1 L' q8 j, Q& y
@.CurrIcon := "load";
" ^8 g Q& \/ i GlobalDistObj := part.globDestination;' g9 }/ ]4 Z8 w Z1 I
assignLObj := rgmanager.rgAssignL;
& |1 h6 ?4 z) E row := assignLObj.getRowNo(GlobalDistObj);
, G- R2 f/ @9 J' W) L+ q if Row = -1 then -- since 702 H- T4 R3 b- u. N7 D
if lan=1 then
7 A8 R# K+ G6 ], t9 U$ X- ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ B& x& _0 I* _1 \6 n0 g# p to_str("in der Andockstation: \"",?.~.name,"\""));
5 p6 z- F" d; c. C/ k9 r else
0 c* S: x9 P8 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 t" G+ s) J: h( S* j& T$ F# p F0 x to_str("in docking station: \"",?.~.name,"\""));
! L: n; J0 k4 G" p& ] end;
4 ?, T+ ], C6 l+ j: M else" I4 y/ S: ]& k- v7 d
@.Destination := assignLObj[1,row];. ~6 \, P- e( _2 c0 s& @
end; : c+ C+ m; ^, w1 Q
newDirection(@);6 K2 {; Z2 C- ^3 N6 Z- b
@.HasOrder := true;
: x- v1 D w. [5 z" v end;% F- ]; m& L) d' V& v
end;
" G* ]% D* Q. L7 v! ~end; -- of the method
( ^$ k; D( N/ ^! `0 ^% Q4 n( e |