/* called by: entrance ctrl of the object 'track'
, _: B1 r" S$ e5 F0 r! `- @*/
- }" r3 ^3 v j1 {" e- B3 ois0 U7 E7 b& V% m: g. n5 q8 U- C) n
part, GlobalDistObj, assignLObj:object;row,Lan:integer; K! f0 g6 J6 X$ Q5 Z6 |7 p8 A
do
/ g: A: e; [0 ~2 s& D( j Lan := rootfolder.Internal.Tools.AOLlanguage;" P8 U# T2 d: [$ n
if current = @.Destination -- else return
: b `7 h; h# ~/ d then
+ j& N4 k: |) G1 \" h @.Destination := void;
9 a7 @& m+ c: \; [' B if @.occupied then; `1 x' c+ y1 X, d
part := @.cont;
/ _1 |3 Z2 u- n# q7 h- C @.transpOrder := void;7 j! V* Y* t) y, t! E! s3 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& H* g: ]* V+ \5 j# H @,root.eventcontroller.simTime);
7 `! b- B3 C1 U$ |; e @.HasOrder := false;, b6 o2 y' c( V/ ^' u6 l
@.DrivingHome := true;
5 `1 k, c' @: ]8 n5 r) b- p! H rgManager.tryToStartTransOrder;' h9 H( y6 U5 O7 ]$ e6 e
if @.Destination = void
- p# }- d0 h. v s/ W: s5 v then -- no transport order for vehicle @
% U# h1 }/ J1 O* R$ F, R @.Destination :=/ j& e% i8 X% x" I
rgManager.nearestFreeStation(@,track.~);% o, b4 r; ]( z0 a4 n- Y
newDirection(@); * G$ c) Q9 J& Y5 x8 P: F
if @.Destination /= void then
( |7 H+ ?0 r8 O! n1 ^# l; c @.Destination.NumReservation :=# e- h4 }+ j2 j7 M: @* p
@.Destination.NumReservation + 1;
" i, C6 x9 [$ |! K end;
! B) ~- W: o! ]" N @.CurrIcon := "drivingHome";: H% ]4 p- X2 J& F+ V% b9 ?
@.DrivingHome := true; R" I! `3 G: q0 I0 E
end;
2 q% ~2 T: n% [( c. X% Y2 w+ [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 q/ A6 m, k" |, `& T; _1 e
part := @.transpOrder;
) }, {6 K& G; k, R, ^9 w part.move(@);-- load part
, X; G! A+ k/ u' L( y$ V; a* r3 w) Y @.CurrIcon := "load";
- [5 Y1 P8 X3 L GlobalDistObj := part.globDestination;
6 \" h d' c* k5 U! S assignLObj := rgmanager.rgAssignL;
; a& B5 V* ^" |7 O row := assignLObj.getRowNo(GlobalDistObj);
8 P4 s5 N6 S$ i if Row = -1 then -- since 70( N9 V; Q0 x. j' u" [' j
if lan=1 then+ g$ f4 X; P# ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
e5 H/ H( ^$ \* r to_str("in der Andockstation: \"",?.~.name,"\""));
0 j6 \# z @1 |) Q. I7 h6 E else
# z) E3 U$ e' v+ e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," Y: }/ A7 {* B" v$ ^( P# B& n0 X
to_str("in docking station: \"",?.~.name,"\"")); ; F0 R4 J4 x1 E8 }
end;
9 r% [# o6 \$ i else$ h5 r/ e6 E. {1 _% V( Q
@.Destination := assignLObj[1,row];' }, t+ x# t- k
end;
4 B5 I7 n4 y( M newDirection(@);
$ f- t. M$ C+ t: T9 G @.HasOrder := true;" v$ h, t" q; Z7 y$ l
end; f: I. B- H" N$ n% P
end;
4 i0 L- g; l0 q" fend; -- of the method
* o: |3 A. V3 C" j A |