/* called by: entrance ctrl of the object 'track'0 k. X" [+ j4 s) g
*/
* T+ \: V2 f3 G9 m& f1 fis* b& @$ z- J- G. E1 r5 A3 I. a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& Q. }2 u8 U- M3 v# j2 t2 m g
do
% J% G$ D) }/ h* X Lan := rootfolder.Internal.Tools.AOLlanguage;; x0 O K$ n* y
if current = @.Destination -- else return; F+ v' \6 I3 o9 {! K! P; ~$ q c
then% r( e# V, l( ~+ C. z H
@.Destination := void;
8 Q9 @3 ]5 X! v if @.occupied then
4 X+ Q4 s8 U7 q1 ^: T" {) r. n part := @.cont;
+ o8 V8 @4 w6 C8 D @.transpOrder := void;
8 s3 `3 n* `: c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& B2 t: A6 U N3 p( |/ P @,root.eventcontroller.simTime);
" p% {) |9 K4 A( I @.HasOrder := false;* C# E4 Y$ S9 y- x1 N# |
@.DrivingHome := true;' W' a$ G4 t: h9 i1 p
rgManager.tryToStartTransOrder;
) ]" |, W f8 K) B) q9 D if @.Destination = void
8 k) b4 W, ~8 ~. D" J6 F then -- no transport order for vehicle @+ w8 l6 E& X# E) C* k" d7 U
@.Destination :=
4 h7 D `$ T$ f" n( C rgManager.nearestFreeStation(@,track.~);
# _$ r3 P( q, l! \, K- `: d4 U# S newDirection(@);
' k/ z% Q) U0 E/ \ if @.Destination /= void then
4 L$ b3 x% J' ~! m w+ X6 j @.Destination.NumReservation :=9 G6 J, E- P5 u' Y0 y" P$ W
@.Destination.NumReservation + 1;
: ~0 u: X1 ^0 H* F+ P# g% R end;
- w: }; C# H% }9 c @.CurrIcon := "drivingHome";
9 W' a$ |4 m( U3 {' u2 }$ f/ j$ n2 l @.DrivingHome := true;
; u9 u1 A9 ?$ \! {/ d+ p3 { end;
! O& y# u9 }8 v5 m+ ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* q8 R; {' ] t1 n part := @.transpOrder;6 Q+ _9 J# `, v( y1 b
part.move(@);-- load part
9 d/ g" \ i! @& b @.CurrIcon := "load";7 K: t) ]* a: u1 n( |0 ~
GlobalDistObj := part.globDestination;) w8 _9 g# n2 n3 {1 e8 c- y
assignLObj := rgmanager.rgAssignL;' V3 ^4 |, I& I8 k5 t
row := assignLObj.getRowNo(GlobalDistObj);
3 T' m2 a* S2 c if Row = -1 then -- since 70
' V) T3 O, L' a$ n1 H if lan=1 then
$ U/ o1 J$ N* Z2 b4 C! F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 Z" z( m* T l' X to_str("in der Andockstation: \"",?.~.name,"\""));
) K. N. X1 V3 [# t( s else& W9 v, t# z, X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 u5 ^5 P9 c u& @1 d. j
to_str("in docking station: \"",?.~.name,"\"")); + z' A% ~7 {4 k
end;
& z1 O! `) Q1 y9 T else/ `+ O4 b a. Y l. i S# R; W4 }
@.Destination := assignLObj[1,row];) b& \7 k2 l( d" ]% Q1 X
end;
# h7 L4 v1 O; b+ V1 j' k) S newDirection(@);! J; Y1 ?+ r% h6 R/ N3 X( j. p7 w% A
@.HasOrder := true;& h/ L c1 t% O: |& T3 c9 v5 v& p0 M
end;! O9 R! ^6 w: T$ w3 ]) @0 i o
end;
$ U) _- u/ k4 c' y+ O8 p1 oend; -- of the method
& |) h6 }6 U7 H! X1 V O |