/* called by: entrance ctrl of the object 'track'
2 k3 A% w, {& ~: T! b- U5 b5 |*/% [1 ?& m ^, ~2 B6 P$ h3 y' F
is
' J( v6 f# A f( w, I1 E9 b) s part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 V6 a) q2 |2 l3 H& w2 B6 H: q0 Y
do5 _: C$ j7 q( A* }
Lan := rootfolder.Internal.Tools.AOLlanguage;! J; [. y+ E/ H! i6 u
if current = @.Destination -- else return
0 j: I' c' M7 B0 H) S$ e then
: U; D* l& @: X4 g" b7 l$ |3 `; o @.Destination := void;
# C3 S- w" p# s8 p- V3 S& H4 n if @.occupied then& D, U7 i: |0 x& B @0 b% K2 {
part := @.cont;
' l, b3 @8 W9 K' i% X, L @.transpOrder := void;" U$ w5 t6 [" o; C5 f& g1 `* f1 c4 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 A7 H. h; W4 h
@,root.eventcontroller.simTime);% m$ P5 F. G6 Q; |4 i
@.HasOrder := false;
) K0 S6 Y" @4 j/ A# `' J7 s; D @.DrivingHome := true;
; L; L% O9 f( ~ rgManager.tryToStartTransOrder;' h! ^0 @/ R& [
if @.Destination = void
/ h t7 g$ K2 S# y# v% ~ t then -- no transport order for vehicle @
8 @* V' ~7 ]# }# o/ v, w @.Destination :=4 Z! y: i9 U0 V+ {( o! Q
rgManager.nearestFreeStation(@,track.~);
: B/ ^2 ?% d F4 T" T newDirection(@); % g3 V5 ~+ B) x7 u' I7 D
if @.Destination /= void then% ^: {! f# k0 D5 m. K, t4 f
@.Destination.NumReservation :=$ m( V3 G$ q, H/ F! h
@.Destination.NumReservation + 1;
- v0 d+ L1 }) Z9 c* U, G) _ end;" N4 { d7 F( s0 n
@.CurrIcon := "drivingHome";
. [$ K. d$ m9 K* w! {1 I @.DrivingHome := true;4 x5 ]) u& ~* [( i: D3 a& M5 u
end; Z& h6 u( [) h0 l2 ^- y) \1 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
E. x1 r! `, W: E# I0 \# ~+ w part := @.transpOrder;+ b6 G' W- e+ q) M
part.move(@);-- load part, N" S* _' E9 O4 {* P6 w
@.CurrIcon := "load";
" n9 i$ H q( q% x" i GlobalDistObj := part.globDestination;
0 E, z" n2 p9 k* h assignLObj := rgmanager.rgAssignL;
i) Y! _; k+ r* W: n row := assignLObj.getRowNo(GlobalDistObj);8 I1 e R6 B9 m7 H% {; O
if Row = -1 then -- since 70
0 l1 W+ v# E5 d! k if lan=1 then( M9 P) u! a9 s. f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% O" q; m7 a, y1 w6 N) N8 q to_str("in der Andockstation: \"",?.~.name,"\""));* e7 u% }9 ~- k
else; |3 H& m$ S5 |2 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) Z5 D* ?6 _1 W: B8 |7 z, m8 b
to_str("in docking station: \"",?.~.name,"\""));
# U0 F% V5 e+ y end;
8 s' _' M- b) S else `0 z5 R! D8 x L8 C, w6 u. p1 y" \
@.Destination := assignLObj[1,row];- e" u, V( u4 I/ q3 p6 w
end;
$ h, ?, e& `& a$ J M newDirection(@);, ?$ W2 V7 X1 h j4 p G
@.HasOrder := true;
3 `8 C( K' S3 V x0 ^ end;: s( i- n. ^# N
end;6 H7 I. M1 e5 e1 L7 V3 |
end; -- of the method, x. t3 ?: c5 X3 n9 s# K
|