/* called by: entrance ctrl of the object 'track' r, Q6 L- ]5 n% R2 M
*/6 Q; E$ I6 Z. K! h/ {, J2 a n1 z, f
is
' V: L, `3 p$ e: `' f& _' U. L part, GlobalDistObj, assignLObj:object;row,Lan:integer;& b& t6 M K! F8 t! D5 r
do1 u1 ~7 z6 y: E5 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
& h$ b3 r" h( M+ ~5 t8 `$ k if current = @.Destination -- else return1 i3 z: ]: o2 p9 z- L
then
5 R* ^) d+ |& F6 H v3 a4 u @.Destination := void;& |9 v5 m. E) p; f3 e- ?) q7 ^
if @.occupied then: W% j6 W0 Q1 S. ]+ ~/ H
part := @.cont;
$ L2 m( O+ d. N# o @.transpOrder := void;
8 z0 r1 C1 [, h' f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ T: z- P! ^4 W
@,root.eventcontroller.simTime);
* }. j2 N0 g+ H" @ @.HasOrder := false; N7 i& N" W. {; B c
@.DrivingHome := true;( e& D! d3 J. j- i, _) T
rgManager.tryToStartTransOrder;- B: K& i4 _# K9 d) @
if @.Destination = void. q& L6 J9 T ~1 ^. y5 p! N
then -- no transport order for vehicle @+ i# Q# y1 i( ~3 o6 K) L
@.Destination :=& U1 B5 O& k% v8 c+ {
rgManager.nearestFreeStation(@,track.~);
6 \0 T: G# b3 I: v: s% e newDirection(@);
# n3 p& m# J* u1 k3 d, { h0 ? if @.Destination /= void then
4 r4 |( {! a. P @.Destination.NumReservation :=# v+ t8 S5 T6 x1 e3 t+ m9 l
@.Destination.NumReservation + 1;
: F' M- h, L* u: e) a6 ]( B$ v end;
' t. a1 i, q" Q! o @.CurrIcon := "drivingHome";6 X# n9 T5 K9 Q1 z" @9 U0 e
@.DrivingHome := true;2 k, J+ M: \: a4 f
end;2 u7 I/ _, ?5 s6 H% A% `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ H/ C2 H: T# a" k part := @.transpOrder;
' k2 j- ~2 B' @$ @7 B part.move(@);-- load part6 V! t" R' [) Q& W7 Q& v$ S
@.CurrIcon := "load";
& ^) e) \- z( \/ b GlobalDistObj := part.globDestination;
8 n& h/ e2 r* W4 v3 u assignLObj := rgmanager.rgAssignL;
6 ]" C4 t7 ~! I3 K, r row := assignLObj.getRowNo(GlobalDistObj);5 v8 H" t7 h$ v8 M6 @8 |0 ?# ?, I) m" ?
if Row = -1 then -- since 705 {4 }0 t8 p' Y2 @
if lan=1 then! Z; z; Q' k: t" @2 L. B8 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* {. S$ U) K3 ~- {
to_str("in der Andockstation: \"",?.~.name,"\""));, k% u- B( L! E0 e
else \0 v! [) e% H7 s+ e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) a- d- i; X+ u6 S to_str("in docking station: \"",?.~.name,"\"")); " B0 m' } \2 J( K
end;
4 L0 ~* o1 }5 D4 r' \ else
, L' n) u. q- Q! R4 a, l9 l @.Destination := assignLObj[1,row];
6 c( E7 M; G% H& e end; : I* G+ l6 H: ?4 H2 A# R9 s0 f T
newDirection(@);
1 \+ R; Y/ \. [9 p @.HasOrder := true;
- ^5 \6 t. b$ x0 `# D0 C; I end;
& J! ^, C. J0 I6 C8 S$ w. C- a# Q end;: y& f2 I/ o5 |- l9 j
end; -- of the method- x4 |8 t) s$ w; D
|