/* called by: entrance ctrl of the object 'track'7 A! E) c( F5 R- c
*/3 @& P; b9 W' C. S
is
" u8 t: C+ {' f( i+ L" p5 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R R$ {1 }1 l4 R. ] ^( K4 `4 m
do$ K* Q% p( b! v' o1 {$ O
Lan := rootfolder.Internal.Tools.AOLlanguage;1 s7 ]- ?6 m! U F2 j$ o
if current = @.Destination -- else return
1 G. @3 [3 E. I" `* V then
+ B2 E/ o( s. R0 O4 i, ?% t. _ @.Destination := void;
8 U, s$ X# z* i7 ]) B" W if @.occupied then
) Q% ] O: g9 I& v part := @.cont;
5 p" e; j3 Q7 E# _8 z! L @.transpOrder := void;1 K, B. i7 c' e( N, n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 W' E' O; c O @,root.eventcontroller.simTime);
" w. S4 d- W* ~) F @.HasOrder := false;0 O$ { l7 L: d1 q3 _' Z
@.DrivingHome := true;) X/ {) { `3 }( s( m5 R% z6 v8 P6 z# F
rgManager.tryToStartTransOrder;' `5 H8 |; C, Y* ]# F
if @.Destination = void
! t" ~' v0 ?. ~9 L) R6 K then -- no transport order for vehicle @
6 }$ Q4 @+ l9 [" v @.Destination :=
$ {( p% M; E; J }3 J T% | rgManager.nearestFreeStation(@,track.~);
4 O( y8 r0 z5 g! q newDirection(@);
3 k. x* L0 h. z if @.Destination /= void then4 l! @& W! }6 X) G$ C1 b/ Z
@.Destination.NumReservation :=
/ }0 V& _1 L7 d1 J7 U; W @.Destination.NumReservation + 1;
4 h7 v _1 T9 M3 B end;
. R2 R5 X) r+ U/ g* e" W, Y @.CurrIcon := "drivingHome";
7 e8 z. D" ^ p& a @.DrivingHome := true;1 }& V- _" T8 A" p n7 e) d
end;
' T2 ~8 t; Z. {/ x) _0 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 q3 L0 `; n/ S A( T part := @.transpOrder;$ m/ f4 c9 T* C) N! e9 N: h
part.move(@);-- load part4 z' s7 R1 z! M9 g: G; O
@.CurrIcon := "load";# k/ g. a, t4 Y; d
GlobalDistObj := part.globDestination;
7 X8 O$ m; R. o3 G) T2 }) ] assignLObj := rgmanager.rgAssignL;
8 a* l" h8 y, [. S9 ?8 y row := assignLObj.getRowNo(GlobalDistObj);
" k0 J3 Z7 d( V1 N if Row = -1 then -- since 70
- L5 K) s- H T; V9 v% n9 ]( ^8 i if lan=1 then
0 k8 ]! h8 E: F. ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: c' g1 Y0 s% @! d7 i6 H0 o to_str("in der Andockstation: \"",?.~.name,"\""));
) y, b. Z. [! h3 ]3 c5 R1 T) E else
( ]7 y6 X& v! P h6 e% l* y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: P. w8 n0 O' j& B9 S. _
to_str("in docking station: \"",?.~.name,"\"")); 1 T9 r2 _; Z" V9 K
end;- k: k' T3 r" A% ~% F% m
else
: x m, n9 a Y+ a @.Destination := assignLObj[1,row];! `6 H* O9 {. m! n
end;
% T$ X: \! w) Z& R$ M newDirection(@);2 X* X) E* l' D4 W" p4 k
@.HasOrder := true;# X' g" J* c$ Y7 p/ s
end;1 H' f- c% E% S9 G- T
end;
* Z- |" i$ X9 _' t/ W( @) d$ iend; -- of the method3 v9 j' d3 c- U) W" D6 S1 S
|