/* called by: entrance ctrl of the object 'track'# e' f1 ]8 H4 j5 u
*/
* H! ]- [# P- I6 w6 u* U6 F8 mis
( O. c l# c, {4 ~ ]% Y$ ] L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& C ]& @8 r9 z! p6 D$ Vdo
) f r, x2 E3 C Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ~" A& j# H4 _' w if current = @.Destination -- else return! f4 z" c6 t* e3 P5 s- D! p/ c
then/ B( {9 [. c. z7 r2 g
@.Destination := void;
3 H7 @$ f+ q) L) X if @.occupied then2 ^+ S/ Y$ B- D" U% A9 L5 Z
part := @.cont;
! Q* h* s4 P1 m! g+ a+ d! y# h+ ? @.transpOrder := void;
! j3 d, Y6 l% g, f) S, ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# y0 ?7 ?: \* S; X# q @,root.eventcontroller.simTime);
0 H! w$ } B: _; X4 @2 E% W) W @.HasOrder := false;
' r: h3 S) B" i* y6 w @.DrivingHome := true;
5 `) I, D, ?7 X rgManager.tryToStartTransOrder;
) {) ?# b, Y, N3 j- a# \ if @.Destination = void
' \% {8 N5 C+ T then -- no transport order for vehicle @
m6 G# Q; {% y2 [ @.Destination :=
' s, h- @( X' c1 f rgManager.nearestFreeStation(@,track.~);3 ]1 C- c% U$ f* d: q5 ?
newDirection(@); ( k- o I9 t% e" @' _1 C- _
if @.Destination /= void then( ^0 V- d- ^8 U0 z4 I, G7 `
@.Destination.NumReservation :=
2 ^# P& n$ y1 p1 x a- b' e. q @.Destination.NumReservation + 1;
) E6 T( {) k+ j4 O' _1 j% H# a end;
: o; y4 \% z J" J @.CurrIcon := "drivingHome";" ~' O/ |/ D8 W4 [: ^
@.DrivingHome := true;. b3 I9 J% _/ I7 U [# y$ F
end;6 A1 m$ e5 g0 g0 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* [; I6 Y" T, n* F! g; v( c; H3 D! I/ _
part := @.transpOrder;
4 ]* P. f8 l) Q t4 @ part.move(@);-- load part% O$ x* I' G! _% z7 K; \
@.CurrIcon := "load";8 ^, r3 p8 d" H& ?1 B
GlobalDistObj := part.globDestination;( M. e+ b: V6 \( S- B
assignLObj := rgmanager.rgAssignL;
2 t7 _9 u* c; r' s, X% E row := assignLObj.getRowNo(GlobalDistObj);
) J1 q! [/ V4 v if Row = -1 then -- since 70/ E1 X9 O0 |, l; Y x
if lan=1 then
3 C9 C" B ?) d, P* w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* N* r4 z4 h5 J6 W7 B1 d* a; [
to_str("in der Andockstation: \"",?.~.name,"\""));4 c2 r$ ]& A* O2 B+ X F8 |& Z
else3 X* I" O* O6 c# W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 D5 q7 r7 R+ W. m" f- p, a* S to_str("in docking station: \"",?.~.name,"\""));
) e* @' E# y( N& ~, B- X end;
; X1 F( a! @( A. G" [. L else
/ y; E: K- S; H1 D @.Destination := assignLObj[1,row];
& u, H& l: C3 L+ ]2 s end;
0 m' q; Y% l1 z0 N' [ newDirection(@);
/ i9 E X1 W# ] @.HasOrder := true;2 d1 \# f+ p# e! y g2 J2 e
end;
3 W8 B v6 D9 ~3 |( S4 ? end;
5 d+ Q: ?, D1 r$ }end; -- of the method
2 u7 L! p* o3 ]0 ?* a( g! c |