/* called by: entrance ctrl of the object 'track'+ v' z' `' U1 R/ E5 z1 B* G
*/
9 B8 @; z6 m5 {* @! T! cis+ X4 L# n6 W0 I2 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" H) h# @& B! A$ B% @. M2 {# ?5 Pdo
$ C P$ }. _, ?- F( B# x$ `5 g2 [( j Lan := rootfolder.Internal.Tools.AOLlanguage;
- |2 H. ~. c* z if current = @.Destination -- else return
; X; L u$ h( z6 f6 p9 ^( p" d then% ]" h. N$ P2 T. I
@.Destination := void;5 l. O6 d4 l3 p; b* g3 G! l( a
if @.occupied then
- \+ }, n$ `; \% s part := @.cont;
1 `! l7 s9 ]+ ^2 z/ \0 B* ^: b @.transpOrder := void;- E* L) \8 a5 X$ j) w) [, P. C/ g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 q8 k8 h2 |6 P' c* Z @,root.eventcontroller.simTime);. E t) K" c6 x/ J
@.HasOrder := false;
' J. C# s+ b* J1 O& c @.DrivingHome := true;
- y- p' W, Q3 ?1 Y$ g rgManager.tryToStartTransOrder;
) r3 b& i2 T4 t5 y if @.Destination = void& c3 U m$ D* F6 @& l# [9 O# L. n
then -- no transport order for vehicle @
2 u7 O: X1 ~/ I; V @.Destination :=
7 y+ e, B3 i' g rgManager.nearestFreeStation(@,track.~);
& u# s& \8 U- H x: _ newDirection(@); 8 i+ u1 W) ?) F+ Y
if @.Destination /= void then8 k) E6 B" o6 d. N) |) \
@.Destination.NumReservation :=
9 ~4 }% d# ]4 `% `5 T @.Destination.NumReservation + 1;
) a& |2 |, `, t0 v3 j& g( \ end;
' p4 n. t2 w- V7 {5 ~" | @.CurrIcon := "drivingHome";
4 `3 i* q+ L2 b, L; i1 C @.DrivingHome := true;
1 r, Y9 e4 a1 J) C6 Z7 E end;
8 B5 Q& W8 C6 o/ a! s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g/ G" P$ x6 m' n! X part := @.transpOrder;* O+ U8 k( R7 M& T9 ?& v
part.move(@);-- load part: w; ~9 g% F) c. l/ s8 L
@.CurrIcon := "load";
$ B: p ?8 l0 V9 T! u4 X GlobalDistObj := part.globDestination;! J. N' a/ |2 S: i7 I* ~( o
assignLObj := rgmanager.rgAssignL;% M Y* d+ t: o& L
row := assignLObj.getRowNo(GlobalDistObj);
5 c* x( ]7 Y1 H( o9 M3 J- ]) y if Row = -1 then -- since 70
# M9 F* T! V8 j4 j0 I6 t2 K# | if lan=1 then6 T5 u2 s9 ~" w1 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& k0 I" m3 i0 N7 K& u" |8 s: q
to_str("in der Andockstation: \"",?.~.name,"\""));* T2 }- E4 u4 B+ m# O. `5 l
else
5 L' J# f- I# _9 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), c4 ?' q* V2 x! K- K% @6 \4 Z1 V
to_str("in docking station: \"",?.~.name,"\"")); 4 D) G% l# S8 w: ^% b! S+ e4 H
end;
y! G0 }' l4 J0 l0 k, P else
3 O" N$ t k: V @.Destination := assignLObj[1,row];& t/ Y" ]5 x2 j
end;
9 M! W9 F/ q6 [4 j3 i' K+ L newDirection(@);
Z& K8 e6 D$ t( O: w @.HasOrder := true;6 S0 P+ D& D) N/ S8 o9 a
end;. _ r4 w; b4 ]. ?6 M( f
end;
9 d/ k# b& ~) u3 g3 ^, ]# g) ]6 Dend; -- of the method! |, W( l5 c: Z# U {$ ?
|