/* called by: entrance ctrl of the object 'track'3 V) [( F9 i4 _; m/ z
*/% J" ?# r2 X9 }! k' L! N$ e
is
- w+ _, ~. i* K2 \$ _4 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;% i u! V) t+ i
do! S+ |6 ?9 L# o5 z8 F) W+ E5 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Z/ p, a) S) h! i; X* Z6 Y if current = @.Destination -- else return, g: B0 S# y4 X' r
then4 P" Y! |* I( z+ ?/ u
@.Destination := void;
9 k7 J6 x; M( S- F8 u$ o) D if @.occupied then
' s! o' u! v: K/ U% h part := @.cont;
2 C1 G7 \- |% x- S, X* {8 m4 g, V+ o @.transpOrder := void;
& E# Z/ B# C' x5 f! Q& Q5 B! p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) H) C2 X; j7 Q$ B- g# G5 z. c4 a @,root.eventcontroller.simTime); K, l5 U6 `- `, O1 r% o7 Z4 w
@.HasOrder := false;
$ p) O8 o# ?% U6 s2 k7 ]( f/ Q @.DrivingHome := true;
2 J7 j1 P# t! f3 W: Y9 N& Y rgManager.tryToStartTransOrder;0 n4 [8 \. X. j- s: U5 j2 G
if @.Destination = void3 \$ x2 W- }! k7 a
then -- no transport order for vehicle @
, c6 t# O8 G2 d0 X) u! s; g# ], Q @.Destination :=) _& \/ M8 w. P. \ y$ k1 y, ^) S
rgManager.nearestFreeStation(@,track.~);; l% e7 H/ m( A3 ]4 r1 j0 f. h9 X
newDirection(@); $ ^5 Y7 P7 j2 j
if @.Destination /= void then/ M) W* ^) D5 [& a
@.Destination.NumReservation :=
. i0 [/ r4 z! J* C0 t7 C5 m @.Destination.NumReservation + 1;" `' g( e/ F6 \# d4 o1 V, w# p
end;: @6 z; M! h# S& u. g
@.CurrIcon := "drivingHome";
, F* T6 [9 B0 _1 g, @* o* o @.DrivingHome := true;5 j9 `8 x& k5 i" U0 H
end;7 n1 n3 b$ T. h2 v- f" x7 {2 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 F6 V- D) U* [% C. k4 Z part := @.transpOrder;
4 G& m2 u6 b1 f+ }" s; @- C$ f part.move(@);-- load part
5 m0 _( n3 x, N- s- ]3 E: y | @.CurrIcon := "load";
$ T- n4 C ^% [2 J% V3 u GlobalDistObj := part.globDestination;+ j8 w8 v8 o0 L" {% o% ]. A
assignLObj := rgmanager.rgAssignL;5 @+ v/ n( I' y! C: O2 P: E+ W
row := assignLObj.getRowNo(GlobalDistObj);
4 F! K- Z7 ]' N6 O if Row = -1 then -- since 70
9 c' X: j: ?* U3 e, I6 u if lan=1 then0 C3 T: `) _! O" f c0 t8 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& Y# E; s8 f: D- e
to_str("in der Andockstation: \"",?.~.name,"\""));
* J+ n: J8 w6 i% u, @3 D, ^; h else
* m' i8 R" F/ H2 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ~; y( ]) @& [5 ^' A |
to_str("in docking station: \"",?.~.name,"\""));
, F" w C; e$ H2 u& J. [( i7 [) r end;+ |: @- _ B- u7 n( Z
else. G8 N; r- k9 U6 \' Y
@.Destination := assignLObj[1,row];
6 E8 X% q. w a- M( S end;
; l: F/ ?% O8 x3 r( \5 G0 B newDirection(@);
/ }+ O. K0 D$ F% B @.HasOrder := true;% d. _2 Y0 ~( h1 Z. M( }4 u
end;4 B% @- }6 s! X' U7 ?* p
end;
* q3 h# g( W6 \" r1 Zend; -- of the method0 E4 O3 Y3 g! d+ v) ^
|