/* called by: entrance ctrl of the object 'track'
4 p% {6 m4 a8 v*/
# X8 c) {4 H5 Q/ Jis) {. U3 X3 v% G1 a r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! U) c* N/ N# Y& r/ Kdo' m' z# [6 S- I; n& Y8 Y* L
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 ?& |( y) o: k7 f1 @ if current = @.Destination -- else return7 H: |/ ^" R# x z3 T- M! J9 Z# S
then
* f1 M3 ?: n( X @.Destination := void;
9 \3 b4 C1 Z( J$ p- c# A if @.occupied then
: J7 A1 v/ G+ ^( v part := @.cont;0 D0 C1 t$ `' I8 j J, B( q+ z* O
@.transpOrder := void;
9 P+ X$ F0 I8 l$ Q' N# B0 _ S% i/ R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 r% m1 g" s. X* c3 W l( b @,root.eventcontroller.simTime);. i- g/ E* j/ z' @3 _6 B& N" H) D
@.HasOrder := false;$ ]) }+ V# B+ ?
@.DrivingHome := true;
; {% [- n" e8 }5 c5 V! l rgManager.tryToStartTransOrder;" ^1 M* e0 x' @( T
if @.Destination = void
`' y7 z1 E2 J. T3 s+ X6 @ then -- no transport order for vehicle @
5 N4 n6 N$ [! l @.Destination :=
; u9 }* p ^7 \; l rgManager.nearestFreeStation(@,track.~);5 ?5 }9 [1 Z# n6 Z) K# L( {: h7 q
newDirection(@);
4 X) J7 w( Z6 f1 Q- m: ~ if @.Destination /= void then( f: [2 p- d- s! P, \
@.Destination.NumReservation :=; T2 Q a1 z C6 H
@.Destination.NumReservation + 1;" `% E, ?: c* z- D
end;
% o7 A; {* q$ |) C }% ` @.CurrIcon := "drivingHome";
1 S- }) \5 `6 P8 [* e7 p; Q; o: Y @.DrivingHome := true;
* S4 e: M5 E3 ~- X3 ~) I end;
$ L0 N( ~$ ^2 s1 s: I6 J7 j- g else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 b# y5 J6 |: n6 m
part := @.transpOrder;
, \" U" M& m9 H part.move(@);-- load part
6 W8 a# r$ R9 V+ I' c, w; ^ @.CurrIcon := "load";6 ~8 L3 @- I$ t, S& K
GlobalDistObj := part.globDestination;
$ k8 F7 ?% P$ b assignLObj := rgmanager.rgAssignL;
3 ?( { G C5 q- m- i5 Q! o! E row := assignLObj.getRowNo(GlobalDistObj);
- X; f( q; l: p- u( P if Row = -1 then -- since 708 n$ i* X5 l# r6 r4 O, Q# Y
if lan=1 then3 b' P% E* }" Q( ~# P6 N0 M7 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& P1 w. t! c# }* j5 e* Z- a4 T% z
to_str("in der Andockstation: \"",?.~.name,"\""));, n3 l. a. E, j
else
4 z3 ^7 T! q- b6 V, r: Z. ]0 F) [5 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) \2 s2 @+ f7 q1 E6 u( J to_str("in docking station: \"",?.~.name,"\""));
, o6 k9 A; m. d6 R: L end;
; [, _1 c7 V2 l else
3 w+ ~) _7 A# }$ b6 M$ ~ @.Destination := assignLObj[1,row];. w1 s4 h' O9 k: O
end;
4 [5 A. n' g4 z; b newDirection(@);
8 ~% H, \, f. |5 ]7 u @.HasOrder := true;
1 e' v8 f: Q, g2 A: K* X) n' u end;
! J" R: N; Q' F& a) t- l' P end;
7 e ~6 w3 V% k4 m& W8 Lend; -- of the method8 d/ Y8 C9 L4 l; F
|