/* called by: entrance ctrl of the object 'track'! j# o. z6 t I' {6 c7 h* G
*/1 r& k. x m3 h' F# \9 Q
is
! x/ H$ @# M! ?! v part, GlobalDistObj, assignLObj:object;row,Lan:integer;" {4 k8 W# i& W/ h
do R+ h/ }8 V. Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
# q7 m- e6 O/ q! i/ b& _ if current = @.Destination -- else return6 I9 w9 x/ _( A: B
then
- ?2 l; o. N1 `, n: w. r @.Destination := void;
0 I4 r% Q* E6 K/ J6 c1 ^ if @.occupied then: i, T- D7 ?1 C4 h% M8 W8 s; I, p
part := @.cont;
& ^8 ]; Z; l- S ` @.transpOrder := void;
: w& c0 N: a0 f8 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," d, w M1 |# E6 Q# _
@,root.eventcontroller.simTime);/ k' G/ U! g+ t2 Y: @0 q# `
@.HasOrder := false;
6 ?* g$ h N; K, ` @.DrivingHome := true;
Y4 |2 d* j0 C: c8 g rgManager.tryToStartTransOrder;
. I6 `( o! e0 t. S, C6 f2 X if @.Destination = void
8 H2 X' V* d$ \# |5 c* Y% E then -- no transport order for vehicle @
6 f8 Q0 v2 i0 A* Y @.Destination :=
) U. H) b$ R! o Z: v1 U; i1 I rgManager.nearestFreeStation(@,track.~);
' i z; N0 p) ] newDirection(@);
9 Z6 S+ _/ t7 @* D+ C if @.Destination /= void then
. ]7 O$ Z+ K* ~3 A) q# q' }$ ? @.Destination.NumReservation :=1 v, }6 [* ^+ e) ]4 N F6 K4 Y
@.Destination.NumReservation + 1;6 w$ q7 [* k% ]$ w# P+ e" v
end;
; B) R% k& u! g1 D: ]- T7 L @.CurrIcon := "drivingHome";/ I- U4 j# W f4 J7 t" E) a
@.DrivingHome := true;
2 m% W/ W6 k3 r5 x/ J end;
2 u- i0 y' ~/ n4 A: V# H) a8 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
v3 E& K8 _" ^3 ]$ V% Y part := @.transpOrder;
; u" Y" ]8 y5 ^9 x5 L part.move(@);-- load part6 v; V" a- P2 P: R
@.CurrIcon := "load";+ b4 Z- ?! s& h" r8 P0 }5 h
GlobalDistObj := part.globDestination;
# ~, r# F% k- c2 ]1 J assignLObj := rgmanager.rgAssignL;! D) f. \; D7 f1 A( f& S; f
row := assignLObj.getRowNo(GlobalDistObj);* y4 m4 Q, f- j4 f; f7 d
if Row = -1 then -- since 70
! S* Q) \. `- B4 E3 s$ M( c1 u if lan=1 then: J9 R5 ^$ s4 `, u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 V$ B5 |) {( A" P. c. O' T to_str("in der Andockstation: \"",?.~.name,"\""));
" k& z6 C0 D) f6 m' b# W) ~; j8 X else) |- f! v* a# f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: e5 _( c+ S* R; n7 P" v
to_str("in docking station: \"",?.~.name,"\"")); " |# D& c7 ~3 _7 Q
end;
! Z! E7 g1 E) c else5 v/ U C! n; ^- ~8 A5 b
@.Destination := assignLObj[1,row];
0 P6 a- x4 c z end; ! L0 K( c3 I% E. n) b8 _! X
newDirection(@);
+ p5 _ r z, y! m% ^ @.HasOrder := true;; l, h6 C# p7 s" m* J# P
end;% `( W2 L& x0 z* ~
end;
' r/ r4 W+ U; G& q- \- G0 _end; -- of the method/ y. T1 N+ `. d# ?* g& e }
|