/* called by: entrance ctrl of the object 'track'
+ T3 F* s9 V9 E+ ?0 ~, r! y' f*/
* j* [$ p! W8 S [! |is) X' o7 h* I7 J( E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 u2 ~- a" z$ zdo
' }; R8 |0 c' Q' p/ `' t Lan := rootfolder.Internal.Tools.AOLlanguage;
5 A; C- u4 {* F if current = @.Destination -- else return* L- [) N3 e% r% J2 w
then
" a' J' w7 ]8 H5 A$ X4 _ @.Destination := void;3 [! K3 c3 V4 b. o) F$ ?$ c6 y% g
if @.occupied then5 L" ~0 v8 _6 ?% t- j
part := @.cont;
" a, }* O& m/ x/ \3 k, ] @.transpOrder := void;
Q+ ?7 O& ?* y, @) r w! A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ Y! U0 `3 U, G+ q2 S
@,root.eventcontroller.simTime);
: U: q6 y, W: H m4 f. [ @.HasOrder := false;4 ]) q( e% k, M
@.DrivingHome := true;
4 j8 N3 E6 S1 m2 c& E rgManager.tryToStartTransOrder;
5 [0 B4 I6 m+ M' m% F if @.Destination = void
4 h5 ?' ~0 @0 K$ q/ t" l" r then -- no transport order for vehicle @9 G: s! ^* L# t% c4 h& c
@.Destination :=
N) k% @$ C# r8 X rgManager.nearestFreeStation(@,track.~);7 [" x1 h( G# R q
newDirection(@); 7 P0 {/ S. B9 y9 k) k8 t3 [6 {, o
if @.Destination /= void then6 c3 U! \% n% C
@.Destination.NumReservation :=2 Q; F7 g7 p; h) r5 B& Y
@.Destination.NumReservation + 1;# V/ t' g5 F0 f* p& [
end;' `- o9 G! L# y2 m9 m; K) q
@.CurrIcon := "drivingHome";+ c" [8 \/ O2 l8 ?- B" Q- l# E
@.DrivingHome := true;
) _/ I9 f$ a$ L( _* |6 j2 q5 }6 ? end;, n, T' L3 p" Z0 o: Q2 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Y# S9 }& h6 ^+ g3 u5 [
part := @.transpOrder;
, L1 M& ^4 X4 B3 q4 M7 [# l part.move(@);-- load part
6 g) B; m# D. A: H. X @.CurrIcon := "load";
+ m" i1 A# G( u8 C1 _# Y. M GlobalDistObj := part.globDestination;/ J5 [/ ^- {" N- T7 q
assignLObj := rgmanager.rgAssignL;
! y$ v' @0 X4 {# }! { row := assignLObj.getRowNo(GlobalDistObj);
& n9 t6 v7 s, m3 X if Row = -1 then -- since 707 W5 G! c' u& O& ]* J5 {
if lan=1 then
+ h/ d3 i( ]9 D6 M1 t `) v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 T8 X1 ]4 G# y2 [
to_str("in der Andockstation: \"",?.~.name,"\""));
& ?/ q( n4 k" v7 P0 p2 I0 l& u h else w2 |. A0 U+ V' P d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ |/ r3 `$ V: _+ p, P* S3 { to_str("in docking station: \"",?.~.name,"\""));
1 z: D! r2 H. x. q4 S end;9 N2 [* k& i5 z3 W
else
1 B& D% N; \$ H4 U# P% _0 Y0 V @.Destination := assignLObj[1,row];/ {8 ^. }2 j8 L2 L$ H! n) Z
end; : [- t: b0 p3 V# h h
newDirection(@);( R3 b, | s# ~2 X4 f! D; I5 N) b1 |
@.HasOrder := true;
- r! F+ G2 h3 ?, [ end;
0 f) v1 p( r% Q8 F# \( J end;
8 E: r) M' e4 }- xend; -- of the method
, y# B: V* W Y% ] |