/* called by: entrance ctrl of the object 'track'( E2 s- K: N; D( _
*/: ~6 q/ ]( g6 J) M# A8 l
is2 v! z2 p6 t' {! c; J! k/ d7 B. l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 E* `% ?. B0 }! x% edo
( e) k9 R$ K$ t Lan := rootfolder.Internal.Tools.AOLlanguage;6 T* j7 i0 w6 x8 E/ [& F: P
if current = @.Destination -- else return
9 D( ]2 X$ c% I( e6 v, @% }5 j then
. b8 ~9 m" u7 X, A- o @.Destination := void;
8 t: C, {8 T- T7 d6 F2 } if @.occupied then+ o. p8 D* q. ]7 L9 ]
part := @.cont;) W$ V3 D& [. p1 W9 z! A
@.transpOrder := void;: U. X; h1 G7 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 ^, B# K, m/ h, O4 a
@,root.eventcontroller.simTime);" `6 l8 {) ^: V) `; c
@.HasOrder := false;
8 `6 h* R; K8 B Y; b0 T @.DrivingHome := true;3 r$ r: r0 R9 o# H+ _4 a
rgManager.tryToStartTransOrder;& g3 l+ b* x! l
if @.Destination = void6 G7 j2 n! Z3 j( `& V( m9 n
then -- no transport order for vehicle @, N' \/ ~3 e+ k# F' ?. R' H& t
@.Destination :=
. ]- v" {8 S# i1 _2 G) F! r/ o( a rgManager.nearestFreeStation(@,track.~);
# C1 @. Q5 _; r% l6 Z newDirection(@); - {3 G/ M3 a: u M7 [# Y2 o
if @.Destination /= void then, \. C1 @6 H) w( i9 G. N! q% N. V* V
@.Destination.NumReservation :=$ t8 C& P1 E6 S% {- ?' O9 G
@.Destination.NumReservation + 1;
, A- G P" Z C% K end;3 I. R6 ], ]0 i0 I+ o- |
@.CurrIcon := "drivingHome";
& G, g# H1 M3 |" h9 e( N @.DrivingHome := true;
7 R+ v" R9 Q2 K4 W T! \$ E- k end; {2 y6 e6 `' o1 V0 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% o( D' V' F# B5 v part := @.transpOrder;
4 t \& }6 Y' H6 i7 E. z part.move(@);-- load part
5 C' ]' Z6 ]8 x( g; b @.CurrIcon := "load";$ N4 Z" L' t. P/ \1 E
GlobalDistObj := part.globDestination;" U% Q/ d3 s) U
assignLObj := rgmanager.rgAssignL;2 {, e4 s3 M( H4 R1 k; b, S3 }
row := assignLObj.getRowNo(GlobalDistObj);
! T( [+ b& ^4 T+ c5 ~# L8 a1 O) F if Row = -1 then -- since 70
' G% s7 F! x% a3 _3 ~; r if lan=1 then3 I( I" [8 m8 k+ Z1 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 W. [: k# Z) _# A' F
to_str("in der Andockstation: \"",?.~.name,"\""));
O- h- D1 N' x h+ W' ? else0 Z: u1 m7 r) G" l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 s( y; i J, u, Y. M to_str("in docking station: \"",?.~.name,"\"")); . H) F* I& B& J: v" }7 q6 Y
end; I- y: J f Q. { X6 f: B
else E. ?( W0 x. G3 g
@.Destination := assignLObj[1,row];$ ]& ~3 Y7 Y' L( e4 ~/ u, J, T% [# b
end; # J. k# l$ Y: Y; C+ Q: a) J
newDirection(@);
- N7 x: `$ A4 i: }& Y4 z @.HasOrder := true;; U# _7 m! ], O. X% [3 [( t
end;8 ?, `/ \; s% M' t( u; s
end;' b- U, Y- W: e/ z# h9 k
end; -- of the method
t M5 i9 X+ k) y6 ` |