/* called by: entrance ctrl of the object 'track'
% z( E# J! M6 A2 J9 H, [*/8 r; [6 \8 V: g5 {4 y, y L, m; ]
is
$ E# W4 }3 Q! R; j; I part, GlobalDistObj, assignLObj:object;row,Lan:integer;. W! j @6 b W* F2 P" G
do, v/ r: |( N- a1 f( }7 D1 I! z& P% n
Lan := rootfolder.Internal.Tools.AOLlanguage;
- \3 ]# B- I1 h- A$ a if current = @.Destination -- else return: H1 k; z$ T0 @+ F9 e; D
then* H" g, I3 p, e2 W; J5 p
@.Destination := void;
6 O; i4 k3 d! m if @.occupied then
8 A) a3 a, ^* v1 m2 o; @ part := @.cont;4 Q; D; L5 D: F" J* f. a
@.transpOrder := void;3 [- ? O3 c" a8 I# N3 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( F! J8 x8 p& g9 Z3 W! ^
@,root.eventcontroller.simTime);
; o4 H2 H2 @8 \! w$ V; h @.HasOrder := false;
8 K7 W$ z! s5 q$ T# g* m9 p) u @.DrivingHome := true;
$ o; p% b4 @0 z* {; d& J rgManager.tryToStartTransOrder;
$ [3 i9 J% F1 a, B; y9 e7 Z4 b5 h1 Y if @.Destination = void6 |* ~; r+ o; X+ c* I
then -- no transport order for vehicle @8 P1 D) W% G+ ^. |) U% _$ \
@.Destination :=
" A: ^+ L) d! T9 {! b rgManager.nearestFreeStation(@,track.~);& w6 \5 @- C: W
newDirection(@); 9 q5 q" G/ t7 D9 B; N: |
if @.Destination /= void then
% M& S" E0 W; k! z6 W @.Destination.NumReservation :=
: ~$ i7 a8 y) \) o7 q @.Destination.NumReservation + 1;9 L4 K* D' X" ^
end;
, X. `4 z! `+ W; X+ F7 I9 d @.CurrIcon := "drivingHome";- S! w- [) r8 h& a; _
@.DrivingHome := true;
: c( g) @* Q/ f% ?7 O- G end;4 L9 b2 p! D+ g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 W; n% z/ ~; y4 b& R1 O# Q+ F
part := @.transpOrder;
1 ?( ~4 u" |5 V$ q9 v5 L7 p# u& x part.move(@);-- load part1 V9 D7 c) S' ]) O
@.CurrIcon := "load";- B/ m2 O7 Z: o4 b
GlobalDistObj := part.globDestination;5 ?7 e" U8 G" L6 {
assignLObj := rgmanager.rgAssignL;
' F" R& }; y/ V1 w1 Q6 m row := assignLObj.getRowNo(GlobalDistObj);
* t* ]3 S# J- Q0 L) p if Row = -1 then -- since 70
) a* O7 y/ f; B if lan=1 then
: u6 _, N+ {$ E5 t% @: ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! ]9 R' s5 o7 v to_str("in der Andockstation: \"",?.~.name,"\""));- p5 [6 q% \4 a* G U
else
5 F8 O/ }" ]3 O1 p3 Y8 q" v1 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ S* ]3 l" l6 L: Y" e2 `7 i to_str("in docking station: \"",?.~.name,"\""));
( C8 y; ]" ?0 q T D% }' o, O end;
y+ \( }- c$ Q. u1 A9 J: t else
, \8 t5 A& b4 u) c% ] @.Destination := assignLObj[1,row];
; q; }9 e+ F) `1 e" F1 C l end; " B; ^: V( q% n5 Z5 j
newDirection(@);
6 i- G$ w# r9 @2 R @.HasOrder := true;6 Z) r( d7 H: c* L
end;1 v# E- c& s( [1 B) z
end;
! X6 o9 j+ w' @end; -- of the method
" s1 o2 {4 b0 v6 S( p |