/* called by: entrance ctrl of the object 'track'
# p( R8 \8 e7 ]/ F" s: c" P*/
/ K$ M& e/ k( N8 B1 gis9 k& j& R8 F* O, V" }/ p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 @. {8 w3 F# L! j. k! s4 u
do
4 ^- `" ^8 k' O: G: T! W. x" ^ Lan := rootfolder.Internal.Tools.AOLlanguage;& d4 L4 R8 x6 H' o1 J! C
if current = @.Destination -- else return0 z' ?3 B/ G7 j2 N: R1 K9 ^4 L
then
. h5 T1 S' V' K$ L @.Destination := void;3 Y7 A; y$ T+ M6 Z. E( y
if @.occupied then
W. R- g3 u3 f5 C- d7 I part := @.cont;1 s: a- y0 p3 w2 _/ U! w
@.transpOrder := void;
; M" S q9 l! F { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 r7 f0 n* B% d, m# T* P! I
@,root.eventcontroller.simTime);
- V0 \- a! `* g- M+ b7 M ] @.HasOrder := false;
9 o, r: ~. I1 C @.DrivingHome := true;4 Z* _4 S! }- y/ u; Y% @
rgManager.tryToStartTransOrder;
- a- h) B( \( L7 |9 k2 ?2 N' o' n if @.Destination = void8 _% X% t' H% e5 n9 L$ a; M
then -- no transport order for vehicle @* S1 U' \6 R, \" y
@.Destination :=6 N' L, z, ?( b# j+ g: m4 n
rgManager.nearestFreeStation(@,track.~);, X7 j' V9 L* `4 V. e8 Z+ h% I
newDirection(@);
9 E8 G- w$ P# F6 C8 T' P/ j) @ if @.Destination /= void then' T$ C# J' ?/ o2 c; J/ {+ m# r( [* |
@.Destination.NumReservation :=
8 N1 N: H4 O5 a Z2 `9 J& [5 R @.Destination.NumReservation + 1;
' E8 U7 z# L) T0 m7 j. O. w6 m end;0 g3 g5 i6 b) j7 h0 p+ l+ \" n/ e7 v6 A
@.CurrIcon := "drivingHome";+ ]5 t7 c; ^ T- _
@.DrivingHome := true;; F( q2 ~# y+ `* d1 T3 m
end;+ G- N) M# c- e3 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: t, ^- [4 K+ W8 ` part := @.transpOrder;; T3 I- m" ?0 H8 f
part.move(@);-- load part
# u4 l8 X% H8 b# |! l% @& R+ x @.CurrIcon := "load";
: E2 ?7 J& Z' [4 x* N& T GlobalDistObj := part.globDestination;
5 Y# W+ I3 Z# \# [ assignLObj := rgmanager.rgAssignL; D, `( X( `4 T9 u: p
row := assignLObj.getRowNo(GlobalDistObj);
# j4 U1 A8 _0 H if Row = -1 then -- since 70
1 y. y% z. n$ C' ? if lan=1 then
7 e5 r4 \ W3 V. Q1 L* s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& C* C% w q, W! l; d* I+ f
to_str("in der Andockstation: \"",?.~.name,"\""));
, ^! U! |. S- s else
$ E, \: ~+ L, W8 f8 P0 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 t" b4 _, ?: X/ o5 n( b to_str("in docking station: \"",?.~.name,"\"")); 9 l% v0 H9 M- T) `& Q7 U2 I
end;
/ i: C! d( Z' E else( j& O$ Q& A, l* b: h6 V
@.Destination := assignLObj[1,row];7 _, j# o: E2 i; e
end;
2 P2 |/ e% w# r1 E$ X8 `- m newDirection(@);4 o) @, x: q0 M4 S) o& _5 x: ]
@.HasOrder := true;# M5 k n' q* {! u3 o! L
end;
& ~. N+ @8 N; M$ @# q% d; u end;- i' `2 |$ e6 W$ u0 ~
end; -- of the method. p+ M6 B, g: b3 b8 U+ ?) a
|