/* called by: entrance ctrl of the object 'track'& t& e- t, [: k) ^7 ^) T ]9 G: @
*/9 d8 M u7 E. |2 d
is
* x9 R$ K9 [- U1 c- X5 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. b6 E* \7 N. a6 F7 j3 C. vdo
7 ~3 C; g' [" a/ U9 l5 u Lan := rootfolder.Internal.Tools.AOLlanguage;* l. `) o3 D# j# D3 W
if current = @.Destination -- else return/ J( L: P7 D+ H& Y/ \2 h3 e6 x6 t
then4 m' X* n/ o* [) M. _6 _4 Z; h( U% e
@.Destination := void;
/ R: C- V9 l" t& t if @.occupied then0 o9 A$ L) R% [% g7 ]9 G& f
part := @.cont;
, T+ l9 e3 n; P# e4 l @.transpOrder := void;
" } w/ I- |/ M6 L, h6 G# ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 D1 ]" g7 @, z0 i1 A
@,root.eventcontroller.simTime);" l' h' |! ?7 v% [8 G
@.HasOrder := false;( f( o9 ^& `" ^3 y/ q0 u5 s
@.DrivingHome := true;8 s3 J/ d" x2 ~
rgManager.tryToStartTransOrder;
/ Y9 u& u. s, Y if @.Destination = void( g8 Z, `: }! D+ t
then -- no transport order for vehicle @; C: v& L' i% @- B! i% q' L
@.Destination :=4 l- G( N% W2 r7 i; O' [. R
rgManager.nearestFreeStation(@,track.~); h7 @7 h( C( H, b- u* v b8 P
newDirection(@); + l) v# ~& I5 [5 z7 t [9 i/ B) z
if @.Destination /= void then. d6 W1 l& L' w
@.Destination.NumReservation :=1 A/ W' E4 P2 W# p$ u
@.Destination.NumReservation + 1;
2 h6 S8 p) c3 w) [- x& O' n end;# d1 P7 z- F: N
@.CurrIcon := "drivingHome";( p) N; f) ~. P$ l1 p+ ?6 J
@.DrivingHome := true;8 c; n" b9 ~2 G1 P0 R; O9 h
end;
: y7 U' Z9 \3 O7 h, f else -- the vehicle @ is empty, both vehicle and part are in the same dock station d* Y: [! A/ q. c: t% z3 u
part := @.transpOrder;
# S/ S% d0 ?, ? part.move(@);-- load part
! v7 O/ Z$ y. r, I* ?( M) F @.CurrIcon := "load";
2 A! s, }1 s8 P1 d GlobalDistObj := part.globDestination;
1 A7 b% B* @+ {1 a assignLObj := rgmanager.rgAssignL;
! d9 [# n" Z& M- d6 C row := assignLObj.getRowNo(GlobalDistObj);9 A. C% \/ ]+ R
if Row = -1 then -- since 70
$ E3 w3 \$ D5 j4 v# Z9 N if lan=1 then% k1 L7 v& o/ i ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 I2 l, d" k9 q! e$ S to_str("in der Andockstation: \"",?.~.name,"\""));, _- v/ i( F$ L: l
else o# Y! U4 w9 R( Q; q+ i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ [7 ^7 C2 @4 c; L4 f% G8 M5 H/ q
to_str("in docking station: \"",?.~.name,"\""));
, B5 O9 E( O# N" U/ U1 W end;
; y& W6 i# s: {4 N else
d1 i$ b# l1 |& ` @.Destination := assignLObj[1,row];
4 o5 K! P' l r2 m( z& z end; 4 A% M/ K" ^1 `. s! [+ ^8 z
newDirection(@);+ l6 z! Y& ~! ~' f0 W
@.HasOrder := true;
4 d, ^6 j; a5 H1 \" }. k end;/ A+ V# Q, a3 R- h, _. p
end;+ c8 T, |: R1 [. p3 ~0 `
end; -- of the method: k X' m: a7 l, H$ h* g/ d
|