/* called by: entrance ctrl of the object 'track'
9 U4 v6 A X7 M1 E*/' ~( a: l% I* S& u2 `& \/ Q1 w
is, S$ o8 b2 ]9 w. F7 C ]( k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 w) s. W& I) b# b7 r, A( ?do; I+ ~+ _8 g# G3 s4 |
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 d. ^; ]+ b6 C" s7 j+ j if current = @.Destination -- else return5 B7 ?) X+ T" r( J0 h8 @
then
2 {& ?0 V: d2 k/ b9 Y! A* o% m6 L @.Destination := void;
$ x2 n' d' [$ S" ]4 {: O h w$ i0 I if @.occupied then
R( n) d0 R7 `2 o: O2 a$ M( A part := @.cont;9 b: m* X" d" I# |
@.transpOrder := void;
& G3 M! K1 b. M$ P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 I( l* U' \7 s( I4 i @,root.eventcontroller.simTime);" }4 v$ C( t+ j$ _8 o& _, G; k" c
@.HasOrder := false;- ? O9 F3 I+ g/ D
@.DrivingHome := true;
. q1 K& {9 c; {. G/ P rgManager.tryToStartTransOrder;
, O* n- I- @" Q! \2 X* L if @.Destination = void
, f" Q; F4 g/ E7 @8 k* \ then -- no transport order for vehicle @
4 ~- q7 y5 k" q7 c @.Destination :=! ^) Y m# h+ f/ z: M
rgManager.nearestFreeStation(@,track.~);
/ i4 D0 }% o$ E0 W& n( a: P newDirection(@);
, ^/ U, x' [+ S1 a if @.Destination /= void then4 W! B# o5 ~7 N$ S) E
@.Destination.NumReservation :=5 y& `- p8 \: D+ E
@.Destination.NumReservation + 1;
4 }. Q8 z' [. F: N! B2 q3 _ end;& J/ ~8 M4 c# ~1 G
@.CurrIcon := "drivingHome";
* V6 d7 b5 m/ W G, l @.DrivingHome := true;
" }+ }! ]* w5 J. j# ~$ [# k9 Q: f# T end;# y8 n& z. Y& }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: t$ s1 ^7 a1 V; h7 s9 l! |
part := @.transpOrder;
8 ~. U+ S; t1 w$ f$ Z5 ? part.move(@);-- load part" l6 r, l# s5 f. F- e3 W* @+ F4 D+ ^
@.CurrIcon := "load";
( U3 _4 ?+ Z! B: K) S GlobalDistObj := part.globDestination;
) s9 x- x# [8 m( ` assignLObj := rgmanager.rgAssignL;
- Z- {1 P' h" {" Q& f row := assignLObj.getRowNo(GlobalDistObj);
^' L- ^0 j) I. U) e3 v) X- A if Row = -1 then -- since 70' ^8 {; h' S% T
if lan=1 then
: a# w- ~9 y1 T$ ]& P/ u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 e0 q% Q4 b/ X( S% e& Q4 n8 v6 z to_str("in der Andockstation: \"",?.~.name,"\""));3 Y; v. M; b& t" y5 `/ b7 \7 m0 C
else! p& Z* x% e( c% W5 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 L: M4 c! o$ C. n9 I
to_str("in docking station: \"",?.~.name,"\""));
! }; o) s/ v( b end;
0 H; v" f2 W) v% Z1 O0 g1 ]* L else# i% a7 C8 }, Z
@.Destination := assignLObj[1,row];
2 Z0 z% A. }# k. y% C" v7 @ end; ; F+ E5 H4 e7 t' k
newDirection(@);
" J' M6 L8 D* i3 d0 | @.HasOrder := true;! N9 b! g; m& V) n0 O) X
end;
) `" Y, L% z( |4 J6 | end;
9 A- P$ F: L% R4 Pend; -- of the method8 z) x9 g" g# d) r7 O/ q! D
|