/* called by: entrance ctrl of the object 'track'
. c! o& V7 \0 u2 R8 U*/! g8 f; a; U1 @: `% O4 L0 \
is
+ i6 D B. L3 c9 D/ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ z$ i" w: M' z1 ^8 P0 W0 g1 E6 u
do
y( H# [: T9 @ @ Lan := rootfolder.Internal.Tools.AOLlanguage;) B5 q, s9 w) f3 |0 x- f
if current = @.Destination -- else return! D& A5 a) h4 B9 a) B1 q
then5 a' U% a% C/ U7 w- b+ j7 h
@.Destination := void;" m3 [) a! J7 _' @# N9 G6 x
if @.occupied then
& f2 h; o7 [9 r part := @.cont;
5 \$ g2 M" s K @.transpOrder := void;& l" C% G" L; D5 r g9 o0 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* C! k2 j% K+ J0 C" z @,root.eventcontroller.simTime);( {3 ^: \7 x5 d
@.HasOrder := false;
/ F: q* q. Z& h; N: l* L @.DrivingHome := true;5 U7 n3 z( K4 x _& C
rgManager.tryToStartTransOrder;
& E/ D, P+ S& S4 D' l" W if @.Destination = void
3 b( G; v7 A4 R# x% ? then -- no transport order for vehicle @5 ]. m0 {5 H/ S
@.Destination :=: Z1 ?8 g9 p% _# h5 b4 F A
rgManager.nearestFreeStation(@,track.~);6 k( p w6 a, ?3 a+ a
newDirection(@); 3 e5 g( q7 M( w( M
if @.Destination /= void then; n8 T. m) a( O: {1 T+ Q
@.Destination.NumReservation :=
; W6 \) x7 z" Q @.Destination.NumReservation + 1;( ]+ _8 O2 F$ u" _8 t6 N
end;! b* U5 v6 { M0 I" [
@.CurrIcon := "drivingHome";
6 r: b' |3 C; S& y @.DrivingHome := true;
# s. N* \- V4 N/ i3 E1 k end;
4 Z; N. v3 o. Z7 ?" Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station) q: i9 \9 {; |0 B# ^- B- p6 {% e
part := @.transpOrder;
5 w9 f& G8 E L' j: S) ` r part.move(@);-- load part
: I. D% y# |! |& a5 b7 n/ V2 U @.CurrIcon := "load";/ H* h( _3 d# o5 J& s
GlobalDistObj := part.globDestination;" R' w6 }( i* l4 x% ^3 i
assignLObj := rgmanager.rgAssignL;
5 W0 a. H' I8 [* |% ~ row := assignLObj.getRowNo(GlobalDistObj);
* S: T+ w3 x }6 \: \# A4 c9 Y if Row = -1 then -- since 70
, h, u' j: F0 G+ s1 \% c if lan=1 then
. t" h( d! c- B, @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* H8 \1 K+ N2 k" r4 E( B' @
to_str("in der Andockstation: \"",?.~.name,"\""));- I l+ [2 A8 ] S% N
else
: u% d# L& C- B7 m' H/ y1 K- K+ F/ O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; b0 f9 z, P0 E; m
to_str("in docking station: \"",?.~.name,"\"")); + R/ L1 J* f: x: V) B
end;
: L$ U0 M9 d6 g. u% }# T else5 k. r5 U! Y6 m9 |. y- T# j
@.Destination := assignLObj[1,row];
5 W# X" q. M9 O end;
' R" r( i% K- D newDirection(@);
7 m# z# h% I! U( ] @.HasOrder := true;
' a* h9 x u$ G5 V% L end;8 Q' k- \( }& E8 M, d: s
end;! c. u O: E. ?" U
end; -- of the method$ o0 O/ G% d7 K# U. N* q
|