/* called by: entrance ctrl of the object 'track'
$ C/ p- m: h# P; X*/
" b- P- ]2 }) Z7 L* f+ u, r# V2 ] Tis
( [+ y+ c& G2 w9 ~8 D8 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 A4 w8 N/ I! o4 N* c
do+ p4 c% X' `4 \& n% b+ w
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ o4 t' U6 j5 [1 [/ a7 q if current = @.Destination -- else return1 H w5 l1 H: G4 ?0 \+ J
then
; X+ |# F8 _# W @.Destination := void;
! I3 T3 c5 Y0 j2 s* c0 ~ if @.occupied then. q$ v' M- s d. ~7 l1 {$ G. D
part := @.cont;
% Q: T: C f" R* T @.transpOrder := void;
f, l' c2 h4 L1 |5 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 y: F# }( _& R @,root.eventcontroller.simTime);
/ h& y+ J- r9 i) ?2 e* w @.HasOrder := false;
% d8 y; H, b9 x! z6 I4 p( \ @.DrivingHome := true;1 ~( v, O4 p; o$ ]) b
rgManager.tryToStartTransOrder;
7 ^( N2 K" G5 d, X" `9 K, w3 k4 }# Z( \7 \ if @.Destination = void
! Y& S3 u8 z! x, t then -- no transport order for vehicle @( w5 u. Z+ g7 P6 L9 D
@.Destination :=
* j$ P7 H8 M: H v rgManager.nearestFreeStation(@,track.~);0 n% l+ e3 o0 \* O
newDirection(@);
0 M! Y, r' O6 T if @.Destination /= void then' z- ^# T: f3 Z* F) u/ l
@.Destination.NumReservation :=& B2 f& F: ?, N: M, E1 Q
@.Destination.NumReservation + 1;
0 ?; X. ?8 M, h) e1 M0 x end;. e* j9 |0 F& k& e# Y1 o
@.CurrIcon := "drivingHome";4 U9 ?" v& [7 a" |- Y
@.DrivingHome := true;0 o( l1 \- p" Q4 e% \; k
end;
" G u5 @9 w) W$ K$ V! U- H# X+ q else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 Y- _4 Y6 e Q* ]
part := @.transpOrder;" C. x4 R6 j1 ], y7 e4 D
part.move(@);-- load part
& P% @' H$ s- u. \2 s @.CurrIcon := "load";8 V, m. |" R' @$ U. w/ k
GlobalDistObj := part.globDestination;1 M7 y: k& e" L8 k' k
assignLObj := rgmanager.rgAssignL;
6 I; ^) m" Y& @4 r" M) `) A3 S row := assignLObj.getRowNo(GlobalDistObj);8 m* m# c* Z) ] z' s& u
if Row = -1 then -- since 70
0 z/ U" K4 i5 `' C) b+ b* T% | if lan=1 then4 ~4 F. W& U$ V3 Q6 p" M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |. ]7 L( m/ l: y& v
to_str("in der Andockstation: \"",?.~.name,"\""));9 i9 D- Z0 a! O; X8 s
else
# y" Q/ c! D! \9 _* Z' J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* {0 C4 Y2 c5 R4 r& R to_str("in docking station: \"",?.~.name,"\""));
8 s8 V: I& i6 B6 D! s end;
+ L$ P/ k% w4 S3 `* z1 Z else
: A W" E! t* o. S7 _" ]* p @.Destination := assignLObj[1,row];* [( y9 y/ C9 K# w( N/ p
end; 3 K9 S2 r! c: C; t8 v
newDirection(@);
% X w1 @ I' f! }/ n" | @.HasOrder := true;
8 C7 x, {$ h) t$ r4 W end; |& I; g _/ k& u
end;5 N1 W6 y: ? ]5 _6 Z6 g
end; -- of the method. D# A0 o; e5 b. S' l3 E
|