/* called by: entrance ctrl of the object 'track'
2 ^- d U1 k1 N( D7 R2 m*/( I. j1 D e$ } s+ W8 P8 W
is
4 _0 I% Q8 t/ D; I1 L- h, w2 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ x: l% K9 s* ddo) O6 [2 X7 i$ @! W' x" P
Lan := rootfolder.Internal.Tools.AOLlanguage;
# r# A$ h7 Z. x if current = @.Destination -- else return
$ p3 V g' W' [! M then
6 m& P: f' O3 [4 J; a( e5 a' F @.Destination := void;3 ?2 D9 l( }9 X5 t3 Y
if @.occupied then+ E" s, ]5 j' s& n& z H
part := @.cont;) G4 i, P* q- r Q' j( Z7 ^
@.transpOrder := void;
3 X1 M( I. k u) K& H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 y6 F" V' l' |( z& }7 |
@,root.eventcontroller.simTime);# b& o: i) \! `: I5 k! Z; v
@.HasOrder := false;
1 P: g0 {& ^* X% m; g. x6 P @.DrivingHome := true;2 v3 j" b6 u# e) E# Q( p& S# K
rgManager.tryToStartTransOrder;
0 o. T6 U2 W7 R" `0 {3 n if @.Destination = void
# L! O$ D( q6 z! | then -- no transport order for vehicle @7 G+ S. ^' K4 j9 y$ e+ U
@.Destination :=, t9 Y' E K( \8 J
rgManager.nearestFreeStation(@,track.~);
- q8 o; @2 q! O# B newDirection(@);
! | }( P* W' n% q; q if @.Destination /= void then6 I+ x+ _, V1 ]. C# W" e
@.Destination.NumReservation :=
* e1 T g% n4 u! F$ r6 g! L @.Destination.NumReservation + 1;- _+ K( Z( @# g2 h/ v
end;; F6 p4 ?2 n Q; P2 e( `. M* c
@.CurrIcon := "drivingHome";
. n z3 x3 W) i: w* Q @.DrivingHome := true;
, e8 d3 _- j" J8 g! ?. Z7 x end;
: h2 P- I f/ n9 |7 R! ~3 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ U+ V& }+ w4 a# P- Z5 K& _
part := @.transpOrder;
+ b( [+ O4 I7 k* n6 Z0 G part.move(@);-- load part* ]. R, Y c6 [7 @: L+ k
@.CurrIcon := "load";7 a1 S A9 |8 P. H) x
GlobalDistObj := part.globDestination;" ?+ t4 R# ^+ p8 `/ r3 B5 h) K) G
assignLObj := rgmanager.rgAssignL;" A' O8 Q6 }1 S& ^2 t
row := assignLObj.getRowNo(GlobalDistObj);
; C) C1 |! ^6 l. r5 u7 ^ if Row = -1 then -- since 70
- s3 t' f, s4 y1 }2 c1 L if lan=1 then" I' ]) [; D0 R0 X! f/ F* Y( D& D% ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 M# B# L; ]5 u5 [: c. ` to_str("in der Andockstation: \"",?.~.name,"\""));7 X$ }% Q P. k/ N1 ^4 n0 _
else
* q/ U9 F7 Z6 l0 l: R+ z1 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 J9 t z* b5 a F* E5 z
to_str("in docking station: \"",?.~.name,"\"")); " L# T6 L" G. k8 l
end;( }7 v6 }; `' L3 W9 [
else
, H/ }5 g, @+ w @.Destination := assignLObj[1,row];
* U4 A2 K% u9 P1 [) _5 ]3 ^ end; ' v1 N( T- `2 O4 Q& [9 G
newDirection(@);5 e5 A! n$ t/ j
@.HasOrder := true;0 m I& E" h/ a6 N
end;1 p0 H5 f K& a( Q6 e/ Q6 `4 A
end;: o4 O7 j/ Z; E) z) F, A
end; -- of the method3 h1 q; @8 W2 d- U7 L }
|