/* called by: entrance ctrl of the object 'track'
! ^4 H9 i1 i0 C*/7 B! s" f% K" e9 s. B( z4 l& M
is; }: E" A7 q! J3 A( G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Z6 T. N/ _1 G9 j4 ~7 ~
do) k! l5 A0 E& `6 n
Lan := rootfolder.Internal.Tools.AOLlanguage;$ u' E" o v1 u; a
if current = @.Destination -- else return4 ]5 h j; Z5 f7 N) \' n* I
then
2 e5 h v0 q& p; I+ O N @.Destination := void;
. ~( ?. l3 }; ]; ]6 b" Q if @.occupied then5 n, ]- Z8 J+ r; p, n- _- @
part := @.cont;
. l; T1 ~5 g" V. a @.transpOrder := void;
( J! c2 m5 k; y$ U, n1 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 M5 p* A5 A- d( [
@,root.eventcontroller.simTime);: b! |& N( s4 j0 u) S$ F3 T5 ]: X
@.HasOrder := false;1 h! G7 K# | y! o. i% ? T& @
@.DrivingHome := true;9 A( h. m/ X) Z* z# ~$ k
rgManager.tryToStartTransOrder;
" F1 ~: n/ i8 v) @0 { if @.Destination = void
$ O8 s1 R4 K+ ?: q8 `1 Z' a( {! `' m then -- no transport order for vehicle @' l% `& v" T0 B8 ^% A
@.Destination :=/ k" @* Q N$ ]( ?0 [' E0 E' K
rgManager.nearestFreeStation(@,track.~);
: G- [# D: O# v% D- } newDirection(@); # w3 R2 @! f. |2 o* x- i& q
if @.Destination /= void then
: p/ D. e O0 j' S3 c7 a$ r @.Destination.NumReservation :=
' A7 ~6 q) U. Q! ?# o6 X @.Destination.NumReservation + 1;: b. ^+ Y0 e+ F% ~: k' c
end;" a P e' C9 E R5 i# b
@.CurrIcon := "drivingHome";: \# X% K; P m# F, s5 d* @
@.DrivingHome := true;
# e. w7 f, |1 f& S/ _ end;
; N i# t( ^% ~+ m0 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 E9 c9 u ^# p8 h; b- S9 |: e& o0 f
part := @.transpOrder;
6 ^3 x3 E4 {, F part.move(@);-- load part
: i8 V( j2 K- L; d @.CurrIcon := "load";3 ^) I* {6 w) w: M0 _* R
GlobalDistObj := part.globDestination;3 S. ~0 X& n8 Y
assignLObj := rgmanager.rgAssignL;( z! n) i4 F: |; b5 E' ]
row := assignLObj.getRowNo(GlobalDistObj);: ]. I3 Y& {$ d8 L- k$ k1 n, h
if Row = -1 then -- since 70
+ h% M. t$ I; R if lan=1 then
1 L4 Q( H1 `, r( H, N4 |* i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" `1 S) @# i, W9 S3 k9 V4 e$ u to_str("in der Andockstation: \"",?.~.name,"\""));
9 k5 _% B! \% Z1 N7 {0 H else* V9 @0 a F; x! W/ ?. l5 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- W: s+ ~ V0 a
to_str("in docking station: \"",?.~.name,"\"")); 6 I" b) g# G6 a+ w# c# [
end;3 ?/ z! p2 |! f# \8 `
else
, z5 B' |6 n; j% ^. W @.Destination := assignLObj[1,row];3 p' I( N# P# m. t) ^; q
end; 4 g; y* R5 n9 N6 h1 B- Z
newDirection(@);5 p1 h% @5 J' R, ^
@.HasOrder := true;
: b; L9 |+ ]7 \: o end;
5 y. i" d1 i* Q" }9 J' T1 y9 t: L end;
- ~: C& C! n. o' D6 `* qend; -- of the method" P" h$ H/ r$ m( t( ]' u
|