/* called by: entrance ctrl of the object 'track'* P8 X1 g" w7 ?, O- f
*/
# V2 ]" h# ?3 |7 S% Tis
: ~* I j: ~( V3 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 s4 ^0 a$ `! z* V8 z |1 ]# r) m
do
7 o& |; a& U& D6 o Lan := rootfolder.Internal.Tools.AOLlanguage;
/ e5 j6 _0 x; k& _; k if current = @.Destination -- else return
! p2 a- u: T2 S# w then
' C2 R! c" d' z* [+ U$ s" T1 O7 m @.Destination := void;
5 j$ r; g8 p- c1 Z if @.occupied then* A$ k) m" @ q6 z# j8 G
part := @.cont;
8 r4 S) t/ ]5 Q$ X( p& g @.transpOrder := void;
$ ^, C( }; `" E$ T3 r- J2 i8 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 j9 N& X: C) t3 V k/ d @,root.eventcontroller.simTime);
0 M1 @! F4 j8 N$ N6 f6 R @.HasOrder := false;
* u( U* [- Y/ k y @.DrivingHome := true;
; V) j$ L8 J( b9 ~4 H rgManager.tryToStartTransOrder;
4 ~0 S' o$ P& N1 N2 i* _ if @.Destination = void
+ h4 z. F* k) W, n2 K3 k then -- no transport order for vehicle @
$ h4 T0 f9 w- e& \% j1 u ^1 E @.Destination :=
- l: ~4 ^" V2 {$ |" N rgManager.nearestFreeStation(@,track.~);
+ T2 U! Q. c' p" Q+ @# ]- c newDirection(@); # f7 @. P+ w: C* k
if @.Destination /= void then+ F0 n2 K+ \: Y2 o, j# n
@.Destination.NumReservation :=( U* u* Z; X0 E6 x% f+ ?" e! H9 J2 r, ^
@.Destination.NumReservation + 1;3 ~+ `2 {' R( R8 ^7 D& E( P/ z
end;2 l W) p6 ^! p# a$ G5 E, ?
@.CurrIcon := "drivingHome";
& g; ]2 G- J5 e7 ~ @.DrivingHome := true;, i+ K& I4 C4 \/ M, J. |
end;( U) t5 S+ _ k8 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 B' c) ?: Q# K+ a0 w6 x5 ?# S M
part := @.transpOrder;5 N w2 m( f& ]' H3 K
part.move(@);-- load part' B" j O% R' o
@.CurrIcon := "load";! `' H7 e2 K- G1 a9 ~: `
GlobalDistObj := part.globDestination;" ?7 \- D+ }2 t* v* v4 ~2 [
assignLObj := rgmanager.rgAssignL;" J& R7 m: F0 S+ v6 D; a$ s8 o1 N+ Y
row := assignLObj.getRowNo(GlobalDistObj);5 L7 h' }5 F) s7 B8 s
if Row = -1 then -- since 70
4 o- C j7 a/ r5 a' ?8 R: ^ if lan=1 then% r0 g! w2 r0 A8 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ y) f# N5 O8 S9 b to_str("in der Andockstation: \"",?.~.name,"\""));
& L: o2 [3 _: c/ X1 R9 G else
- n: c, l& y( F" |0 p4 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ]' i: ^' w& n$ ~7 y& [/ ]
to_str("in docking station: \"",?.~.name,"\"")); # \! N( g$ T: s- H3 R) Y0 j
end;) ~, L, E7 ~) O( |9 A
else! `3 M9 o, o- c( p
@.Destination := assignLObj[1,row];# i* L" A/ J* e
end;
$ X/ Z& D+ D* u& w$ ^2 }0 F% `( L newDirection(@);2 ]* ^# z" O0 t2 x* M* {
@.HasOrder := true;6 R5 E% q9 I: @$ |, l
end;
! n% |3 B2 y$ e) L; {# e; Q' Z3 M; m end;
; r8 s: p9 ]: d9 Eend; -- of the method
& l. z) E- s# s( i; j |