/* called by: entrance ctrl of the object 'track'
9 G; n) ]. y! {3 o( l*/
6 u" d6 j; \% U' K' his: A% x! U- z) U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! I; u% B9 k8 o. d4 q/ `do8 \. v- g2 t) k! E0 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ b# H% @% r7 q0 @5 K( L5 \) F! L if current = @.Destination -- else return& |1 s$ ?! Z# W. k0 h, T6 ?$ {
then
) `$ M9 ~: D* R9 ? @.Destination := void;
4 [9 ?' I4 b5 O; F if @.occupied then( R0 a6 ^9 m/ d9 `0 L
part := @.cont;
6 D+ [* E* j6 \ D3 l: w @.transpOrder := void;
9 ^$ J; T: t8 r7 O( R- ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& Y6 `% b) N0 x# F
@,root.eventcontroller.simTime);: S1 P2 f( m% L# M! W+ m
@.HasOrder := false;( _/ q, d g/ R7 R
@.DrivingHome := true;1 l2 @( e6 B+ X. G
rgManager.tryToStartTransOrder;
7 J! \5 D7 s( K4 y if @.Destination = void. P* h& U) Q( O) l0 O
then -- no transport order for vehicle @
" w. d( R4 f, Z, ^: G0 N7 ] @.Destination :=9 Q. ]- M* M. c/ J
rgManager.nearestFreeStation(@,track.~);! n4 m8 N! D) z2 @7 U$ `) H2 v
newDirection(@); : B2 Q" `4 U& U
if @.Destination /= void then, ^9 L, \/ |9 P V7 Z) o* w
@.Destination.NumReservation :=
, X4 ]" R8 m% c/ _+ V @.Destination.NumReservation + 1;
3 ~ n. k8 i6 p/ a1 ^ end;
4 L1 k: j1 g- e5 u$ \) A @.CurrIcon := "drivingHome";( R* V: M: @/ a, V/ D& n' }- k
@.DrivingHome := true;
$ w# g7 }) S6 c# Y$ z8 z end;( ?/ L$ e) z. d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d+ v- S% X( C* c4 a part := @.transpOrder;
' x! [* V+ y+ L0 s; }9 u1 N# O part.move(@);-- load part$ O. c, n. k& p
@.CurrIcon := "load";0 k! `' A1 n6 Y) s( @ o' S
GlobalDistObj := part.globDestination;9 n; y9 L# t! T6 F" U
assignLObj := rgmanager.rgAssignL;( q. R- y Q9 U
row := assignLObj.getRowNo(GlobalDistObj);1 r0 I% H5 S" h* [
if Row = -1 then -- since 70$ M: H& C' ?* e4 d3 ]
if lan=1 then3 ^0 L7 U; H5 Q" @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 b; h4 }# ?& Z to_str("in der Andockstation: \"",?.~.name,"\""));
9 N4 f. W! w8 ~+ t else5 s1 c g' c6 B1 ?* I( |" S! e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( b2 n$ `* L. Z3 s0 I$ Y, v1 ^
to_str("in docking station: \"",?.~.name,"\""));
* j: n3 l$ s) v. b6 W! }4 |8 r/ R end;
1 f( a1 T' B1 ]0 } else X6 m1 E# i) [+ W8 x$ s
@.Destination := assignLObj[1,row];
' g5 n4 F2 v5 q2 [- N$ E; Q end;
/ H6 }9 E, |+ m1 E) m newDirection(@);) D+ N& e% A9 E7 ]9 a% F
@.HasOrder := true;0 R9 F6 S" p5 F3 c7 b% N
end;
2 E$ P( l+ ^" ?. J, @$ }. V end;
3 [( K2 P p# x# uend; -- of the method
" Q9 }: j/ c' j2 O$ j/ f% G& g# \4 u" x |