/* called by: entrance ctrl of the object 'track'
: [9 Y( H$ |# |7 A) o*/% k6 i6 T3 [% \* A+ E* k
is
9 \, N7 n8 N' O' q x' ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 u- y( U5 f7 K9 o1 X4 X- Ido+ R/ O) M# R! P( H o" Q3 }! ]" X' o# v4 ^; U
Lan := rootfolder.Internal.Tools.AOLlanguage;
- a+ o C; N0 c! C/ D if current = @.Destination -- else return
2 w9 {* L9 _: P: `2 i1 P then% s. i& y# Q) @- i6 t
@.Destination := void;( p0 F x2 ^8 Z0 X
if @.occupied then
5 m. R4 c; l: I part := @.cont;
$ l0 c" _* a* @2 B' D5 G5 I @.transpOrder := void;" x& G& A$ x/ g* {( T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 P+ Z; e s2 o: w# G8 _ @,root.eventcontroller.simTime);
7 h) \* ?+ \5 g: L @.HasOrder := false;) H, g6 o1 T, W9 e" G8 e; G0 K
@.DrivingHome := true;
! x' i, [& `& ^, N6 c" H8 m! S rgManager.tryToStartTransOrder;( R! q3 M4 {# [, v
if @.Destination = void' w( p# G& }; G2 F# y3 A
then -- no transport order for vehicle @
* V, E& ~% K) F @.Destination := |9 v* z) t) N. f" x. P7 C
rgManager.nearestFreeStation(@,track.~);
) \5 @, M+ `( w newDirection(@);
$ t* w" S5 b& R! T- J+ T if @.Destination /= void then0 C4 `3 u9 ?! @2 s
@.Destination.NumReservation :=- g: C! O6 z9 ~2 z
@.Destination.NumReservation + 1;
) V9 r9 S4 o/ e) ^* k end;6 s2 d2 z- _& y+ W5 x) e
@.CurrIcon := "drivingHome";
1 h9 u! [( A/ s; Q @.DrivingHome := true;! }' y4 z1 P: {4 P0 Y
end;
0 b9 c5 {& ?- K- F U* X9 i) f else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 t0 \# [: F& w6 x5 X
part := @.transpOrder;
# b1 \" X* d5 |. x6 k8 m: k part.move(@);-- load part
5 ~+ u6 _ h% `# a' n1 x: G @.CurrIcon := "load";
# ]* _" U1 g5 ^' x+ s+ X( x GlobalDistObj := part.globDestination;! _7 f8 L& b H4 A
assignLObj := rgmanager.rgAssignL;
( n" u+ e- S6 z row := assignLObj.getRowNo(GlobalDistObj);
& I& [3 P2 j# i3 Y5 s% \% Q6 [ if Row = -1 then -- since 70
. X9 _4 L/ e; M$ R if lan=1 then x" T! }& c5 l5 U% D4 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 S' _1 W% w+ R6 C3 _: }. B3 k7 R! y
to_str("in der Andockstation: \"",?.~.name,"\""));
7 V, K; ]" J; H else
L# L) Q+ j: R8 [2 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 [) L1 Z( C* _& U0 Z3 e* g2 N
to_str("in docking station: \"",?.~.name,"\""));
. E6 T7 S+ l! G+ r1 I& M4 ?* o end;$ l" Y: \: `: {$ q7 n/ S. l
else0 i2 g. |+ |- A7 l7 S+ d9 e. i9 m$ q
@.Destination := assignLObj[1,row];
/ i& p9 k6 v! }1 |2 L2 c. S end; 9 i: x% D3 w* K& z" M
newDirection(@); k6 q1 Y X9 e2 ]6 ^0 b8 }
@.HasOrder := true;
1 K( J& k% F: P* t7 W) k end;. K7 }9 Q z' k5 v
end;
% c! {; g8 H; O' aend; -- of the method
$ r$ {1 O2 r( ~& U" r |