/* called by: entrance ctrl of the object 'track'0 E: X5 J* G b1 ^9 L# w
*/
: C; w# |* K Y/ V3 ^( Q$ _$ B- Ois% |) |% n6 N# K8 g2 r. d% b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 q' T, M9 f+ R, P( e( Mdo. M" Q. W1 `, L
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 c) ~% M" [) N1 i0 C if current = @.Destination -- else return
8 ?2 L6 r) k$ o7 A5 X. Q5 C$ [ then, v) u! C3 X) g, n7 z" T9 j' s1 K
@.Destination := void;
: y# s; G% |. A2 a" ~ if @.occupied then
" o% ?. Z3 X: N part := @.cont;, y& d% Z: _1 m* u& l$ q
@.transpOrder := void;
1 L8 `' |9 {& ]5 i, W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ t4 U4 f% f! M1 M; z8 w# w3 R @,root.eventcontroller.simTime);
& F }) V7 r" d& j. l" f' W @.HasOrder := false;! Q U- z: ~0 e2 F$ |0 b
@.DrivingHome := true;
0 i z5 R/ s) @ rgManager.tryToStartTransOrder;% {# M5 E8 d4 W2 g1 K6 M
if @.Destination = void
$ H" q ?/ H2 w5 k then -- no transport order for vehicle @
' J. ^2 I7 f8 s- r( Q0 _3 |* Q @.Destination :=
6 K! m3 k4 U5 s* _! X rgManager.nearestFreeStation(@,track.~);* U. W% s" H% [3 M1 u( v" _. K
newDirection(@);
/ ?; f( w. a8 y8 P: v if @.Destination /= void then5 F7 a1 X' \$ X) G Q; D: z
@.Destination.NumReservation :=' G& {! T, \$ H' _- B+ x
@.Destination.NumReservation + 1;, R. C1 ] W, W
end;
3 @ ^" z9 u W @.CurrIcon := "drivingHome";
% J9 N, n5 b+ L& P @.DrivingHome := true;" h' I: B) A& N0 t8 @
end;4 A7 {0 M; w/ |* Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ p6 N& |: \4 Y3 ]" N+ a
part := @.transpOrder;
3 t! n: `* x% j' ^& s part.move(@);-- load part
9 m3 K J6 a# a) S @.CurrIcon := "load";
9 Z# h& G" V$ Y& l( i# p: K GlobalDistObj := part.globDestination;8 d, Z- W% L% H$ R$ d2 x/ ~7 [
assignLObj := rgmanager.rgAssignL;
8 h. i% m0 p9 e6 E row := assignLObj.getRowNo(GlobalDistObj);
* u& D' b+ R& M: ]0 C if Row = -1 then -- since 70
5 b5 Y3 R5 Q# x2 O# i K4 a if lan=1 then
$ c' \3 U2 {# f& H- K* ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
]& B; V$ |" X4 ]5 v& Q3 y to_str("in der Andockstation: \"",?.~.name,"\""));+ V" y' _& o. o5 O; k' e6 K
else
9 z6 Z0 E' L/ J; X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), ? S. I* A- n" d [) A
to_str("in docking station: \"",?.~.name,"\"")); ' {$ J$ b5 N/ \! y6 n' s1 ~
end;
* e4 ~9 C: V2 n2 i* k2 J! Z else
& Q* n) P9 h* N; S @.Destination := assignLObj[1,row];
- B- n8 ]+ k2 W1 a" a5 |0 Z0 W* I end; : d- N1 }% m+ g2 x% [/ H9 z
newDirection(@);
6 M' ^: X& j! S5 V @.HasOrder := true;! y4 `5 t* V; K# D
end;" N2 W, z, K# p9 F
end;+ M- _! q: n, M7 H5 W7 r$ p
end; -- of the method, e+ j' y! J2 m0 P
|