/* called by: entrance ctrl of the object 'track'
& H7 k' z7 j; m! d. @*/' Q* a7 `1 C; F0 B8 o5 u3 }! A' o
is2 Y2 K( d5 I; R6 O; T/ H7 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 g: r7 \0 p* {) J' R9 Q
do
0 V1 J/ s* T! ^9 Q2 ~1 F: W Lan := rootfolder.Internal.Tools.AOLlanguage;0 x: Q3 h8 Q) z5 A" Q9 O( s; E
if current = @.Destination -- else return$ N1 B# S* [/ ?$ u' [. |
then
4 K, }( T1 U! E X @.Destination := void;
; p: _0 J% P1 {3 J- t if @.occupied then
& o' O% l$ D1 ?9 J) p4 l7 w' G part := @.cont;
, D V2 W4 ?$ y$ s4 Z @.transpOrder := void;/ r M4 \& k) t, p( j4 M& o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 I* q4 z X/ E0 m5 { @,root.eventcontroller.simTime);
5 F7 Q9 ^5 _' e/ k @.HasOrder := false;
, F/ `0 d6 }6 T( E/ o5 O; d @.DrivingHome := true;
" H u: V9 p! s: W rgManager.tryToStartTransOrder;
2 Z; b* U6 s m O" V$ P G s if @.Destination = void9 W4 T4 Y4 Y5 B- L* C, i a
then -- no transport order for vehicle @
( I Q; E# r" K# c( Q d/ s @.Destination :=2 d7 f4 L- [! Z9 @8 ^5 Q
rgManager.nearestFreeStation(@,track.~);
5 U& i# i) a9 y newDirection(@); E; B, h- _& j
if @.Destination /= void then; ^& I) t/ B5 k0 p7 o
@.Destination.NumReservation :=
( G( O0 l6 `4 j+ g5 E3 K. t6 p @.Destination.NumReservation + 1;. q. T) ]1 |* C' l4 w
end;
/ i' D9 Y$ a- p/ t# t @.CurrIcon := "drivingHome";
) N7 a1 B! s6 I9 H7 z [3 R3 t @.DrivingHome := true;, m. \1 A* [; _3 ]
end;
" y2 J- V. v' L2 }: A* T _ P) \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station- a8 O3 e7 a3 a' K5 E
part := @.transpOrder;# V- N$ I" |. h n. y
part.move(@);-- load part
$ I3 E: t( i9 X/ b8 H5 o5 W N* R$ q @.CurrIcon := "load";
4 }4 d7 N2 [$ o" ]& \, p GlobalDistObj := part.globDestination;
: e0 w B# K8 M: n7 J assignLObj := rgmanager.rgAssignL;
7 `3 f* K- e; X% y2 K; w- ?& }- p row := assignLObj.getRowNo(GlobalDistObj);
" ? K+ F A* C7 K, c. v! D if Row = -1 then -- since 70
/ s- O/ a+ V) I( Q8 z2 z! O if lan=1 then) G& F/ d+ Z9 Y4 k) \8 b: b% o }5 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* b+ X o& v+ G4 L to_str("in der Andockstation: \"",?.~.name,"\""));7 L! T' c% W( d, b9 n
else8 L. I- n* W/ H* Y- I; ~; {2 h; \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' V& U/ F& D1 ~0 R to_str("in docking station: \"",?.~.name,"\"")); 1 T0 `' [8 y5 w
end;
4 [" }6 ?* \+ V0 Z8 T else
9 u# Z2 T, r: P _8 L0 s @.Destination := assignLObj[1,row];
: p* H* N; `% \" ?+ I$ N2 H end;
$ T7 R. n, q9 f newDirection(@);
* t' ?0 ~' c; G! O1 _# P @.HasOrder := true;* y* y3 {9 l! {
end;
4 q2 j; A/ e/ g: Q: v5 b end;
* H* `0 b. I( T1 K3 [% Rend; -- of the method* l o9 ]- y) v/ @; y
|