/* called by: entrance ctrl of the object 'track'
6 X+ ^1 r1 j3 E8 v1 p6 r$ C; m8 H* O*/
' d5 X% K' d. ~# Lis5 c% n. r- O: t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! b+ F9 D" x C. i/ q0 {& U! Ndo
+ A. v: F- U; {: J1 {# M Lan := rootfolder.Internal.Tools.AOLlanguage;
/ U/ H9 L. R s g if current = @.Destination -- else return
8 K, b9 u; v8 \! o then
0 I7 S4 d% P+ f6 U- Z, y, x @.Destination := void;! @& A4 G7 u# |) ?1 W$ X
if @.occupied then' M$ {/ _; S% d X5 {/ L5 E8 k. X
part := @.cont;
1 A. p' k( v1 n @.transpOrder := void;
3 O* W2 w" c: K- [0 w0 p" M# Q8 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& J) m5 M/ S9 n l1 | @,root.eventcontroller.simTime);
' h' R& R2 K: Z @.HasOrder := false;
! z4 G y- _9 \7 V" D$ r4 V5 E- G @.DrivingHome := true;/ U k2 \" R& i5 }) _
rgManager.tryToStartTransOrder;
7 Y9 i) m' ]0 P8 t" X5 ~$ C if @.Destination = void5 g) @4 O2 ] `7 L6 e
then -- no transport order for vehicle @
. [3 @. P3 R- V @.Destination :=
% R: A, x/ S/ t3 ?2 V5 y3 E rgManager.nearestFreeStation(@,track.~);) }7 _2 j3 O3 e9 a$ }! O7 v
newDirection(@);
4 `1 l; C* B: y3 v% Y' L) [ if @.Destination /= void then" ^6 i* O, W! x& l$ K5 ]/ }+ u
@.Destination.NumReservation :=
3 m4 |7 O4 Z$ ]9 z) ?! o8 i @.Destination.NumReservation + 1;5 W% G) l. U/ F+ z
end;% \- h# p4 W8 Z! ?. Z* Z2 a; v% @
@.CurrIcon := "drivingHome";
% v' z; q, J. v* ^$ c- ` U' B @.DrivingHome := true;* l- K6 m: {% f4 n6 w
end;
* o9 Y: L- d1 a+ d! F3 y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& v" f0 E2 x& u, P7 _ part := @.transpOrder;( Y! O$ _% L% |, k
part.move(@);-- load part
! [; ]7 X" ~; F0 l3 Z; V7 Q @.CurrIcon := "load";
6 A: w* Y, c# f. b) g GlobalDistObj := part.globDestination;0 I3 O! P+ K* K9 \7 J
assignLObj := rgmanager.rgAssignL;/ A, g: g6 W/ E4 o5 y$ G5 p
row := assignLObj.getRowNo(GlobalDistObj);
; h- u1 V! R7 B9 \6 h- g( n if Row = -1 then -- since 702 y; Q7 f! H4 U: d
if lan=1 then I8 o+ ?9 M: a( v& T8 j- w. } O/ {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 T7 T* U7 c, z9 E( F D. ~, L% F; \ to_str("in der Andockstation: \"",?.~.name,"\""));& d& m+ e: ]/ B" r' t4 S+ s0 E
else4 J# a8 U+ \6 T" I p2 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ~& l! l) N* g( N to_str("in docking station: \"",?.~.name,"\"")); * M0 d8 ~1 t' X4 n. w+ c
end;7 L; ?1 W5 K8 E& W7 o6 Z9 ~1 A( F
else
( I# G: V) A# \8 k3 [" k: J @.Destination := assignLObj[1,row];
' \' r( j \, x( _' k end; 4 W- h: g$ z$ ?: X! H
newDirection(@);
( U! O) ?1 e9 d3 E8 e6 X @.HasOrder := true;
8 I/ }. e) l$ v4 C* u end;+ R/ Y+ W5 c4 g* ]7 G
end;
! U' ^4 u, M0 I6 V4 ^. i) M. Aend; -- of the method/ j: T; Q$ d3 m: S, Y) I
|