/* called by: entrance ctrl of the object 'track'
! `" _7 w* E; T( `0 ]. W4 C*/" V6 M% j9 Y# u: p/ Y& G5 f
is
( ?! ?" d! l: `0 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 z- V& F) C7 V# a- v
do" Z, V/ y# [! B8 G) A
Lan := rootfolder.Internal.Tools.AOLlanguage;, [3 S' A2 |( l" u0 t( |- c6 U7 v' z
if current = @.Destination -- else return
: r- f# u2 H Z& q+ L then# j/ I( `# A/ H3 \# v
@.Destination := void;
8 @0 \) \ o. ~. ?. F9 } if @.occupied then! J+ ?6 ^1 w/ I0 R/ ?7 J
part := @.cont;
* p6 f+ z% G% G" f @.transpOrder := void;
* t: Q6 I9 d: s; f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ~4 ?0 r- _9 o" r( Q" B
@,root.eventcontroller.simTime);. K4 h9 z/ R; J1 o* H
@.HasOrder := false;5 i# S; o* w& Z' ~; w
@.DrivingHome := true;
9 a/ K" v G6 \ rgManager.tryToStartTransOrder;
+ c2 N: l8 P! u l* Q+ P if @.Destination = void% D; u7 f+ g! {2 K' `0 j% C2 F8 o
then -- no transport order for vehicle @
9 r4 w, X& Q) p- g) h @.Destination :=
1 L* g/ w- ]; N0 s; X0 Y rgManager.nearestFreeStation(@,track.~);
! A9 s# U/ y& x2 R e6 b newDirection(@);
+ b. h5 W( o: [2 P if @.Destination /= void then
$ x& j3 T6 n; j; @# d" C @.Destination.NumReservation :=
. q6 R7 n! q% L" o! N @.Destination.NumReservation + 1;" F7 ^' y1 w7 G6 F- q
end;* H5 x0 a- G0 r4 V1 h& G4 z
@.CurrIcon := "drivingHome";
; ]4 w& z* E- Y5 J! g+ W, {1 J* E; P @.DrivingHome := true;1 K2 ~8 J1 ?$ q, G, A9 \% K
end;
0 C/ E5 }6 b2 C1 Y1 x8 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 k1 m& b& Q% G/ k part := @.transpOrder;; l: H' [( F- [& N( A5 C
part.move(@);-- load part$ B. Q) F* b$ g$ ^- F
@.CurrIcon := "load";
4 r1 R! U7 H0 ` i4 r GlobalDistObj := part.globDestination;
, g. y+ Q& D( c1 r2 r assignLObj := rgmanager.rgAssignL;$ \' y1 a7 G8 l- `0 c. `
row := assignLObj.getRowNo(GlobalDistObj);
' c3 r6 k2 S& D2 T2 K2 z6 ?3 C) V& G if Row = -1 then -- since 705 I+ u& O* D: J
if lan=1 then- _2 w; c s& i) Y! u. z/ K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; h! \3 D( ~, R- [; [, O to_str("in der Andockstation: \"",?.~.name,"\""));7 N- j# J" d; F u
else
. l6 m; G- S; Z+ G/ q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 L1 L$ N2 L7 [, Q& T
to_str("in docking station: \"",?.~.name,"\"")); : p0 i* Q0 _9 ~2 d
end;* \& r& C% r9 ]' U/ k1 w
else
# Y+ I' j4 Y9 X @.Destination := assignLObj[1,row];
9 Q4 ]1 }5 u# ~ end;
' f5 q! s- }- C* w newDirection(@);
: `4 I6 U3 A# g0 s: ?: c" u @.HasOrder := true;# [( n5 c5 o" q% B
end;: y8 E6 S; X3 V* C% @4 M
end;
& U8 A5 P. W2 @4 U( Aend; -- of the method( B; {1 i8 L0 {
|