/* called by: entrance ctrl of the object 'track'
" x q. b' y+ m$ j8 F*/, F4 i0 s- g A4 U' E4 b
is9 ]& V1 `$ D/ |4 W Z- g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ S7 ^. h! n, f6 m0 ?6 udo
' j! I _# y9 O Lan := rootfolder.Internal.Tools.AOLlanguage;
; R' {7 F. _ ?' s/ x, v! f if current = @.Destination -- else return
, X8 k3 @6 n) G/ i. Z then; p* d2 `) Z8 Q! _; ^$ q
@.Destination := void;0 s" y3 H& Q; D; p( b; q
if @.occupied then5 }5 }* N( N4 }; J5 S6 v6 _9 |
part := @.cont;
; [; e2 q Y4 o: w$ X/ G @.transpOrder := void;; u2 C5 P! l9 B& v/ N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 }. O4 }+ @. Z @,root.eventcontroller.simTime);9 S2 S5 p$ `: N7 J) _
@.HasOrder := false;
4 e5 M7 { }' u7 c# c" t* @ @.DrivingHome := true;
4 B0 i5 V* _+ g: Y rgManager.tryToStartTransOrder;5 C5 n; a f4 a1 g2 \1 L( V
if @.Destination = void
* q: M5 p8 _0 @0 z0 Y' N then -- no transport order for vehicle @; _( G, t1 x5 |
@.Destination :=3 C$ H* Z8 N8 o* Q. G
rgManager.nearestFreeStation(@,track.~);
- W% a. H, t1 m" _% w newDirection(@); & h/ i, v% A6 X- \! t1 L
if @.Destination /= void then# c6 K# c! R# k7 a1 G! d9 o2 d6 z
@.Destination.NumReservation :=
5 m6 W: K. s+ r3 G4 ~1 y) W @.Destination.NumReservation + 1;! A/ B- P8 N9 f7 h
end;
* Q: J$ N+ l" [" @ @.CurrIcon := "drivingHome";# {5 j! e$ w# ?/ Z0 H, |( `
@.DrivingHome := true;# Q7 S" ?1 C7 [; K" \7 t0 W
end;
2 b8 l- @! U# n+ b z7 C0 q8 A( Q! C" D& m else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 r$ a7 y1 F% a
part := @.transpOrder;
) g* ^' J! B8 l4 L: d4 Z part.move(@);-- load part
& T) r3 k9 B+ Q- `& n! }; Z @.CurrIcon := "load";
7 I: Y' a' Q1 T GlobalDistObj := part.globDestination;
- g+ h! k8 ~0 o: {; |/ y( E+ Q, { assignLObj := rgmanager.rgAssignL;0 X7 i Q; M' }+ G. f
row := assignLObj.getRowNo(GlobalDistObj);" ]( y7 i; U# @$ o2 F" E& n! G
if Row = -1 then -- since 70
x) I3 Z3 ^! }6 z" h. R if lan=1 then
1 i4 C" A, f H m; z6 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* Z! g7 z0 ^! E- X) Q' f' t
to_str("in der Andockstation: \"",?.~.name,"\""));7 g, e# M8 q) N; r
else
- j, k7 r n8 b- \2 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' k$ I9 G1 z) q; V# a to_str("in docking station: \"",?.~.name,"\"")); % m; t+ y0 x Z6 C: D( J
end;
& K5 G3 V/ B4 @* Y0 E else! e0 w7 i1 L! T& H4 D
@.Destination := assignLObj[1,row];
% m9 I9 B% b/ j q end;
, C) x/ i6 m' M0 z4 u" y6 k newDirection(@);5 v* P. U3 F, L7 H
@.HasOrder := true;
; R) @! g' `9 {5 y) Q end;
4 e2 G" ]0 {) S; d+ _/ f. C end;
" a- V5 x! ~; R9 ~end; -- of the method
7 ^7 S; y5 X1 _5 W |