/* called by: entrance ctrl of the object 'track'
. L: f1 a* L3 F' i7 h* m5 ?4 P*/3 n+ d6 F( I- [+ b) c, u
is
; J9 \ m% |% v1 G( [! X- T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 z5 \! |0 g, S8 bdo
/ r' |5 z1 g* P Lan := rootfolder.Internal.Tools.AOLlanguage;
5 e9 c; T6 m" f" }2 \! S' \ if current = @.Destination -- else return! j, C! o4 X, G$ J/ y2 s
then) p* ~2 Z3 d2 V( Z. k
@.Destination := void;. D [: s% S y/ R W' N
if @.occupied then- N% a j, ~; B7 h* ^3 ?
part := @.cont;& C+ i1 d# b8 m9 s9 ]/ ^
@.transpOrder := void;$ s0 e, u6 v) T& Y6 X; u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ u* E; O3 e2 V2 J @,root.eventcontroller.simTime);
0 V$ D- f$ M4 m/ h3 O4 E! R& l* V @.HasOrder := false;
( ]: I: V9 t d: } @.DrivingHome := true;# ?( V! q& M7 U/ N4 k
rgManager.tryToStartTransOrder;+ j2 k8 l$ a, c
if @.Destination = void# E" Z# {4 |0 [/ n5 n! Z$ r) b# }3 k
then -- no transport order for vehicle @1 b/ Q" R" O& D# R# B
@.Destination := D- \, g7 R: j( d) _! ]9 f- u
rgManager.nearestFreeStation(@,track.~);! O2 x/ e# e; [2 m9 \
newDirection(@); " x F; X* W# X: n
if @.Destination /= void then
7 @ L9 `1 i! k7 [. f v3 l @.Destination.NumReservation :=* C6 u( F4 z& V0 i1 B
@.Destination.NumReservation + 1;2 D2 ~: h/ O4 K, L
end;6 ?& c# o5 S8 }/ k6 d2 J R* r
@.CurrIcon := "drivingHome";
|7 K M% v, t. N/ M @.DrivingHome := true;
, c% q U% A8 \+ h5 X: ` end;
: q$ ^- n B! F$ u( J% P: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ Z$ v! n: Q6 T" ~5 ^ part := @.transpOrder;
$ B8 s$ G6 E4 `- g part.move(@);-- load part
* B% k$ I* e! r) R @.CurrIcon := "load";
6 n! H; d8 w" \. R# Y% d/ o7 q GlobalDistObj := part.globDestination; v V5 \: q' T8 N1 l+ o5 H
assignLObj := rgmanager.rgAssignL;8 U+ ?$ q4 _; V7 ]# b
row := assignLObj.getRowNo(GlobalDistObj);. O5 N v$ [1 Q4 H: {, O l$ Y0 U
if Row = -1 then -- since 700 _9 R3 p' A4 Q W8 `4 r w, a
if lan=1 then
9 X0 U! L6 R& E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& b" ? \ R0 B3 |) a to_str("in der Andockstation: \"",?.~.name,"\""));
, |( s& ] o$ {. U else
5 u* s0 H' G& m* z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' r* e& ?- H1 V5 J% u' E5 k to_str("in docking station: \"",?.~.name,"\""));
2 ~5 x7 U. Y4 X' Y end;
/ {" q' }. R9 V9 w! p3 s else
1 H- t9 h3 P- M0 ?7 j1 o$ _ @.Destination := assignLObj[1,row];5 U- H$ v. d- ?: Z
end; % B" [9 J" c' N; }
newDirection(@);
# _7 N; t# `3 Y9 Y/ d) ` @.HasOrder := true;
/ K1 d$ J/ l4 ^4 V( g9 y! c end;
) ?2 I% t1 l; ?( |+ Q! y6 b end;- O6 o& `3 J" [) H# i1 o0 R; E
end; -- of the method, R! }7 \" N0 O% l& Y; t8 O
|