/* called by: entrance ctrl of the object 'track'
9 d3 Q3 E2 ?5 T*/
. \# @5 \; _( His
5 L+ G2 l4 A* k. G0 `' K7 m& p2 P1 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ r U9 d0 Z, u7 a6 _ d5 _/ |
do/ x7 n& s/ J- Q7 q
Lan := rootfolder.Internal.Tools.AOLlanguage;% z! b9 R* F' r0 H/ P
if current = @.Destination -- else return7 E: l0 `4 E# E' F
then
) V }& o+ v. z7 T/ k! O, ^ @.Destination := void;
# Q* K d5 W; {0 t w if @.occupied then
- D# H) P' D, `+ A part := @.cont;/ y2 H) o# N7 \3 b" T
@.transpOrder := void;
$ e5 l2 C% Z/ j: a4 p/ }; ~3 |; [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 W: t9 I" }3 W' i1 o1 ? @,root.eventcontroller.simTime);
* j k( h' p4 e$ c" V- T( C @.HasOrder := false;
; X [/ S9 U3 m9 Z7 Q& }- I; p* E @.DrivingHome := true;
7 G4 q3 o4 a0 \! I4 r1 o rgManager.tryToStartTransOrder;
4 E) |! j5 l8 z8 J& c8 X) j/ y( t if @.Destination = void
6 E B& w/ G6 `" ~- p* T! ] then -- no transport order for vehicle @
: p$ a8 n0 b/ c @.Destination :=
7 L+ e/ G/ w- {5 v8 H rgManager.nearestFreeStation(@,track.~);4 y+ ?) w1 Q2 G( ~4 J. s
newDirection(@);
6 C/ h: g$ p: X& b9 w if @.Destination /= void then" N* W# p" ~: I3 I- H7 c
@.Destination.NumReservation :=
2 p; ~& |& j" O @.Destination.NumReservation + 1;1 L Z5 e+ R/ D" @
end;
0 s, a% V; o/ `9 X @.CurrIcon := "drivingHome";3 A. g x$ [2 y' h! |" O
@.DrivingHome := true;. T0 `6 O3 t$ V' H, M
end;( H" J# C' ]8 ?4 l0 `/ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% B' u4 ~) @1 P3 y. L _4 S/ W4 ] part := @.transpOrder;
Y, A9 P5 e/ n/ u3 r1 j part.move(@);-- load part
4 H4 F5 `+ u1 B% H3 u @.CurrIcon := "load";: a* P3 ~) O& L/ @/ g" S7 P
GlobalDistObj := part.globDestination;" E% w; G& n# s0 v( }: l
assignLObj := rgmanager.rgAssignL;- ^ ~# ?# a- x3 t+ M
row := assignLObj.getRowNo(GlobalDistObj);7 z* K' `% {) K# s; i
if Row = -1 then -- since 70
2 n1 g$ l; B8 i" T if lan=1 then
2 d5 G; e) z8 Z( ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
S& J' @1 f( ^ to_str("in der Andockstation: \"",?.~.name,"\""));
/ A, T6 F, d7 @) f s4 i4 H, x else
& a% U9 ~4 I6 @; C" e$ t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 B7 ?; y, ]: J8 V* M to_str("in docking station: \"",?.~.name,"\""));
, j" s( l& g* x1 e* o6 Q# o end;- p7 `- \1 H8 w: C/ B
else" _- K0 x7 [( ~. ^% d
@.Destination := assignLObj[1,row];. B$ _# D \ j$ j. _
end;
6 _" M3 X# U7 O/ n newDirection(@);% P1 d' e3 U9 {" \0 |- r8 L1 ?# C
@.HasOrder := true;
6 H. ~/ A: T5 T* I4 i% q9 l- I end;) c8 E! |2 b& ^
end;
' ?" X% y7 Q7 J6 L% Aend; -- of the method/ M, _5 ~0 e7 f
|