/* called by: entrance ctrl of the object 'track'
# H# y8 C& Q p*/& t6 Y1 P b- Z+ B( k' [
is
* S" N3 f* O8 F) _+ d part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 e+ R3 {: L( d, `
do/ u$ _4 L5 X" B
Lan := rootfolder.Internal.Tools.AOLlanguage;
- P% L: |6 H* c if current = @.Destination -- else return
* b( z) t8 O' o/ q then9 a% u' w* c. \, C. d ~( Q
@.Destination := void;% F" J- q5 P- I$ n; i
if @.occupied then: x- ]& k" V& [
part := @.cont;, L5 P3 z) J( @1 f) y4 @
@.transpOrder := void;7 }6 t& g6 E' }2 J" e4 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* {6 h# y4 B' Z' A8 n8 F" s8 t' e @,root.eventcontroller.simTime);+ f) q0 t- J- C$ o
@.HasOrder := false;3 y# {) ?$ l; G% t$ b
@.DrivingHome := true;: E t( {+ m+ W+ \
rgManager.tryToStartTransOrder;
. n" r$ H7 |. f7 j( D; n if @.Destination = void. l! K. \, a. |* B# h1 g$ e9 [
then -- no transport order for vehicle @
! D1 ?: h/ U4 e1 Q8 S1 l @.Destination :=
2 U: i: G9 k4 l# s0 z8 z rgManager.nearestFreeStation(@,track.~);/ B4 x) V: L4 i; a2 `( Z$ S
newDirection(@); t; H! X* o8 \( u, a
if @.Destination /= void then
5 w# l: M: j: t& T @.Destination.NumReservation :=
+ _8 C5 q- h" q# N1 `8 c) i @.Destination.NumReservation + 1; ~" X7 P. n% _% L5 i! j
end;
2 Y& E8 n+ _ L3 ]8 T @.CurrIcon := "drivingHome";" j ]4 g# G! {) O" J2 V
@.DrivingHome := true;
. x' m3 O* |6 H7 c, t$ T end;
' G# Z+ I7 r( n2 I/ \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station) d% u' k: ]5 c) G* T% w% y1 ~
part := @.transpOrder;8 N- V% t; O& A- O+ ? Q
part.move(@);-- load part
# ^; a* Y- Y- ~' ^ @.CurrIcon := "load";7 O3 v H, S; ^
GlobalDistObj := part.globDestination;, l/ O# ] F4 E( @) z$ _3 z
assignLObj := rgmanager.rgAssignL;* {: \: a! {3 m7 U
row := assignLObj.getRowNo(GlobalDistObj);/ i4 K) a4 }0 k& i
if Row = -1 then -- since 70
0 Z1 W. N- Q1 e- U if lan=1 then
" t7 I2 u f* U) Z( x L# V' Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! t- g% d1 S6 [0 {9 a) i0 e5 j* k6 n to_str("in der Andockstation: \"",?.~.name,"\""));
: ^, L! d8 B* P$ f/ C) L else
4 S X3 S: K% c5 B5 w6 w! l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 P) n6 Z* h& L( E- J! v to_str("in docking station: \"",?.~.name,"\"")); % ~5 x% C# b- {$ s9 T0 v m
end;" e' a1 W8 Z& ]: m
else& T; d" b& f2 e2 @6 G* N
@.Destination := assignLObj[1,row];
2 \) P- P2 t# N9 h g. y& z8 B end; - G$ X# Y9 f- A
newDirection(@);6 U& z+ O7 [+ |' N/ ^; D" l& x
@.HasOrder := true;
1 ^" G. j- t$ N' J end;
& V) n/ }! k' ?' ` end;
' V, \1 w0 B1 [- Z! j5 wend; -- of the method
* F% X- v+ i! [3 }4 l |