/* called by: entrance ctrl of the object 'track'
1 o* I/ V. U$ ^7 ^0 h# {*/5 ~) o. N' @. C. |3 v* l/ s
is, ]8 U& |4 A0 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# A2 V n. i' B/ ?# ]* Y a5 Z
do
3 O* s3 Z e" I Lan := rootfolder.Internal.Tools.AOLlanguage;
: o+ L0 z! P. m% Y0 [ if current = @.Destination -- else return8 q' l3 \3 @# a5 r
then1 ^8 _) X% u2 C( }) w+ F
@.Destination := void;/ m6 Q) Y7 G+ K& M4 }* d& V- Z
if @.occupied then: o B% z6 k" X/ l T
part := @.cont;1 i4 o3 A3 u/ f( h
@.transpOrder := void;
! e% Y& V2 `* M J; {" W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 r4 k! X. e+ d# `- }9 I
@,root.eventcontroller.simTime);
% F5 \* n4 O+ v1 ? _ @.HasOrder := false;' t4 H5 s, t2 w1 f- {1 ]% N
@.DrivingHome := true;7 X+ C; V! w) X% X1 X3 e- v/ d
rgManager.tryToStartTransOrder;
4 @8 x1 o+ Q: q; N* u* e1 L6 k if @.Destination = void$ p7 }( N: Q; ~- n- C
then -- no transport order for vehicle @
2 Z' o2 V8 w3 K3 k( i% \ @.Destination :=7 s# ^: T a6 f5 D5 j H, Q
rgManager.nearestFreeStation(@,track.~);
# F- B, b1 B. f p' K+ D0 a newDirection(@);
# X, @6 g7 w h if @.Destination /= void then2 Y- g" q( V `6 E7 Q6 x6 s
@.Destination.NumReservation :=
; @+ l& X' K. y- ~" q @.Destination.NumReservation + 1;' G- ]: ]$ }6 y: ]- Z$ w' j S
end;
/ Y4 ?7 s' p/ `3 ^ ^* x* Q* o" F" n @.CurrIcon := "drivingHome";
6 t0 h5 D! V+ P- |. o w. n# ]4 x @.DrivingHome := true;
* b' U6 s$ K* t end;% g- S0 |! w0 e3 \2 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 j- ]' w6 u* J, F' U$ z( B
part := @.transpOrder;
' _2 V$ Y, M! u0 W part.move(@);-- load part8 N* I N, L3 u& k
@.CurrIcon := "load";
- i9 T. W0 R' X2 y3 p; i GlobalDistObj := part.globDestination;- u( G# v/ _" J
assignLObj := rgmanager.rgAssignL;
0 ^3 b* r- b& B7 M row := assignLObj.getRowNo(GlobalDistObj);5 O7 F8 a4 J& d6 z' Y
if Row = -1 then -- since 70
. M/ W. @0 }2 W3 O5 D- Z" e if lan=1 then
+ C" c2 M& B0 C3 c8 c+ i" h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% @ J! Y y& a; P. l6 U
to_str("in der Andockstation: \"",?.~.name,"\""));
" M( M: x8 Y1 V" w/ J' { else
3 F: F7 G1 i4 d% b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 R: @# q& r, w0 |) R" I& z0 T9 ~8 b
to_str("in docking station: \"",?.~.name,"\""));
4 f0 I O; S* ]% ~% V) c end;$ d& n, J7 Q0 ]& u
else
- k7 K: m: a; p! v9 N$ R @.Destination := assignLObj[1,row];
, S, H. @" f- m" N- }3 Z4 P3 T2 n% \ end;
7 O" t+ C V3 u9 r9 I7 \ newDirection(@);& i2 @8 c4 V5 N }- n7 @
@.HasOrder := true;% [' z8 d0 ^- A- Q- e
end;
: _, B7 R4 n c- c" ^ end;9 N6 I+ \! r1 ^' I- p, @ w3 O" k
end; -- of the method/ L, l0 Z# \% R' g4 j5 L+ C
|