/* called by: entrance ctrl of the object 'track'; x: k F2 d4 i3 k
*/
& L, l1 j6 r2 ^" ]is3 V+ I/ p6 d4 s$ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ t2 J3 _' v1 J& O5 y( Z' odo2 X) Y0 O& I+ r. N# w
Lan := rootfolder.Internal.Tools.AOLlanguage;3 c1 r: d; U! J! H
if current = @.Destination -- else return) o& l' i, f( b1 s6 t. J9 K
then
I/ `# i9 q$ B; S @.Destination := void;
# O" j) d4 u% r* _ if @.occupied then5 H5 I* R9 G) K1 e' K+ v( h' k
part := @.cont;
5 ^* _$ V' h+ ]" }5 t* K @.transpOrder := void;. o9 w# V' q& q o0 i, X+ W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# T2 f$ t" p9 b! g2 {, J S( L2 _5 A# U
@,root.eventcontroller.simTime);- U7 S9 G* [3 b% {, Z
@.HasOrder := false;8 p6 I) g# j" R' S j
@.DrivingHome := true;
& H& q" s; a( G rgManager.tryToStartTransOrder;
# T. K* ?9 M! s# K& S if @.Destination = void
0 }( b9 `" i R1 H then -- no transport order for vehicle @2 m0 W* `5 x: _1 ^8 o. o
@.Destination :=* i% @- p# W; \ V
rgManager.nearestFreeStation(@,track.~);2 M8 {2 U9 }! Y7 D; F% n, ^5 f- L
newDirection(@);
: T) z: |2 p7 u1 U9 i3 Q% Z7 k* e( G) f if @.Destination /= void then0 j& w' [5 W; A9 D" y
@.Destination.NumReservation :=7 E9 J6 O$ B% Z$ j; ~6 j$ _6 M
@.Destination.NumReservation + 1;
0 ]: B* t/ h; q) X; f end;2 P6 N2 |" [/ ]3 Z" s; |( x
@.CurrIcon := "drivingHome";
2 I/ e7 K8 `. z! D @.DrivingHome := true;" O& }4 [" L( R3 c& G5 C) b1 o
end;$ v# ]' E3 C; q' ?; q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) @8 d$ y/ g7 G6 e- P# b" W: ~ part := @.transpOrder;1 y0 [- g; a4 |6 f0 f" ?; h
part.move(@);-- load part+ `, h* `/ A/ q/ a
@.CurrIcon := "load";
; Z* |6 g" P, V" w GlobalDistObj := part.globDestination;
. s Z; u: ?1 r, Y, i) }1 P assignLObj := rgmanager.rgAssignL;/ c: o% j' w8 P" I. K0 W
row := assignLObj.getRowNo(GlobalDistObj);6 x# H+ }, x6 R; _$ O. }$ ~: u( I
if Row = -1 then -- since 700 m* m# e! ]/ `8 z) F( p. ]3 f
if lan=1 then( h" p$ ~& j- z5 V, I8 j, S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( }* v! ~3 G$ ]( c; H; I/ ?
to_str("in der Andockstation: \"",?.~.name,"\""));
, b" B/ [( p0 M% f: Q! I else$ L" A5 u, ~/ C* `" \8 c# E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }: h) H X$ u: Y" V( P. O to_str("in docking station: \"",?.~.name,"\""));
4 m: o# s$ ^- F! G end;: K8 `4 g1 e; O
else
" L7 w/ R' ?% p @.Destination := assignLObj[1,row];% C1 Y2 M" i- a& W5 H9 P: x7 W
end;
' {- N! F2 D% O newDirection(@);
7 K4 C2 i1 ]# `- t$ t8 u6 r5 [ @.HasOrder := true;* l4 P9 i/ P0 [
end;" o' c, Y0 p j4 N8 D
end;
3 h V, @8 Q# xend; -- of the method# t% Y. N" Q9 Q; a% _ `7 r
|