/* called by: entrance ctrl of the object 'track'6 a" `" E1 u+ Y4 N
*/+ \0 F0 Q$ ^8 M+ Z% ^+ V. I$ v6 \9 ^
is# i$ \# F) O* F. M U' Q% m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, b ~3 k, ?2 f/ L) a8 q0 f
do
! p& k# z; r1 N" e0 B, l Lan := rootfolder.Internal.Tools.AOLlanguage; `- t* h' q- k* Z# g7 D7 U j6 C
if current = @.Destination -- else return R& U' c9 j# Y. f
then( p& L9 ]: o* [5 b5 I0 {
@.Destination := void;0 \& E o, D. [) o9 z
if @.occupied then% D* z: ?( w1 D* e' N% K6 c$ Z u; A
part := @.cont;
& w* F4 t5 }$ s; I: J @.transpOrder := void;4 A. H6 N1 y3 q8 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
^7 _3 z. D2 x6 A, V @,root.eventcontroller.simTime);
/ o" D$ D* z! N" V+ P @.HasOrder := false;
1 `$ q& |& X \! L* w @.DrivingHome := true;
+ n- S5 ]1 C$ R3 s3 K$ h rgManager.tryToStartTransOrder;
* y3 N: A" _3 k if @.Destination = void
' }7 K+ B% K- Q0 j$ H& i4 B7 r+ Q then -- no transport order for vehicle @
( e0 T6 ]2 Q& I" u @.Destination :=
+ w( G% L) c/ c% L rgManager.nearestFreeStation(@,track.~);
6 y9 E7 A k/ {) X9 U. K newDirection(@); + ~( [& ?3 u$ G/ ?0 B
if @.Destination /= void then4 g8 l. {. q" G* V8 a+ b% {
@.Destination.NumReservation :=- [5 N7 U( t; q3 _5 Y% O
@.Destination.NumReservation + 1;9 B% ]% m. ~; \1 q" v) t
end;
f8 i n& x6 Y0 s! \% W: s @.CurrIcon := "drivingHome";7 A5 A8 F# G6 A; k; q3 C+ Q
@.DrivingHome := true;) f* t- X. Z! Z. X8 Z# g, d
end;
+ s$ v' }# S; w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~3 `3 d/ m8 z$ S part := @.transpOrder;
/ i. o$ C2 b V part.move(@);-- load part
4 [$ p% G0 B) a6 O( c5 T% u- @ @.CurrIcon := "load";) ^. ^$ A" {4 A F3 f
GlobalDistObj := part.globDestination;& d4 Z4 X+ G# d9 }- |
assignLObj := rgmanager.rgAssignL;
" W8 L4 G# l! f row := assignLObj.getRowNo(GlobalDistObj);( Y) u5 _2 y. O) N9 b
if Row = -1 then -- since 70
1 [4 y9 @: L& z1 H if lan=1 then
0 @5 j/ x5 r' g6 m0 |1 }3 e/ H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 |6 c- s: F8 \3 _: B7 b# m0 B1 L to_str("in der Andockstation: \"",?.~.name,"\""));+ ]1 o+ F" V( T5 C$ [# a4 o; i1 T9 [8 E
else
$ r6 W+ U: V: n, d2 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# q* k" Z- @: l2 _2 e& J2 V' Z
to_str("in docking station: \"",?.~.name,"\"")); ; m0 H4 D1 |" a
end;
, c* e( Y% f! m' O else
% u! V$ c5 Z8 Q- } @.Destination := assignLObj[1,row];
: X: ^0 z% y+ n4 V/ z7 X end;
5 T. e% O+ V6 ~7 Y8 i' o# R; k newDirection(@);
. j& P; r% W# I7 m J$ E* s @.HasOrder := true;: Z% F. i5 K& Q& e* c3 S, ~
end;
1 y' r2 m! b- O# ^7 W' N; X4 O end;
7 K* f3 x. n- Vend; -- of the method
. t% \8 v% i8 j8 T |