/* called by: entrance ctrl of the object 'track'% O5 Y& N$ F+ L( g. t% h
*/
/ O2 O( ?/ C! E% `6 Y+ g. gis
0 M5 _+ e7 ]7 M/ F3 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;. _8 }0 ~# ?9 Y5 l- G
do" [2 \% o$ V4 ^( |' \. Q+ l0 Z" `. n
Lan := rootfolder.Internal.Tools.AOLlanguage;1 F6 D N. @% ]: u; J( f
if current = @.Destination -- else return
, [; f% L; I, @8 l" _$ c4 x then( O2 n4 X- S/ M( B
@.Destination := void;( x' B7 S' S* ^) R0 {9 q
if @.occupied then
$ B4 h9 b) ^4 F2 p0 m part := @.cont;
* Y, h( z, m% w7 ]8 H' A8 }& Y @.transpOrder := void;
/ P: d6 a; }9 ?/ t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 v6 q; I: p' F, l, E
@,root.eventcontroller.simTime);
- b# J& {$ ]/ C! s0 |3 r3 ` @.HasOrder := false;$ P; k0 v) S; o, I' \. [4 q5 [
@.DrivingHome := true;
1 x; l0 N# ^1 F6 v3 Q9 D8 _2 A. J rgManager.tryToStartTransOrder;; L2 m/ x6 {) {* F( L0 Q6 ?" z0 k$ i4 n
if @.Destination = void5 g6 D# c* x8 _9 c3 E% z) I2 g
then -- no transport order for vehicle @5 L' {# |# x# {( V+ B/ W
@.Destination := Q# N4 H. R& J+ m: Z5 [% K
rgManager.nearestFreeStation(@,track.~);, Z5 \% \/ w# k8 W
newDirection(@); 8 [; h* T+ J8 E3 p5 i5 E3 H
if @.Destination /= void then
' b# X7 }4 Z2 ]8 M4 l @.Destination.NumReservation :=
2 k7 d) q% o: Q9 w1 Y" M& B @.Destination.NumReservation + 1;; l; } N! o8 R; ?6 Q
end;- e5 ]/ r1 O. g1 U
@.CurrIcon := "drivingHome";
& {. R9 E7 ]* S4 B1 b! I9 M @.DrivingHome := true;+ \# p/ W# D6 l/ M$ X
end;9 Y5 T/ P) S5 d4 Z7 E8 x, [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ e6 x. R& q5 ^. V h0 X part := @.transpOrder;
3 M& j) b; h. N8 f part.move(@);-- load part
% d2 b8 `( r3 z1 H @.CurrIcon := "load";
8 Y* t) o5 ?( F/ K& `9 g& C% d GlobalDistObj := part.globDestination;
, n# f+ n3 }, y* n0 g* e assignLObj := rgmanager.rgAssignL;
7 u/ @! w8 I) n E' X row := assignLObj.getRowNo(GlobalDistObj);
% R6 @8 ]& m& C% t if Row = -1 then -- since 70* E/ C/ K7 M0 I$ |
if lan=1 then F+ q( X- i7 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ _3 O7 X! n9 h; ~6 O- g to_str("in der Andockstation: \"",?.~.name,"\""));2 a, y6 o* j. u6 p
else
) m* P- {+ K8 |8 S7 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ v( |, Y0 @/ K' s
to_str("in docking station: \"",?.~.name,"\"")); / |' F1 C4 e$ r! |' L/ r
end;
% L/ T0 {3 i, K" C( f) J else2 G$ t4 E3 C1 v; T& n# D1 P. ?
@.Destination := assignLObj[1,row];/ ^2 k* M0 j! l6 V8 H3 f
end;
% ~" k7 `% L! _9 m& G newDirection(@);. r( H- } `' ?2 `
@.HasOrder := true;: q6 q* A5 L) u" U7 M
end;
+ [7 _' R. }0 @# J end;' A3 }7 I7 `- w1 h
end; -- of the method
( {1 y4 z7 o" m. ^ |