/* called by: entrance ctrl of the object 'track'
7 o1 R; ~6 G( J( n) H; Z*/ A; c; I% q( R2 b7 ~6 b+ o
is+ |3 ]0 e; S0 U. |7 O% b6 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 Q' Z: e* C) b& N. fdo( p, @! S. e3 L0 ?) }( t" A
Lan := rootfolder.Internal.Tools.AOLlanguage; c/ V! I2 T, `( @9 e; w
if current = @.Destination -- else return
+ x) _/ k5 M- U! e9 O1 M4 l2 u then
, c( i8 E. K6 c0 a: T% y @.Destination := void;
# s c' ~0 q+ G0 q' m if @.occupied then
) e/ r% f z3 H. x part := @.cont;
4 H9 M2 {4 e# y) } @.transpOrder := void;
, J+ M1 h- U: C. b3 D3 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- u h; k; w' ?/ ?1 u
@,root.eventcontroller.simTime);! H9 h* g+ k$ e) a
@.HasOrder := false;. W+ _( t+ L4 }! S/ x
@.DrivingHome := true;
/ S/ V$ T! s# F8 [7 d! L @; H rgManager.tryToStartTransOrder;2 K. K- _4 X" h5 u
if @.Destination = void
* l. v$ j3 t- p" Z1 \ then -- no transport order for vehicle @
& ]2 m! z! Z& e# v @.Destination :=
5 p' C$ ~2 K0 G2 z rgManager.nearestFreeStation(@,track.~);7 `& p$ N( ~# D9 w
newDirection(@);
# m! W, ~0 S$ y if @.Destination /= void then! }, L0 V4 Q% P: L& [3 j
@.Destination.NumReservation :=; P+ ^% H' W7 D
@.Destination.NumReservation + 1;
5 ]; H) S$ R1 K6 t% v5 K4 \ end;5 l# o2 d0 w: q% X& [8 V
@.CurrIcon := "drivingHome";0 Y2 H* V) s, F
@.DrivingHome := true;0 N5 R+ N/ W: W" _ a) a# @) z
end;
. _+ e" o I" p% C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 S$ C! n- u" Z part := @.transpOrder;" c7 a0 d4 Q, S7 ~6 V
part.move(@);-- load part
) j; s0 f% Y, ?9 F @.CurrIcon := "load";
4 ?: f' i0 g/ W5 c+ l9 R$ z GlobalDistObj := part.globDestination;
; s/ @" e8 R- H3 b2 X+ D: D assignLObj := rgmanager.rgAssignL;
/ D q; |% l& I; W' s row := assignLObj.getRowNo(GlobalDistObj);( s3 A7 w; r% \# [ t
if Row = -1 then -- since 70
6 d8 c4 p8 X& N/ y' U5 v if lan=1 then' R% p( f8 [. y7 Y' @5 ?: `1 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," |6 @) ~5 c: \
to_str("in der Andockstation: \"",?.~.name,"\"")); w% J7 I1 R; h; y% N! Q
else) i4 V+ q6 V# O" w% k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, X0 _8 c# s2 ?0 x4 {. b; u; B to_str("in docking station: \"",?.~.name,"\""));
. O, U+ `% H1 L) x5 B$ v9 p end;
* l! k3 l u; [' j6 n8 l else( O3 r* m6 O1 ^" z
@.Destination := assignLObj[1,row];
- X" c6 b! |& h. J* J4 L8 m0 G6 r end;
+ W! S) h/ S; c# r4 |7 s newDirection(@);0 j* x# T3 N& a0 ?% S7 l+ d& u4 T
@.HasOrder := true;+ T% F5 H3 `% T7 Q5 y; ]
end;5 \0 {0 w7 h8 F9 Y
end;
9 N0 O% K$ {- H& g! K- H$ cend; -- of the method$ C. W! E4 T; _) g) p! ?
|