/* called by: entrance ctrl of the object 'track'
8 C' @. u0 ? g& a4 ^: l; _*/
- m. Z. u, Y# e& c) P9 Wis( i: Q3 o6 _7 ], ]/ U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [/ O1 D+ M! c" o0 a- {do) f' L% H& F# w9 G j6 q& L
Lan := rootfolder.Internal.Tools.AOLlanguage;9 T+ \" @' W/ i1 R/ r5 X. @
if current = @.Destination -- else return4 d _" X: V O. V/ Y5 J
then
5 z( c& j& J" Q7 F @.Destination := void;
+ ^, d; X2 r, e( Z if @.occupied then
: }; C1 W' g- u( @ part := @.cont;$ h* }% k/ U5 `% n8 ? ?/ s
@.transpOrder := void;% l$ {, b' w5 }+ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ T! e) J2 f; ]2 [7 X. P; D* D @,root.eventcontroller.simTime);, x2 s9 d. I: M& @. r# i
@.HasOrder := false;. o+ |# q! F# y( m/ @1 |, Z
@.DrivingHome := true;8 |: A9 W h" H( D
rgManager.tryToStartTransOrder;
- N, Q- k* f) W0 [ if @.Destination = void
: \7 A& E* F# e1 c! Z; P& C then -- no transport order for vehicle @8 A% I2 j5 w8 B5 }
@.Destination :=
u; ^2 l' \2 a ` rgManager.nearestFreeStation(@,track.~);
) \4 j J2 D( }* O: \2 S newDirection(@); 3 E% C+ W# q4 F! ?
if @.Destination /= void then
, ?1 C' E c7 ^, c- d8 w @.Destination.NumReservation :=) D" R& ?' l, @8 R
@.Destination.NumReservation + 1;& f1 i3 z9 B# A0 k" N5 \. w
end;
( c, e+ l A7 D @.CurrIcon := "drivingHome";9 a7 e8 {' w, X& h# c! A. T# O, X+ ^. J
@.DrivingHome := true;
. D( k2 C; W0 A) v end;& }0 ~* t$ X6 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e% }3 S0 B& Q* `0 e part := @.transpOrder;
9 I4 Y6 Q3 h+ U* A% h1 I part.move(@);-- load part# {- W% U7 m8 L5 L$ W
@.CurrIcon := "load";
- v5 H& g+ K0 R" V+ T( j8 |/ q GlobalDistObj := part.globDestination;7 }6 E$ y5 T9 x2 P6 ]
assignLObj := rgmanager.rgAssignL;6 n% r T K9 t, E. M
row := assignLObj.getRowNo(GlobalDistObj);3 q9 |, R# ^- p" ^$ T6 f% d
if Row = -1 then -- since 70
2 d1 v2 x6 i0 F4 L' } if lan=1 then
3 W; m8 H, e6 c3 q8 W, J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 @/ b. R ?- O! o3 t7 R5 l6 k% } to_str("in der Andockstation: \"",?.~.name,"\""));
5 y' w' U. n. O9 I* G+ ^! P else
2 s* D) }# S+ K; C$ C" f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ?9 y R9 `4 V2 l! m
to_str("in docking station: \"",?.~.name,"\""));
7 |7 p: e! M' E* X end;4 G5 d2 d# e) }
else; Q9 `5 @1 G% g- _6 c
@.Destination := assignLObj[1,row];0 D1 X1 u) I. p9 b; R
end; 4 j) n; O5 q/ I' z, W7 K
newDirection(@);8 `4 u+ m7 r6 _0 @, R1 h6 |
@.HasOrder := true; c8 y/ c) Z# D7 v) C! x
end;2 g$ n: I$ }5 O$ v7 D4 p3 `# }8 \
end;0 Y5 ~! b2 B! T; n) u9 y2 r* W: B
end; -- of the method
* l! i5 H# J; L/ z$ u% g9 f |