/* called by: entrance ctrl of the object 'track', B# D1 s# v) j/ ?5 K/ Y6 g# F
*/; o9 g! h: A" [- G1 ~& Y6 k
is
8 j, n( b: {) w, n& C$ a- s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 @ L, N6 i% M$ f5 A* t1 gdo" I& R* Q7 i" c9 t$ q# F
Lan := rootfolder.Internal.Tools.AOLlanguage;. D9 Q: z" O y: R/ d/ b$ W
if current = @.Destination -- else return2 K$ \# q9 `6 h2 E
then. ]7 d% P) X5 W# U5 h
@.Destination := void;
7 Z( ~' J1 N5 v. t" x, z if @.occupied then
, T* I. d3 q2 U }# T2 B' P. @ part := @.cont;
& q2 ~9 r+ s, U9 M; l* i @.transpOrder := void;6 p2 C2 t1 t9 ^; ?* p5 a! `$ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: L! h/ P) U/ x, w" X @,root.eventcontroller.simTime);3 i" r+ F& ~/ G+ g0 @
@.HasOrder := false;6 F* h# ]+ x6 O
@.DrivingHome := true;
9 x% V* f: a5 h. b/ a l rgManager.tryToStartTransOrder;
) z" @- w( Z5 B% v' @/ o- B if @.Destination = void
4 A+ x1 H" ^5 i then -- no transport order for vehicle @( K5 A/ o; ?; e9 v
@.Destination :=; `& }. y* K4 [ p0 A
rgManager.nearestFreeStation(@,track.~);* ^0 w& ^" e% K
newDirection(@); $ d4 c4 g+ D7 D
if @.Destination /= void then* s/ j7 C, q$ _$ x- v! J6 \
@.Destination.NumReservation :=# c+ G# b$ R1 W: u6 G+ X" Q
@.Destination.NumReservation + 1;- F% U( X8 l# c
end;
2 w: p1 M% c, z! k @.CurrIcon := "drivingHome";) ]) b/ \1 h j6 m" y% s3 ^0 @
@.DrivingHome := true;
8 J ^- V9 E0 p& N- N$ F end;+ Z, y* Q. \; f$ I1 }# q! ]% `- P' A8 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& B3 \1 H J. j
part := @.transpOrder;
9 J) _, B6 Q: z6 E7 L1 t+ v7 Q4 O part.move(@);-- load part
) ]! ]" U% c- e: x' d! L/ n7 | @.CurrIcon := "load";& Y( \; {3 l5 o7 o; f* m8 C
GlobalDistObj := part.globDestination;
; D. q$ n$ }4 ~0 K/ G4 d- D% @" a, p assignLObj := rgmanager.rgAssignL;- V# e3 ?- e5 U: z4 K( b6 h
row := assignLObj.getRowNo(GlobalDistObj);
4 T! e( f7 J/ m( P1 b* D! _ if Row = -1 then -- since 70 {+ r' g" z, S; i6 o3 u
if lan=1 then
1 H% Y6 P0 C- M5 W; B8 [7 R2 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 `% A/ `1 I. R4 B+ z9 B+ k to_str("in der Andockstation: \"",?.~.name,"\""));
# x8 `, [# o; E/ x# A1 p4 F else# j [' K+ \; z* t/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' } T8 e v( q: z" d to_str("in docking station: \"",?.~.name,"\""));
$ K F8 t( @7 q4 } end;! _1 k; w9 P% q3 A# d: O/ F
else
6 U: ~7 _3 ]6 g5 j0 _4 ~ @.Destination := assignLObj[1,row];6 |3 i# {; P4 t0 N* [
end; % A! i( O3 e/ S( _
newDirection(@);4 S( F; |( d! v4 A/ w
@.HasOrder := true;
% K# Q) H1 I+ Q; H. A end;2 A; ^7 A1 F. a- P
end;
* w0 R u3 e/ ^9 x$ Hend; -- of the method
8 S J. N- F& h- I) B& k5 v( t |