/* called by: entrance ctrl of the object 'track'
% y- |" k( q+ s2 i*/5 J" q" d* k7 U3 A2 @
is
, p3 }9 H1 {6 A# Z6 ^# @0 X( u part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 o! O" I. C3 B. i6 J6 d
do. A- D4 @7 q+ B
Lan := rootfolder.Internal.Tools.AOLlanguage;: z4 f/ a/ F$ N! C
if current = @.Destination -- else return
. }, L( G" V4 {, L$ [ then. S+ a/ b4 \5 S' o. N
@.Destination := void;( |8 w3 n5 A. j! m
if @.occupied then9 u% L# R1 u6 B2 p* F
part := @.cont;* w! s: K0 D# a0 q2 O: b: j b5 r
@.transpOrder := void;
! g# c+ r& A' j/ h2 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 u% A$ Y, B U* ~8 C9 P6 J @,root.eventcontroller.simTime);
0 A! C; Z8 w% ^" R9 F0 S8 [+ ` @.HasOrder := false;
- J$ i4 c+ i2 A* I9 T, d5 y5 X& W @.DrivingHome := true;# ~- x& e0 G, @7 l; ~5 ?: k
rgManager.tryToStartTransOrder;
! V2 p# o2 t4 s8 ~; s+ M if @.Destination = void
! J! P5 v! {, B/ B( \7 J2 Q3 | then -- no transport order for vehicle @8 z& W5 z2 K: z, @; [3 U7 O
@.Destination :=
: q% Z' N8 x4 I9 w1 t$ \8 N rgManager.nearestFreeStation(@,track.~);
. l9 E7 w5 r5 K1 D9 [3 F5 Q0 S: w newDirection(@);
! T6 ?6 [; g+ j/ a! M$ R if @.Destination /= void then( _9 @) Z/ y' m- P" E
@.Destination.NumReservation :=
% T) T S8 n2 s- W6 Q @.Destination.NumReservation + 1;
. s+ s* T( j* P9 c end;3 [- D% c3 o9 |0 l) l; }" f
@.CurrIcon := "drivingHome";
8 X. }5 k/ Q7 [& y, u7 U @.DrivingHome := true;
5 H6 B* e0 ~- [" ] end;
! _0 n( P, Y. c& I; h2 a! A9 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 O3 j. L1 p% C' p5 R/ B part := @.transpOrder;$ L& L0 D7 \0 `% p
part.move(@);-- load part
& P# a4 A. b( s9 g& P @.CurrIcon := "load";( P& _% F, D3 I
GlobalDistObj := part.globDestination;; |$ |9 `+ d5 z7 L6 l/ N: Y3 T
assignLObj := rgmanager.rgAssignL;
- q& d, ?- @7 U7 R5 a row := assignLObj.getRowNo(GlobalDistObj);
$ b2 T% P1 R8 Y8 Z$ H if Row = -1 then -- since 703 @4 r8 R8 @ C
if lan=1 then
3 E3 o4 m: v3 d0 m0 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 W2 R F# Y- `# F: J
to_str("in der Andockstation: \"",?.~.name,"\""));6 a% S M* m# V! {! E) O( O
else$ O$ c }* E7 v1 T( H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& O/ F3 f& }- a( D to_str("in docking station: \"",?.~.name,"\"")); 7 z- I i4 S3 G9 h
end;
; C7 F0 f0 f' B3 ^' M- J else& E8 |& h! L t( Y* Q* c+ S! ^5 g
@.Destination := assignLObj[1,row];
* X# v3 Z# }) }1 j& i* r end;
9 E1 { z- y& n5 R newDirection(@);6 Z+ a* P/ ~2 k+ G2 S" {- j4 w& Y
@.HasOrder := true;- \: B& p9 Q8 A6 a
end;! @. r5 t! l) G
end;6 {1 P* [2 c9 Z8 T. ?! _! d/ ^& v
end; -- of the method
6 X. o' A1 G7 m$ J7 {% N8 ` |