/* called by: entrance ctrl of the object 'track'
! T1 w+ j+ E2 j*/
' o; P, l, t. W+ O+ {7 `& `4 ris
2 K$ a+ ^2 {; s" X$ {2 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 W) H8 P, e1 Q: Edo* @) R5 n, Z, L- r. D+ D
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 Q/ G1 B5 B2 w' n% c, D8 o H if current = @.Destination -- else return
$ t9 T* d6 G7 R% o- `2 u; M then! ?) C/ R- W6 O9 b2 G
@.Destination := void;
. N5 a( D# H" X7 X if @.occupied then
' r8 x5 G$ |( Z% X+ G6 M4 j4 ` part := @.cont;
& W; B9 I7 Y5 q' g9 n @.transpOrder := void;
. F8 e$ |& F; T2 D/ M5 G0 b: J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, t" |) C5 P/ K% w: p8 s
@,root.eventcontroller.simTime);: i5 }! ?% U# |7 G7 d% y
@.HasOrder := false;
" [! x- J4 F# |" ]# J @.DrivingHome := true;
( K1 N H" d3 _ rgManager.tryToStartTransOrder;
/ @8 w3 P ]$ m; s# y0 Z if @.Destination = void
& Y7 d2 g( u6 b5 W* q0 B, a. J then -- no transport order for vehicle @+ w6 A; `( c3 z
@.Destination :=. d5 \8 P" i, A4 `
rgManager.nearestFreeStation(@,track.~);
5 ^8 D; g1 K$ e newDirection(@);
9 T) A9 \" u$ g; ^" W if @.Destination /= void then' ?7 I; O4 ]7 t& t
@.Destination.NumReservation :=' X" ^- l; H5 V! b; O" o
@.Destination.NumReservation + 1;
2 M5 Z/ C7 n* u2 {% f end;; R" j" l; |9 @7 f/ @& r
@.CurrIcon := "drivingHome";$ l8 m4 h) |9 x n
@.DrivingHome := true;
( V5 W) Y- u$ Q, k2 o# v+ t end;6 j1 I6 T1 T! ] w* L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( ^" p6 o: o; h# g0 i6 u
part := @.transpOrder;
" ]0 w' O9 \2 F/ z* m, G part.move(@);-- load part1 f, d9 X' C% n1 a d& ^
@.CurrIcon := "load";3 @/ ?2 l$ p) k3 `9 y/ V+ L' }% d
GlobalDistObj := part.globDestination;' Z. U" [9 f# b! ~
assignLObj := rgmanager.rgAssignL;
4 J V1 n' f4 w# A) S" @" z( V$ N row := assignLObj.getRowNo(GlobalDistObj);# x" S! L3 {3 Q& C! m
if Row = -1 then -- since 70
' W- g# U( v4 S$ ?, S0 h6 L" `& R if lan=1 then
; b* m9 k# f& p* a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
z: K. {6 {' E+ S7 Z to_str("in der Andockstation: \"",?.~.name,"\""));5 |" L4 h5 V1 [9 g& b
else& v- I! J& S6 r2 V# ^) D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: A% L; c) M' T+ t& B
to_str("in docking station: \"",?.~.name,"\""));
4 a5 c( c! G+ }0 j" Y0 f/ h6 L end;4 ]4 R% _. n# |- b
else
* }( l& d, g3 l) Z: J" i @.Destination := assignLObj[1,row];
( c! r& |3 w+ b. d! {. L end;
6 |" y3 @: L) ` newDirection(@);
0 R' I) i+ t# h4 x, h9 x* |1 Q @.HasOrder := true;
f; _! P @$ Y$ @/ m end;/ ?9 g8 f; R% l3 Q: b# c
end;
7 G2 C4 R- w; Xend; -- of the method; G% o4 j2 D" R0 E3 [
|