/* called by: entrance ctrl of the object 'track'
6 Y' h) h$ H# q2 y+ R7 n*/, ^! Y" o `& F9 d
is
1 z5 S5 r/ m9 Q0 A/ H part, GlobalDistObj, assignLObj:object;row,Lan:integer;, N2 l5 ~! N$ y/ L% {0 B
do5 g; J' U+ M, A0 x5 H. H( ~. {
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 s! D j3 ?0 k6 w+ i$ T% x; u if current = @.Destination -- else return/ T3 }1 o' R( m0 S5 x% m/ S4 [+ [- x
then' Z, q9 v* S4 P* N! |
@.Destination := void;! X/ U3 y. _- K1 u
if @.occupied then! Q, V, w z& M+ }2 h8 ~: E
part := @.cont;
. q4 K& s& ?* a" F+ [( x. P @.transpOrder := void;" ~* c- I% R2 Z: W$ {4 X$ ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- e$ M5 ?* |6 a* ^( R
@,root.eventcontroller.simTime);
4 e; p" H) u; C% }/ \5 p- B d* h @.HasOrder := false;
: a1 S% E5 d' z; \ @.DrivingHome := true;
% B0 x8 Z' A( M! X8 v0 b5 @ rgManager.tryToStartTransOrder;" [3 E$ x" U1 a7 R R4 Q
if @.Destination = void/ H( g9 H* Y% |9 U& F
then -- no transport order for vehicle @% W+ e% F, C& X4 O; @# `) F* F) }
@.Destination :=8 W1 W1 x& }+ U" V; z1 l* P
rgManager.nearestFreeStation(@,track.~);
- N3 t! x) x: @! W; D newDirection(@); O$ U$ g F% ]+ }& |! V# t
if @.Destination /= void then
/ I& `+ c* \5 h* j3 _ @.Destination.NumReservation :=
% V3 W2 L+ z& k$ C0 n; m @.Destination.NumReservation + 1;; |' U2 d2 x) x1 N# M
end;3 F; v' y) `% D0 F% E1 X
@.CurrIcon := "drivingHome";' Y# B1 J y" g$ t# r
@.DrivingHome := true;9 f2 S7 G8 u' r
end;. A! B( W ?" a, ]6 z' u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~9 W9 v4 K" E( S* ^# A% K( y part := @.transpOrder;$ g9 I- r% a+ V+ b* Q& B
part.move(@);-- load part) H$ o9 l6 G/ J! o
@.CurrIcon := "load";# ^0 s' a& D+ [, u2 e8 L
GlobalDistObj := part.globDestination;1 b1 p- r4 C7 t, }, e& c
assignLObj := rgmanager.rgAssignL;* s& s9 n2 P& e3 a, e
row := assignLObj.getRowNo(GlobalDistObj);
( Q/ z9 [6 y | if Row = -1 then -- since 704 g! z1 p! v7 r- {# W9 H7 ^* q8 \
if lan=1 then Q6 H! T! a' o" V3 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, r% `- d, J. `7 Q' M$ f- o to_str("in der Andockstation: \"",?.~.name,"\""));
% L, C" \9 u7 t8 R' u else
9 S1 T, V1 O& \- x' I, ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* |/ j1 }6 D! p: `8 a3 N
to_str("in docking station: \"",?.~.name,"\"")); 3 v$ w2 N# N/ c, E e: P/ @8 s
end;
2 `; W* k8 s4 T: Q: m/ V0 X- Z* z/ m else
) T- {$ |- r+ F5 n1 k7 ~' w @.Destination := assignLObj[1,row];
. v( N# m: B% q: ? end;
. U' k- `% ^# P newDirection(@);8 T1 X, A3 `) z5 \$ X
@.HasOrder := true;" r- M5 @/ F8 C; K% J# U& |
end;9 v% o- N, c* Y# y, P" i% l+ ~$ M
end;
1 {/ {# J9 {" ~* d5 o0 R8 Fend; -- of the method/ B: W, B4 l1 Y$ e8 \2 T$ h
|