/* called by: entrance ctrl of the object 'track'
5 Z/ b) w9 p6 u6 h8 V( a0 h6 q" x*/8 U+ b$ w4 i5 G6 y* b" Y$ Q
is! Z7 ~9 p# B0 D. K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! C5 i9 b7 F% K* I3 bdo
$ z. \ S- S2 i; N Lan := rootfolder.Internal.Tools.AOLlanguage;
2 H: O% m! \) @- m% q if current = @.Destination -- else return0 c1 }! @) u# b. e/ L
then/ l! r* |) W3 _: ~7 k
@.Destination := void;5 b8 v" P5 N* x W2 P
if @.occupied then; ^4 b/ {; I2 W3 s3 j; E
part := @.cont;7 m3 Y2 H4 Y* P' Q( D8 }/ |
@.transpOrder := void;
! D! N U0 m- C6 t c! L" p2 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 j- h5 H4 l5 |/ ] n @,root.eventcontroller.simTime);
7 W" n2 G, F( r- t) K R @.HasOrder := false;+ f+ F. l* J9 D x3 F0 q5 A6 S
@.DrivingHome := true;
3 W: b5 V7 I- g+ c, L$ k1 S4 g rgManager.tryToStartTransOrder;
, h+ Z) q2 e- u" B4 ?- } if @.Destination = void
: s7 H4 w. h0 q3 v% E( D) B# l7 t0 b then -- no transport order for vehicle @
i; h7 H3 H+ S4 q @.Destination :=8 f5 S# X/ p! \) h1 ~1 e! N9 O2 q* ^
rgManager.nearestFreeStation(@,track.~);
# \* H: N8 B3 w# h' L newDirection(@);
. d6 Z A3 V6 f. l! E7 J3 o if @.Destination /= void then7 s j& \7 ?8 {0 O F6 R+ y
@.Destination.NumReservation :=
. Q9 r( N* V0 E' d7 G. I: z @.Destination.NumReservation + 1;' G) K' J5 v. U# G. V( Z8 r& z5 Q
end;
, [' R) e6 Q. s. N! M) n @.CurrIcon := "drivingHome";
9 Z8 S8 N; f5 X @.DrivingHome := true;
: n" t) b7 z5 B# P4 [* [ end;: G0 G' n7 y! a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 }3 X7 J3 j; t1 \" @ part := @.transpOrder;3 x+ b, ~& ]* ~% N) b
part.move(@);-- load part
( F' a+ `" V1 }! J @.CurrIcon := "load";; X1 ~' |2 }' n1 Z
GlobalDistObj := part.globDestination;
1 X. [) g! B+ x5 `" `; I4 T: ~ assignLObj := rgmanager.rgAssignL;
5 E0 l) d+ E. x( k row := assignLObj.getRowNo(GlobalDistObj);
- {, m* P! o* H7 s- V' d if Row = -1 then -- since 70' y' U1 Q: @3 e# b
if lan=1 then* o% g( E. E) n# A# d$ s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) [1 x/ L3 u/ v$ w3 s* {
to_str("in der Andockstation: \"",?.~.name,"\""));$ n/ |4 {$ x$ Q! [6 u! r0 _! B
else
! x1 K# \% q R e7 s+ @. t0 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# C/ m" ^, S+ L- D* | to_str("in docking station: \"",?.~.name,"\"")); : y1 J: E& }/ @: x* v
end;3 z. }6 {$ ?; H
else
! F; }0 \$ L( d# ]) F @.Destination := assignLObj[1,row]; c$ V# U' k0 U Y' U7 k8 M8 w
end; ) J% w7 C& c5 E/ J* x
newDirection(@);7 O( f! G5 R/ \$ D
@.HasOrder := true;
$ c9 ~- |) H+ w+ n+ U5 H9 q7 R end;" J! O5 `: H3 q* i- P/ W2 g z1 S6 b6 [
end; J( E) C. Z: E* I
end; -- of the method
* `' B. b; T& b/ a! u$ }; E% i |