/* called by: entrance ctrl of the object 'track'$ v( V1 P0 e+ g* V# [5 ?( R8 S
*/
- d2 Q, y+ u+ k( C7 His
2 ]5 C. n" X( V8 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ K9 O k: J' P3 c- W% e: z
do
. ]5 l/ H6 j4 j6 x6 o Lan := rootfolder.Internal.Tools.AOLlanguage;. N" o% v9 F8 U. }+ Z
if current = @.Destination -- else return
4 n2 R9 M. `- h7 v$ j; Z, p then
) l# x. l9 a0 q* w @.Destination := void;5 N4 O. `" i' x/ n' ^; g
if @.occupied then
0 [( x$ m& F( ]1 ~ ?4 g8 \6 h part := @.cont;$ g, \) J3 _( _7 j$ d
@.transpOrder := void;
4 h- q: {8 K7 s6 _# V- s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ }6 R/ M3 r; a: V( u' [+ G1 ? @,root.eventcontroller.simTime);7 T0 P$ b( U* q; ~0 ~
@.HasOrder := false;
4 ^6 h o; y. V! C% j6 P/ O @.DrivingHome := true;/ I) i9 @% ]* A9 t: F" Y
rgManager.tryToStartTransOrder;
4 Q/ K' L- l- |& Z, i- c% J if @.Destination = void, ]# c% O1 L6 l& _; q
then -- no transport order for vehicle @" [/ R, A1 F4 [
@.Destination :=
* l9 } `' q1 j% V rgManager.nearestFreeStation(@,track.~);
: {6 F$ B& o+ \' w. }+ O) U6 p8 }4 l7 l7 b newDirection(@); * r( C- v* J1 J( u
if @.Destination /= void then
1 v1 J3 m6 B& Q @.Destination.NumReservation := r4 _/ ~! ~9 m
@.Destination.NumReservation + 1;- Q5 K; s1 H/ b
end;
0 I. |6 G$ F$ K- [. v0 g- T8 g @.CurrIcon := "drivingHome";5 p! P* H# b6 U) {% ]6 T8 `, C2 g
@.DrivingHome := true;
& d6 T' }! Z$ n& D6 j" D end;" P/ F; q/ b, V8 h; c& e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 T4 c# H: O+ Q- G& Z: t0 r part := @.transpOrder;' W+ J+ t0 @5 i* O, e/ e
part.move(@);-- load part$ ~) ]- z: C/ h- s
@.CurrIcon := "load";' _& _" x. R9 v
GlobalDistObj := part.globDestination;
( w3 I6 Z: |9 A; z0 s$ N assignLObj := rgmanager.rgAssignL;
, F3 o8 A+ Y2 N* B" g+ F! J row := assignLObj.getRowNo(GlobalDistObj);
- {4 G- ~$ Y9 q: \# ~! Z2 V2 ? if Row = -1 then -- since 70
, v+ Y0 L6 D0 {4 I) ]' r6 r if lan=1 then
+ ]1 H. @" V7 |5 l9 o/ q; N9 y3 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 {2 f7 c, M- o' w to_str("in der Andockstation: \"",?.~.name,"\""));
5 g; M2 O4 O& ?* g Z else
, d# v/ p/ D7 }! r7 J, g3 g" `9 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 a7 x8 M& |1 ?
to_str("in docking station: \"",?.~.name,"\""));
a5 M8 a' X: J: h( z3 T4 @ end;, F; `7 f& U6 D
else1 v) Z% q$ X9 G
@.Destination := assignLObj[1,row];# j( W5 V) ]) n8 W3 F( `
end; / R2 q# s, K3 T3 z
newDirection(@);
3 g# }1 Y' R) G$ p G; R @.HasOrder := true;1 |% [; @0 V+ Q: j$ R4 O
end;
7 m. e, k" g# E end;
, w& G l+ ?3 ]8 a+ eend; -- of the method/ ~7 C5 K, l/ F3 B: u) x
|