/* called by: entrance ctrl of the object 'track'8 a. g% T% U4 h. L/ K! q
*/3 Q7 I3 O9 ?! |* e2 U7 M
is
6 k$ s/ e/ c% {& y part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 u( X1 k0 D2 g8 {5 ]- H
do
' {" B. J4 ~- M; d6 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;5 `2 r1 d1 U( {8 t1 D ]
if current = @.Destination -- else return% J0 @( Y0 C+ W( |
then
- U0 N8 F7 N: r9 _- l& k; W @.Destination := void;
# g) h7 p9 L9 h if @.occupied then2 }' H7 P# z& I0 B% ]. u
part := @.cont;1 T b! s' \' O8 B- f; e. g
@.transpOrder := void;% K6 Q G. N- ]' H. r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 _4 G3 F. Z, R! m" ^& R% t @,root.eventcontroller.simTime);" s- h4 _5 z' a, ^, U" a% i3 I
@.HasOrder := false;# g: x# \' R: D2 T p
@.DrivingHome := true;3 g) C2 o$ ~4 T; c
rgManager.tryToStartTransOrder;
2 s, @ c5 o; j& o( J; l if @.Destination = void
1 _- ]8 y ]4 Y2 ^8 B7 F% i% t then -- no transport order for vehicle @7 c' z( b7 w r# [% M
@.Destination :=" l- l. a+ _# R- ~8 e
rgManager.nearestFreeStation(@,track.~);- F$ z6 |2 K8 C; m3 c- t; L
newDirection(@); + o& a; E5 Z5 D5 B$ }% h
if @.Destination /= void then h2 ^0 t% f5 E
@.Destination.NumReservation :=7 a8 v: q* t# O$ s
@.Destination.NumReservation + 1;' O: J7 t+ m- G7 x6 B1 J: Y
end;0 e) z: u/ d- o. f; c9 C% `6 _
@.CurrIcon := "drivingHome";
8 f8 E! Q: C* Q5 Y) @3 j @.DrivingHome := true;
* ?! x5 t' N( N end;* m+ w5 ?- \7 z" ]3 B" Q7 X2 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 V# C* G) ~5 V3 u# w8 i5 g1 S part := @.transpOrder;5 G5 |9 d) s" N( d- M, v6 j. L
part.move(@);-- load part
# B/ U2 |1 T* }1 E @.CurrIcon := "load";0 X2 b5 p0 e' I( z, t% f
GlobalDistObj := part.globDestination;! z+ k* t9 M9 Q. `8 v+ d9 C5 w/ B
assignLObj := rgmanager.rgAssignL;
/ t: Y" C0 Z' q0 w row := assignLObj.getRowNo(GlobalDistObj);1 ]) e( _3 i0 B# q
if Row = -1 then -- since 70% J: f6 C: n* c! W1 O
if lan=1 then
, X4 F$ J! V& ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( A- y e$ |% X1 P$ T to_str("in der Andockstation: \"",?.~.name,"\""));. L+ S# f2 z5 P: \+ I+ S0 s
else5 G* s- R# e0 ?$ s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 S( y. E+ ^2 s# Y. o+ t+ j. f to_str("in docking station: \"",?.~.name,"\""));
( ~$ }" r+ j9 D: A! _7 h end;
3 s/ G0 Q$ _4 h8 F" p0 A1 x else
9 U) W/ y. v ~0 x2 k& M @.Destination := assignLObj[1,row];
4 |( [" Q' h; d end; * t C) \5 ^3 z, A2 p
newDirection(@);7 }5 U3 r4 q0 c" G6 j9 o/ ^
@.HasOrder := true;" P2 a: t) ]4 N* {& x" j0 {5 g
end;4 C3 g# W# g) ^+ T: v2 y
end;- c5 x+ r- n2 b
end; -- of the method/ A! Z, E- R- s V: L0 f2 F3 |
|