/* called by: entrance ctrl of the object 'track'
* Z ?$ }# t4 U: `& _# V*/0 ^9 I0 \ S/ w: g; T0 L; E5 ~
is4 r6 g/ ^5 p. |2 X. C3 ^' \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# G! Q5 A: J8 W4 i* t4 x# Ido
{. c/ ]- `" O# v3 \# a$ g Lan := rootfolder.Internal.Tools.AOLlanguage;# ~9 X6 B0 @/ G1 C5 t
if current = @.Destination -- else return
" b& p3 G9 F% M0 M! f then
3 ^9 {) u, `' `$ I+ x4 K @.Destination := void;+ ?) x3 ]7 }% E* p- |& K+ F
if @.occupied then
2 `2 j. t& t5 y2 b1 z9 ] part := @.cont;
4 H; N6 e7 L2 W, S8 r$ `) n" b @.transpOrder := void;
. C9 @* s* D. M+ K+ T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 {/ t# ~ ^1 m6 i7 k @,root.eventcontroller.simTime);
) p1 k9 w: v) B3 N/ R3 f" y @.HasOrder := false;
- ~( S* y1 G& C' \, U @.DrivingHome := true;
8 f- M, U+ B, _7 t/ @# Y rgManager.tryToStartTransOrder;
! E6 G# P0 d8 A% T if @.Destination = void
3 R+ K/ F5 ^5 p then -- no transport order for vehicle @
6 p1 F+ k# ]/ i0 S5 ]2 c @.Destination :=
2 @! ~) R- v# R" K! u% J" X rgManager.nearestFreeStation(@,track.~);
+ U* y. {! W1 j. Q; u) h newDirection(@); ( C9 f; D b: f1 R
if @.Destination /= void then
* q) O0 F+ k9 r3 m" R5 _9 H( G. F @.Destination.NumReservation :=
" d: N' `% O8 i; i1 E @.Destination.NumReservation + 1;( ]' N# d2 N- E4 n j+ c
end;) m A7 |% {2 d% H' j$ m ~( Y
@.CurrIcon := "drivingHome";% n4 F) b( S/ y6 {
@.DrivingHome := true;
& E9 k; O _# L9 U. U2 H8 F7 N end;
* h* k( T* Z; i. |2 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station. P- p) f2 s& s' W c1 b2 n
part := @.transpOrder;' n" t9 A% B; u$ m9 w* i9 p( |( ?
part.move(@);-- load part
; c4 R# O; j C; a4 L @.CurrIcon := "load";
; I) T6 a- U4 E$ A: r- N& U3 O GlobalDistObj := part.globDestination;
4 I" ?1 j/ q/ Q- g assignLObj := rgmanager.rgAssignL;* L! C$ ~# Q u. h
row := assignLObj.getRowNo(GlobalDistObj);
O' x/ h3 e! x+ _- S8 i" l if Row = -1 then -- since 70" c" D2 Z2 V, n- ]4 v9 j
if lan=1 then7 l& r0 m) A& [! K3 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# b: u5 C2 J7 ^& O6 E% e
to_str("in der Andockstation: \"",?.~.name,"\""));
- R2 ~* S: C3 N else
- A- ^7 O' P& O" @8 q. e+ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ Y1 b- m5 P6 g) b4 T, i; `1 X6 I5 P) ?3 D to_str("in docking station: \"",?.~.name,"\"")); 9 a+ ?9 e/ [2 i# X4 K* U, s2 W: Q
end;3 Z1 \1 E1 O1 V/ B5 ?
else
( a$ N& s& I1 \ {( ^# j: _ @.Destination := assignLObj[1,row];
8 N# {# T0 _( o0 j end;
2 l, B7 N9 [% E# b newDirection(@);1 |3 }2 }6 J! N2 t& |) e& V! W
@.HasOrder := true;
8 p/ a5 {. f8 P end;
% [) Y3 g; _5 ]; C$ J" w end;2 {6 D1 n- x$ O* \' m5 V; e' \' {
end; -- of the method1 Y# b, _1 r# o6 W" g6 g, H# y* c
|