/* called by: entrance ctrl of the object 'track'
1 H0 B& M- R3 V. S! F, G6 |*/9 a5 @* P. T7 m- n# b3 u9 F
is
3 n/ b: V4 N5 r+ b$ N" g( ~% ` part, GlobalDistObj, assignLObj:object;row,Lan:integer; U) ]( [9 F5 U" R$ j
do. z" Q4 G6 ]0 x9 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
, H- @$ I# [" Q/ Q if current = @.Destination -- else return. z6 o- _. A$ h6 y/ D
then
2 c- f w3 m/ Y @.Destination := void;$ p2 R- q* [0 B# k0 Y
if @.occupied then4 `& u9 k# H; r
part := @.cont;
$ v1 _4 }( `7 t/ u; M* r. f9 o! U @.transpOrder := void;
6 r O* t- f8 {1 j- o5 R* A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( d2 C0 a. r2 y1 s$ V! t
@,root.eventcontroller.simTime);
, Y; P, P2 h7 [* [* C' O @.HasOrder := false;
3 e& M3 ?4 ^$ H1 A/ M @.DrivingHome := true;
# {$ i, a9 D3 Z! q rgManager.tryToStartTransOrder;5 f* G; u$ W: b$ T. W0 h1 L4 B
if @.Destination = void" h8 ?$ @8 |3 e
then -- no transport order for vehicle @" X9 d7 ]- B h4 k4 A" m
@.Destination :=' j! I, W8 } P6 h/ @. D" P
rgManager.nearestFreeStation(@,track.~);
8 x9 H4 Q# `4 C6 M3 w0 b$ Z0 x newDirection(@);
% F7 R% Q1 \* D! Y3 [$ i8 [ if @.Destination /= void then$ a! r$ W4 p0 K( n9 [' i
@.Destination.NumReservation :=0 @. t* I* P/ x* V& }
@.Destination.NumReservation + 1;
" K+ T6 A% k7 Q8 E& N7 X9 \ end;8 U* ~/ ~+ D p5 Q% s5 y* S
@.CurrIcon := "drivingHome";
9 `' R# l ]* c5 e" { @.DrivingHome := true;# H8 h& k$ }' _0 x7 s }
end;) {6 |( r- x$ V5 H6 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" R' S0 \ ~3 m& f, \ q. C
part := @.transpOrder;1 C- j+ {7 `0 Q7 z2 a# ~8 ]
part.move(@);-- load part
* g" z% P# P9 O! _% @( v/ _; b) r @.CurrIcon := "load";
, R% Q, O/ C: M GlobalDistObj := part.globDestination;
3 E: z5 ~6 ^0 o2 v( B. H assignLObj := rgmanager.rgAssignL;: d5 ]0 i$ F: A9 {6 E. e- O
row := assignLObj.getRowNo(GlobalDistObj);
Q/ h. u! f( d; P if Row = -1 then -- since 70% Q% ?( ^# m. n" r- `* n: M* ^& d9 p
if lan=1 then
! l \' a* P0 m+ k* c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 |7 l8 k" q* g
to_str("in der Andockstation: \"",?.~.name,"\""));0 N+ Z) v' b$ R3 }: Z9 f: Q
else
- ?( H. J7 b: _/ e$ f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ~. u3 |/ N ?5 X! Z) c. r to_str("in docking station: \"",?.~.name,"\"")); % ?# u$ q) `5 N, D8 d. {
end;1 Y F- i1 P- c- Z# L* j5 L- @
else
; ?+ a9 i) j5 J) f @.Destination := assignLObj[1,row];
2 R+ u0 v; n/ H! S, y7 }# G end;
4 |! ~0 W- {3 Z% g+ F9 {& c0 ?, k( D newDirection(@);, p# h9 ^7 K: L5 c3 R3 }$ W2 S
@.HasOrder := true;
+ g1 Z8 L: N6 P' U end; ?* @- [$ z" j5 L) `5 e i
end;
/ o" C1 [3 {$ X- C# Y) `end; -- of the method& Y4 x. \9 c1 L4 D4 C$ I7 M* o4 [" I
|