/* called by: entrance ctrl of the object 'track'; k5 z. i4 W. ~
*/' x; G B. T& `5 [% k5 s! S
is
- G6 z: f& U* j2 \% E% v* t+ S part, GlobalDistObj, assignLObj:object;row,Lan:integer;( D5 p3 n% K4 S: D. ]. M; w
do
. U6 \1 ~' v, n4 N2 T Lan := rootfolder.Internal.Tools.AOLlanguage;
* A$ v6 Z8 w. R2 ~: e if current = @.Destination -- else return
/ T D6 U4 A/ B( u$ n1 k then9 c9 I+ E1 D0 M! _5 N
@.Destination := void;
W8 y0 p" _ o2 T4 ?) ? if @.occupied then
& `# }3 c* I6 E! ]) Y part := @.cont;1 d" A# g8 o4 i0 L
@.transpOrder := void;
$ z5 l' D0 t3 O: Y( O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' t7 g; E) o/ N$ B& g' i
@,root.eventcontroller.simTime);' a& d" _' v, k% Y; B
@.HasOrder := false;
) E; F+ k6 \3 i @.DrivingHome := true;+ l9 g( j* Q/ t
rgManager.tryToStartTransOrder;
3 |5 b9 i | i y ^9 u+ F3 V9 o8 N6 I if @.Destination = void
. D+ p0 o* `, Y, y, i/ I then -- no transport order for vehicle @
. d! U& Q* B. V1 u' F' a @.Destination :=
( c, P. c& U7 I+ `: R: \/ O6 j rgManager.nearestFreeStation(@,track.~);
2 N3 `( ~( |7 m% H! |6 ]* { newDirection(@);
# o( ^; i- n6 P: p# I. k. y if @.Destination /= void then5 N: E/ _1 X' ?8 B' _' X; m5 {; ]- E; e9 D
@.Destination.NumReservation :=6 s0 j' k) o2 W6 N) L. y ]
@.Destination.NumReservation + 1;8 }1 _3 ?6 q5 c9 q; B
end;
1 S: _2 n% m; A @.CurrIcon := "drivingHome";
' j5 V5 f: ^8 M8 c4 ^6 I @.DrivingHome := true;
. Z# A3 Q% b3 u1 s/ t end;' Y$ Y, ]/ d$ I h* H3 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ d$ i+ }3 U8 ?# r$ ^ part := @.transpOrder;
( r% \- G6 ?4 g7 j& D4 S& S part.move(@);-- load part/ j) G4 R+ b; Z: x* i0 e7 R$ b
@.CurrIcon := "load";/ T) ~) X3 `+ U3 z* o) L
GlobalDistObj := part.globDestination;- O3 c- ]' M B1 k; e
assignLObj := rgmanager.rgAssignL;3 u6 B& H3 M% h4 v
row := assignLObj.getRowNo(GlobalDistObj);
1 ~9 U( k& b8 S2 i- Q& _- l9 b if Row = -1 then -- since 70% [' X8 ^; L( d' ]. d
if lan=1 then0 g6 ]1 k+ M/ W4 E% u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 {: B& l8 I3 b9 t7 V8 n. l1 G, C
to_str("in der Andockstation: \"",?.~.name,"\""));
. U; P# I8 F& u, E2 i else2 S# ^3 A# S: ~0 o. `2 {0 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }( W+ h @( C* ~6 w% k3 E5 r( s7 b to_str("in docking station: \"",?.~.name,"\""));
! h+ \- p9 w6 h) L( E7 P end;' ?, f( h* I( f1 `. `' S
else
p0 V& N9 ?' {" | @.Destination := assignLObj[1,row];2 f* }+ o @8 i3 i0 H b
end; 8 {) g' w4 a% m! u$ T
newDirection(@);" j9 @( s: ]0 b2 K' W' C; I1 e
@.HasOrder := true;
: C5 U q! C: V7 s) G6 k z end;
6 e: p1 f, X1 e9 f8 _: t end;
, H1 B3 [( }; Y5 ]. oend; -- of the method& M: L9 B$ k$ Y! O S. t R
|