/* called by: entrance ctrl of the object 'track'
) G9 {, j: J C* ~& t) x8 \) H*/
1 X! L& _' x" V# Z# ois" V7 }$ F d" p3 r+ X/ `5 f. g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* i" R% x" w7 g% F( z, I. ?
do
: A( Z9 D* j" ^3 `0 f n, F Lan := rootfolder.Internal.Tools.AOLlanguage;
3 [; Y' a; c2 b3 x( J if current = @.Destination -- else return/ X# ~4 E! n" i" u
then3 m9 |6 Q3 h4 Q
@.Destination := void;' l8 k3 l+ K) Q- }" V! O
if @.occupied then
9 V9 B9 D9 ]& \( B6 A* c: V$ Q part := @.cont;
e# Z6 }# h3 d5 a# L9 G, s @.transpOrder := void;
" y, ], M3 [0 v' z2 J$ W, p: m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. p, b7 n0 D8 G8 N. n
@,root.eventcontroller.simTime);
" }4 ?- o a6 Q' k# D @.HasOrder := false;! K4 G$ Q) I1 f* K# T. h
@.DrivingHome := true;7 v! A2 S1 W5 |; l @
rgManager.tryToStartTransOrder;
& a, \. i# Q5 Z- d# r$ W if @.Destination = void
) c7 ?( v2 W( E P then -- no transport order for vehicle @% s1 J9 m. R' A& Q; N
@.Destination :=
$ [9 b7 b5 ?/ ?2 x0 ~ rgManager.nearestFreeStation(@,track.~);
4 T0 c* M9 [4 { M4 n0 | newDirection(@);
/ p/ r4 D7 l4 L6 Z* X. L if @.Destination /= void then0 k! c! I1 K' {% d3 c
@.Destination.NumReservation :=' b( ^2 ?4 c. T& ^/ d5 j
@.Destination.NumReservation + 1;0 x* \- p! W6 S9 o
end;+ p# l2 R3 J/ o# W
@.CurrIcon := "drivingHome";! R9 ?+ B2 p! P: d) J1 X
@.DrivingHome := true;+ s- I8 D+ R! s7 K
end;
4 w& X: H6 k, F' H9 V0 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# i% H$ Y- o$ l8 c% \3 ? part := @.transpOrder;
; b! t# ^, |, x: @. a% ? part.move(@);-- load part
: i7 E/ h9 ^: z6 V: @0 W @.CurrIcon := "load";& D0 i0 W) r% H$ q! j- w
GlobalDistObj := part.globDestination;
+ l. u7 c% H0 q% h; B assignLObj := rgmanager.rgAssignL;( @9 a% O/ o+ l6 ~. H( K9 s+ P
row := assignLObj.getRowNo(GlobalDistObj);
2 D$ c! k3 l5 W if Row = -1 then -- since 70
, b1 q" N# J2 C+ \. q X if lan=1 then
' d! q3 O) K* S9 k- ]+ ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- A5 z) n4 K9 _# x2 X/ j$ r, ^
to_str("in der Andockstation: \"",?.~.name,"\""));
9 w, ` v# @8 T3 F1 q3 m$ E& J1 w else
/ S( c* Q( J4 G& ~5 B& K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
{% o6 e- Z7 d: { ^0 B9 s) b7 \ to_str("in docking station: \"",?.~.name,"\""));
, c; U/ g N7 l0 h2 f end;
8 {4 R) e9 y' i else
9 h6 R% d- j" m: n) x( o @.Destination := assignLObj[1,row];: u- T+ F" P, A1 {
end; ' ]' i% X" I) Y) H, H4 K' c) A; S
newDirection(@);2 P' k5 Q& d6 g4 U; x( E1 J& t
@.HasOrder := true;
# H& [' l5 k4 L. r6 R- U$ r, N n end;( j( R2 P0 ~ K$ T
end;- q* @( ?+ d8 L) s: b# M
end; -- of the method, ^* f) M; s# N8 |& S) g
|