/* called by: entrance ctrl of the object 'track'+ v0 F3 i$ F' M% ~9 C7 q
*/
$ @3 t+ d% A" Z. }0 X* {! wis
5 U5 ]5 _6 ?& J# t. K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. A, x. Z7 ^- F! w7 O* udo! k" {0 i a |
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 A& ]4 a- h, x1 o$ i8 D1 `! T0 T/ D if current = @.Destination -- else return' X( ]- |5 k1 @" Q4 l+ A
then. j( Y! `( X6 K" J& v9 {1 x5 z
@.Destination := void;
- L9 w Y9 |. I9 k4 A4 `) t3 H1 i7 M if @.occupied then
1 {; @7 `$ c' {( {* v* Y part := @.cont;. ^- }) Q7 P. N8 e& ` z
@.transpOrder := void;+ k2 Y* |# x4 |0 L% i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G0 ~7 [- e( E4 I
@,root.eventcontroller.simTime);6 |; f/ o4 \: Y e
@.HasOrder := false;
# E- a! y7 d- J @.DrivingHome := true;9 S) }/ X+ q9 y" T5 d) C" x
rgManager.tryToStartTransOrder;
% s1 q/ C l9 B D# V3 R# ~$ Z. L if @.Destination = void
9 f$ b$ J9 Y2 b/ p& j: ^ then -- no transport order for vehicle @
# }* ~2 Y& z* Y9 C3 p9 G @.Destination :=7 B0 T# b/ F' n4 [
rgManager.nearestFreeStation(@,track.~);
: K3 ]6 G( n! v newDirection(@);
! \* Q7 l1 r, R; E if @.Destination /= void then0 _ y: `$ g, |7 [1 p6 @
@.Destination.NumReservation :=
- O1 ~% C" u0 L) Y @.Destination.NumReservation + 1;
% r1 x, v6 h9 O+ K: L* t/ G/ ^ end;
7 d+ H: C, u" g @.CurrIcon := "drivingHome";
2 ?- p& h. V. k4 l! U @.DrivingHome := true;8 X* V3 F6 P! `4 W& L
end;3 u2 U: m4 y, @' L$ r1 C& G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, {# A9 L. u( Z5 z; l* P. J
part := @.transpOrder;, ?' f8 B- q. }8 ]
part.move(@);-- load part* G3 i& `* k# r" A" g
@.CurrIcon := "load";5 d) u' j1 d4 I8 q3 b. f; h3 h
GlobalDistObj := part.globDestination;
6 t+ W. {3 k7 b5 k assignLObj := rgmanager.rgAssignL;
; m7 u* L! C+ r5 l; C' i7 @( J row := assignLObj.getRowNo(GlobalDistObj);
s' m Y* Y' ^" Q' E7 c if Row = -1 then -- since 70% q9 e6 p* Q& q8 t& ]- Z2 I
if lan=1 then! ~) `6 Q, O+ H' U9 b: J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% [/ R# \2 h- a2 V t! W to_str("in der Andockstation: \"",?.~.name,"\""));
% u5 \2 R9 T" ~; H- Q else
$ D" R! P! K3 T1 B. e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ o; M$ i; _) i4 B3 u$ h to_str("in docking station: \"",?.~.name,"\"")); " F" c% y4 R) {, |3 o
end;
% }) v' b B4 n else# i7 Z1 z( }# W; }8 d% Y) C! w& D
@.Destination := assignLObj[1,row];
4 y+ U+ J1 F& Y4 G1 G* t v end; ) D% z3 z6 a9 Z) }* d4 s* c( A% A
newDirection(@); f, \7 ~+ Q4 u/ `9 ^
@.HasOrder := true;
; } u; H9 |6 ?2 t. f0 c end;$ t; X1 \$ w4 D8 W- X% y* h
end;
3 J; ^, u4 B7 q* @end; -- of the method
9 t" F, b, Q. a- B* d, F |