/* called by: entrance ctrl of the object 'track'2 l7 }2 a9 r. P6 f- J8 T7 _2 o6 b
*/# {( {/ e* e5 r/ b! ^
is( g( t+ T4 P9 {6 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. c# n% X& X3 c- w% E- o- ^ ^do5 n' Q- X3 i3 |
Lan := rootfolder.Internal.Tools.AOLlanguage;* f' n6 o" w* U3 [
if current = @.Destination -- else return* x( c9 \4 W+ `2 {; L9 V$ g
then
, y$ [7 J/ Q0 C; A @.Destination := void;# V7 q5 V' C/ a4 @
if @.occupied then
& Z; {. i. X/ ?, u- d part := @.cont;9 C) t" C' V9 P0 O( N3 ^
@.transpOrder := void;6 M8 Q5 ` k! a4 a( w8 N! a) h4 B* J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. J; ^& \' O" u0 @1 _- {. y
@,root.eventcontroller.simTime);5 x* H/ m N& i
@.HasOrder := false;4 A8 T* X8 k. r$ H& s+ ?/ h; |8 e
@.DrivingHome := true;
2 q% L( P/ O+ q& S: s$ S rgManager.tryToStartTransOrder;/ q$ D# n3 [6 q0 ?5 A; g: w
if @.Destination = void
7 q: Q4 h# l) D6 S then -- no transport order for vehicle @0 K4 E, ]) ~$ \8 Z
@.Destination :=' r) W7 H3 F) T7 E
rgManager.nearestFreeStation(@,track.~);" u% O; t+ h* W1 M& [3 u. a
newDirection(@);
3 }4 L8 W" p" k" N8 V7 L. j if @.Destination /= void then$ h+ w; D" I- y7 z
@.Destination.NumReservation :=
9 t: k* S5 O# N7 ?0 V @.Destination.NumReservation + 1;6 R' j m4 x# {" {5 F
end;* @4 d7 m2 |3 F& T6 P, g
@.CurrIcon := "drivingHome";
, O2 @+ a3 |, s8 c' g A0 E @.DrivingHome := true;8 }7 D, S) E; T4 f0 Z( k9 D
end;
5 o# V1 v# ?; r/ D. u& L9 F% A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 i& _% k9 V4 s/ s part := @.transpOrder;
& X# |% A$ O4 j+ ~, w part.move(@);-- load part
! ^1 g# l0 y8 ~9 h @.CurrIcon := "load";% n3 w- r1 Y: X& m* l' J
GlobalDistObj := part.globDestination;7 {. S+ C0 e! d- ^9 i4 z, O
assignLObj := rgmanager.rgAssignL;' b! n' |4 {' r0 g3 M- s) Q9 C& j7 G
row := assignLObj.getRowNo(GlobalDistObj);5 Y- R3 @6 T8 J
if Row = -1 then -- since 705 M9 S/ k& A5 `8 X( S; R. J" F
if lan=1 then( _8 p7 p, e, D$ o; R8 t" ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," N w8 o% Y9 ]* f+ k1 O
to_str("in der Andockstation: \"",?.~.name,"\""));5 c3 q+ N1 i& m6 Q0 z, j
else
+ O b3 S U' ?* s9 g5 r. o0 _4 I) Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 `0 N: [7 O2 l3 ]0 A0 [; p
to_str("in docking station: \"",?.~.name,"\"")); 6 s$ O8 W" v5 n
end;
7 j, X* ]6 o& ]1 M2 u9 B) @1 ]7 I: m else
3 s) d M, T1 a1 [+ {$ I @.Destination := assignLObj[1,row];" f8 Q4 k2 M+ ^4 w/ a* ]# K) w
end;
2 s( g5 t9 `9 [$ z7 E: _* u newDirection(@);
, T* S. C' ?, C$ n& c @.HasOrder := true;4 W* u& r* t1 M* z
end;' `8 F. W9 ] W! O
end;
( R! @* F# c( H$ kend; -- of the method
+ Q. F( W% e1 M3 a. n! L6 _ |