/* called by: entrance ctrl of the object 'track'
; y1 T/ Z1 E( }/ h; W6 G$ s% q*/
3 p& F2 c; [3 a% K( E8 [2 tis2 a: C* T3 A) {, V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; T* L5 f# S" V" q; S" l1 l/ Xdo- u3 n j1 u! \$ y) \
Lan := rootfolder.Internal.Tools.AOLlanguage;% q* W' @; ~) W* m% O: `
if current = @.Destination -- else return$ H+ O: C! E: o
then
( A/ `: h2 i% ?. h# b* P @.Destination := void;
! S$ z2 N: X, e _- _5 T9 T if @.occupied then' Q: e2 r7 t) c3 \/ L2 E
part := @.cont;
$ \: t- `3 Q9 U' N% V @.transpOrder := void;
% T1 r* x% ^! i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 i, q" ?0 J; T# } @,root.eventcontroller.simTime);
8 E' X! ?) s2 }) b/ o) s! D" e2 [ @.HasOrder := false;
8 a$ q U$ b4 z+ y @.DrivingHome := true;
# R8 w5 E+ ?* S8 g; i) W( B rgManager.tryToStartTransOrder;
& \) Y$ t' X2 n4 @2 l; i if @.Destination = void
2 z% T6 Z! p1 b0 M1 j then -- no transport order for vehicle @$ r. z: V- ~& X3 A: n
@.Destination :=
/ K* ?1 U! }* N! g1 P rgManager.nearestFreeStation(@,track.~);4 j2 h; K }7 a" R% a* d
newDirection(@); 3 e$ ]& V# P- I7 T T. y0 @$ e. R
if @.Destination /= void then
9 L' g1 I" {) V- m. U4 { @.Destination.NumReservation :=
! l* p0 w* }+ D2 j @.Destination.NumReservation + 1;# G# ^* R; V }, _
end;1 N, N& i3 u# F
@.CurrIcon := "drivingHome";7 ]% J) s, i8 R7 m. }3 _
@.DrivingHome := true;
9 f( S% ]7 Z* A* `' [: q end;9 O8 {# d6 v+ w3 P# C9 f# U' w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% `" b" z9 q+ @ part := @.transpOrder;$ t& r! H; \$ f/ ~5 H
part.move(@);-- load part
3 t3 Z. |# L! J* S+ g6 u& e7 M @.CurrIcon := "load";4 E. T( p+ V1 @* L Z
GlobalDistObj := part.globDestination;
4 B' e: X, ^' X assignLObj := rgmanager.rgAssignL; c# ?' a9 r( D
row := assignLObj.getRowNo(GlobalDistObj);. w$ x, d/ e( l8 s
if Row = -1 then -- since 70
9 ]# j: T! l# E! p5 m if lan=1 then) r+ ?9 j% P1 Y/ s* Y+ @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: V) q+ D: V* @ to_str("in der Andockstation: \"",?.~.name,"\""));
: g$ D! l: G6 ]9 @ m. A else- l6 n# T V% M$ a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! k8 }1 P) Y! E8 @/ I w/ |
to_str("in docking station: \"",?.~.name,"\""));
$ Y$ U5 v3 A! { end;3 Z& o6 [3 J; U _2 L" n
else
, W1 F% M8 R3 t2 g" \ @.Destination := assignLObj[1,row];* z d; F( z* q+ @7 T- [
end;
) a! v7 Z: O4 J2 r, ?; O; l newDirection(@);
0 V$ s, B* \+ q8 q5 ^& K t @.HasOrder := true;4 t Y( V6 d- H5 j7 |
end;
# B8 R$ F2 v, s/ }3 C, P2 t end;. x8 N0 k0 O- u8 o# m5 t8 Q+ j
end; -- of the method
) x" T# H8 Z( d. j" h$ |' j" @ |