/* called by: entrance ctrl of the object 'track'
5 o/ B9 I8 d* X+ R" p9 Y*/
) r& F8 I+ \) }9 dis
' j& s4 d( a) I9 A: y7 m2 ^' H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( [" p e( v4 r, X3 h) ^% ?do, A) g$ K& O# U0 w2 ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
U% ]0 a* g3 Y0 D6 M$ m/ | if current = @.Destination -- else return5 g1 p# B8 t3 a/ s) V7 `
then/ N1 r; S) C2 O9 \+ w' I" t
@.Destination := void;! U3 V% Y1 h& I8 V: x) b3 W
if @.occupied then$ ~8 H: n' y r) B8 s K
part := @.cont;
9 y% L9 \3 o- v3 V& f @.transpOrder := void;
4 P |) ^/ I3 T, G: f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 @8 ]0 J! k; J% A
@,root.eventcontroller.simTime);" |9 m& f# {3 l- J' p i5 k/ ^
@.HasOrder := false;
& x# t* ?* k# H @.DrivingHome := true;9 H n- J3 n/ e$ L; i; P
rgManager.tryToStartTransOrder;
7 s4 h u- L1 x* Y if @.Destination = void0 \1 F' \# S) y7 d# G6 Q% k5 N
then -- no transport order for vehicle @, ]1 b& c5 P4 q# s( P* U: K' H
@.Destination :=
+ ~$ a! U ^% S, M$ W0 C5 \' O rgManager.nearestFreeStation(@,track.~);- C" }9 |; ^" {
newDirection(@); 4 ]! A6 d0 X5 x8 X) A0 `
if @.Destination /= void then
. c3 l$ A# r6 X! M2 M- I @.Destination.NumReservation :=
( h, g; N d7 s: p8 _/ }/ \1 H0 b @.Destination.NumReservation + 1;
( B8 g. C/ J' `7 p end;
# E R' {0 e0 C; ^2 f4 q9 H4 Q @.CurrIcon := "drivingHome";* U; @1 k+ t% l0 U' A- y# S+ S& [
@.DrivingHome := true;, S7 M6 m) G, V; {+ ~) M& ?1 ~1 p
end;& O2 I: [0 j* i2 m4 D1 c7 x0 @! }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 T3 W$ |; f& D- s6 `+ L" w8 t part := @.transpOrder;, ]+ r h, c% C6 q
part.move(@);-- load part0 ]+ C" E$ S8 X" g5 v5 p3 x# G. g
@.CurrIcon := "load";% j, w0 R3 w& K, y& e
GlobalDistObj := part.globDestination;
8 ~0 X+ G4 f, h0 k A9 n- D assignLObj := rgmanager.rgAssignL;3 R# ~* e% m0 f, m+ \+ ~8 g6 k
row := assignLObj.getRowNo(GlobalDistObj);
3 I# W! n! _& Y0 G if Row = -1 then -- since 70
4 T3 B8 b- z+ `2 V9 T2 } if lan=1 then
k: F. X7 x$ M, X/ h. R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \6 \2 g( o. H: i4 E/ f to_str("in der Andockstation: \"",?.~.name,"\""));
0 C: v- J% R3 S) w) c( y else
, I) i" `. G ^ _; c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& _0 k5 g# G$ U% C
to_str("in docking station: \"",?.~.name,"\""));
/ s& z a" I& ^* @ j end;$ p- Y6 r# b- c' ?7 y8 K: I6 a
else
+ `4 S2 M; O1 s* Y8 u* b @.Destination := assignLObj[1,row];' c/ U6 ~7 O, C( v$ }$ y9 ~* N
end;
$ x" r: P& |* _3 Z' j0 y" {; c newDirection(@);
; {; g5 Y! d, m- ]: V( [ @.HasOrder := true; u. z$ q8 d S, S e
end;. ~0 k+ b- o9 e6 n& j
end;& a* {) }' L; j- i
end; -- of the method* [+ Z: n" o& c* }( ?
|