/* called by: entrance ctrl of the object 'track') ^( M$ m8 q6 r; F( I; u8 d
*/+ o- _4 B7 M, I }( d: b
is% `3 ]8 [0 v+ M& d0 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 p$ Q" }- C! n6 |do1 x" q; P; ]6 P9 ?- x- A f0 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
% h* U- @1 J, Q9 F7 G4 u if current = @.Destination -- else return
* {0 ^8 W0 Q4 l% A then, l0 {/ s: N* {; A. k+ D9 w
@.Destination := void;
% C8 S9 a1 ]/ z# ` if @.occupied then; a& {/ w& b4 t* S4 m
part := @.cont;% ~. e1 w4 k* v3 m) q, l
@.transpOrder := void;
# Z h' C; \# r( _! W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 O- Z( G+ K& ~% e, c- V! f @,root.eventcontroller.simTime);
! _4 l: [! R) N) E. k @.HasOrder := false;
6 x8 `+ P4 f4 o: _ @.DrivingHome := true;/ [0 Z: R* j" p& _' |
rgManager.tryToStartTransOrder;
- c9 B( f. K5 {# Z' w if @.Destination = void
0 P( \9 H, ~- O- ` then -- no transport order for vehicle @
' K4 X3 N) p$ j6 ]+ ~ W; I p @.Destination :=" Z8 N5 w* M& \; o
rgManager.nearestFreeStation(@,track.~);: f$ A2 ~* }7 Q% R* \
newDirection(@); ( z; t) A0 f) D. I6 d! E6 r' O
if @.Destination /= void then c& x* m/ _2 g& w1 ^5 x
@.Destination.NumReservation :=
3 G- a2 q+ ^3 P" e& K; V/ m9 j @.Destination.NumReservation + 1;5 w% ~1 \# X- z$ N+ J$ {
end;* L+ @ q( S9 Z3 N5 F( J3 ~4 }
@.CurrIcon := "drivingHome";
4 K, ]2 R2 x; Y* A @.DrivingHome := true;2 f3 v4 u" f+ p+ s, n6 V8 X; Q! B' _
end;
3 M* c H4 U7 T* P; R1 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 D7 ?. y' q# d f part := @.transpOrder;
$ q+ D% E6 r8 d+ t part.move(@);-- load part
8 l6 I, r z( k$ g9 ` @.CurrIcon := "load"; k$ o: }- j+ ^, O3 f) b$ l c5 Y
GlobalDistObj := part.globDestination; J, D4 C' E- F/ U. w
assignLObj := rgmanager.rgAssignL;
. y8 O, s& k. y1 B v row := assignLObj.getRowNo(GlobalDistObj); s& `7 C4 r5 ^5 b
if Row = -1 then -- since 707 b& |4 I/ E7 Q! b" ] Z) X- p4 ]
if lan=1 then& n/ T* [; W$ B( x0 [3 ]0 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) b5 G" q2 f+ H
to_str("in der Andockstation: \"",?.~.name,"\""));3 x- Z- O# j E1 e. [4 B" z1 Z9 B
else
- v* l6 y0 U+ @( T6 {8 H! ]6 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ?0 E4 M# x% D& n! d9 c6 w& [ to_str("in docking station: \"",?.~.name,"\""));
" [) R6 u; `' J, i3 Y" |% ^ end;
% ]4 k7 X( }! @! F- ~" H& F else1 ~$ N# G8 |+ U R. x* [
@.Destination := assignLObj[1,row];" B1 r/ ?) Q$ |+ W. h0 z
end;
6 r/ i- b9 Q+ ~ newDirection(@);
7 T, i, Y. M' U7 x @.HasOrder := true;
* c* Y- X$ G }. j0 P( C3 f& [" ] end;
3 ?1 a4 q- q5 Z6 S end;
- U$ G$ O% e4 d+ ]: }end; -- of the method9 t! I1 @, T3 `& H% ^
|