/* called by: entrance ctrl of the object 'track'
' K( n7 j' ]# q2 J*/, K+ H% R# r8 Q# c) }+ T
is# W3 Y; O+ [- B+ w+ J% D: i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; j( k; `) d+ M3 u) v6 ]* Ido: \9 w2 O& `9 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 |6 t, n$ c) Y* q7 A6 S if current = @.Destination -- else return0 |5 i' Z& e% l9 m0 Z
then
|/ x3 n2 z U3 r n" e! i @.Destination := void;/ E+ Y" \. n3 G% u; i2 u
if @.occupied then
6 r* V" ]/ \0 x part := @.cont;
8 V# }0 M! u% Z# r. K @.transpOrder := void;
# Q; n6 [; z7 r) B+ M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( [* y w4 m9 `
@,root.eventcontroller.simTime);
# u$ I9 m9 E" X8 O+ s$ x @.HasOrder := false;6 A& k" E3 ?; B% r9 V* p* L. M+ l
@.DrivingHome := true;
- o7 J9 _* s0 [ X4 x1 G! a rgManager.tryToStartTransOrder;# h( O* T1 ?% P( q
if @.Destination = void
# @* _+ W! e H! e$ v- D8 I5 m then -- no transport order for vehicle @
: h1 _3 |1 H, d' g" H4 { @.Destination :=$ I" G& _ Z9 y3 V1 |
rgManager.nearestFreeStation(@,track.~);/ I3 ]1 A: ^& X x* \( v( m$ ~
newDirection(@); ' @1 Z' G) E0 h3 S$ t7 ~
if @.Destination /= void then; D. j, l- Z3 C" W" a
@.Destination.NumReservation :=
& w( l" H0 K0 Y; m4 a @.Destination.NumReservation + 1;7 `: Q6 U+ q) z- |
end;
5 Z( i. X4 W# f, v9 `) d0 ~6 | @.CurrIcon := "drivingHome";
! K0 l1 u3 x" t: q3 ? @.DrivingHome := true;
* r, Y2 @, o% Z. F/ ?! s end;% G4 G0 c- D! B6 W' I+ ^- h" [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# L/ A" l+ b& c' R$ U P part := @.transpOrder;) r& ]1 o3 y9 J1 r. A3 F- D$ K
part.move(@);-- load part
+ ?- |) X- _( G! p' r) a$ R @.CurrIcon := "load";
7 C' F0 \# Q3 e7 ]# a GlobalDistObj := part.globDestination;5 F p& f F, o; Z9 S
assignLObj := rgmanager.rgAssignL;
' l0 R* y- x5 s! A row := assignLObj.getRowNo(GlobalDistObj);; i7 K# B* Y+ H8 u1 {* t( j
if Row = -1 then -- since 70
" Q0 j7 O8 U' L5 w8 V if lan=1 then
. h" {# T6 Y. O: V2 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," o) U( w* v& a# a7 {! U
to_str("in der Andockstation: \"",?.~.name,"\""));
9 [. c- t) c- W9 w+ }3 k9 M else* i% D) [! H# c! M& A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 Q- E7 R" P7 _( u* N# T to_str("in docking station: \"",?.~.name,"\"")); / r6 N; ]% F7 F
end;4 @5 R, U3 x- J* z( g4 Z- w
else0 ?' O _8 C' t; Z
@.Destination := assignLObj[1,row];
9 ]2 h) R; |9 b end;
0 ~# D9 v& z5 {% B- T: p newDirection(@);0 y. s& k) X+ L: P% j
@.HasOrder := true;, O: r0 [/ m( O+ e
end; R# L9 q1 P' {. I3 ^" a! I
end;
" d! Z5 y; T# A4 Xend; -- of the method! h$ v# s/ F+ `; l! k
|