/* called by: entrance ctrl of the object 'track'- A& s2 O* s0 ~+ b, @9 ^ [4 F- n
*/
4 B5 i- g$ q5 Z. n; R: g. Kis
$ o- l( R1 j& e( J$ m7 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;) N( I; f* x( y) t5 W: Z6 k
do
5 K$ S( C. K% H1 |5 p! T Lan := rootfolder.Internal.Tools.AOLlanguage;
]* u5 @7 q# D7 {! W if current = @.Destination -- else return
& e% O3 T" S# W: t* A then) A! l5 H# T% [. Q8 l- |
@.Destination := void;
( J' Y$ |9 d) ] if @.occupied then/ S, d, a3 \. q. V) w% n' T
part := @.cont;0 A( u& D l4 f$ L
@.transpOrder := void;
6 O! t$ b1 d& Z' Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 g I% D+ [9 s
@,root.eventcontroller.simTime);( \2 T' e. Y5 K: ]$ [
@.HasOrder := false;6 X+ a% c; c7 e7 @' i9 E& W
@.DrivingHome := true;
3 p/ ]8 c% n7 q. ~ rgManager.tryToStartTransOrder;# _! o* H4 [8 m2 N' `
if @.Destination = void
- _- j5 y a( @' F then -- no transport order for vehicle @
2 x! Z" t* Q% k6 K' J5 I @.Destination :=
* W; U- P1 p! @1 q! z& _% r rgManager.nearestFreeStation(@,track.~);- W+ `/ I) k4 n; s
newDirection(@); ( O) _9 B' h/ q5 R$ ~2 ?
if @.Destination /= void then
1 r& p/ a$ c) p. [ @.Destination.NumReservation :=
4 L& l3 f/ t6 g: b+ o ] @.Destination.NumReservation + 1;
8 L& A5 H* I0 X2 E; M end;
& ?3 A# t ~' D& }3 N! `! \' w4 n @.CurrIcon := "drivingHome";* e5 m3 V$ f& d" L6 I8 V; Y
@.DrivingHome := true;+ ~& L" ?- {" A) S: G4 a* |
end;( C, A B: ]9 Z1 {) r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& {" V2 v2 m" x! J$ q% d part := @.transpOrder;" P( n- }) z' Z: |+ T, d" ]# C
part.move(@);-- load part8 C% [) U: e1 j5 ~* j
@.CurrIcon := "load";* e" A( n8 ]* v& h$ e: b# z
GlobalDistObj := part.globDestination;
/ I9 u o4 q; [1 ~. | assignLObj := rgmanager.rgAssignL;- _ L( e+ }/ Z0 W
row := assignLObj.getRowNo(GlobalDistObj);7 L# m. u$ b) j {
if Row = -1 then -- since 702 e& r$ Z* w! _6 t# G
if lan=1 then; V0 f) |1 j2 L. z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ^& f5 _4 [; g0 r. K% M to_str("in der Andockstation: \"",?.~.name,"\""));
@6 z2 }) d' w else7 M0 P4 N' K% U, }5 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 a% V2 P; J2 }' s8 k7 ^, [3 q to_str("in docking station: \"",?.~.name,"\"")); 6 O6 R6 J- h" \( O# \3 p! m( b9 J* }
end;
4 M, `, t) i( t+ E- D U5 W1 [ else( p/ _& i/ D" B3 ?, C% I# O
@.Destination := assignLObj[1,row]; j5 z( R5 f8 N. b F% f& y
end;
" x+ e) e% P2 O. s0 }; ^ newDirection(@);
8 `! E- |5 Y& u6 U& E- F9 c1 C! W5 ] @.HasOrder := true;$ P( P. u# L2 A% E" @
end;4 T9 ~2 f- E' | W0 I. F
end;" o( B, q# ~0 P- ?/ z4 U, \
end; -- of the method3 M3 c# ~; M1 Q# ~9 L; N& A' t
|