/* called by: entrance ctrl of the object 'track'
, M7 S* Q6 ^! d*/
+ _0 o2 i7 n) o. G, r9 D3 }is* E+ A: t( L$ ?/ s1 |- _& {
part, GlobalDistObj, assignLObj:object;row,Lan:integer; e; x* h* P, v, Y6 n8 f
do
8 \( W' g+ H8 z9 W Lan := rootfolder.Internal.Tools.AOLlanguage;2 S' U3 u6 o$ S0 [
if current = @.Destination -- else return( I. c- l) N8 h& R: x4 M
then
6 l0 {) Q1 J0 a, B R ` @.Destination := void;/ D/ M1 ^' ]5 X3 F
if @.occupied then7 y) f& u% A5 a
part := @.cont;, A0 w! t4 y" M: [& L
@.transpOrder := void;5 f& r0 Z7 r M2 x: U6 o* H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 S0 d- X' d! Z" _ f6 j3 A @,root.eventcontroller.simTime);
* s6 M) q& a, p: f4 D. S @.HasOrder := false;2 J8 p/ T( {8 u: ?( e ?+ R
@.DrivingHome := true;' F# k' T g! |2 H# \* A. K: z" L
rgManager.tryToStartTransOrder;
0 e: I7 m" z4 P2 R: `6 d+ n if @.Destination = void
! N" k# R5 T; M7 X) r$ [ then -- no transport order for vehicle @0 X' ~; h# F; P$ `1 p1 B& Z
@.Destination :=
$ j/ p5 z2 L1 E4 F, Q' G& }+ Q( R rgManager.nearestFreeStation(@,track.~);9 O7 L1 a* L, P) v; M0 Z7 u+ J5 R
newDirection(@);
; Z2 a7 I4 ?' g4 n if @.Destination /= void then2 E# A6 @# Q7 ^- ?+ N' W
@.Destination.NumReservation :=) _, ?+ U0 d, V6 W
@.Destination.NumReservation + 1;1 R) {! v @4 r% g# C7 a
end;, _! n6 c) W. ?4 G4 i
@.CurrIcon := "drivingHome";1 Y$ S M$ S# T5 d
@.DrivingHome := true;6 k0 c r6 b/ [0 O2 F5 @
end;1 f( u' e: o3 k0 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 u4 _/ A% e% B' N4 Q( [0 I
part := @.transpOrder;
$ y8 G3 z1 m5 c _, q% [5 ? part.move(@);-- load part
1 S! v$ L% n1 z$ w @.CurrIcon := "load";9 ]7 o' ?/ Q/ |2 \
GlobalDistObj := part.globDestination;1 ~, A" |" S1 J' V. [4 ?
assignLObj := rgmanager.rgAssignL;3 D6 R5 B" x* o F2 C$ |
row := assignLObj.getRowNo(GlobalDistObj);2 O1 R- i0 T- q" j# |- L
if Row = -1 then -- since 707 z0 x9 P1 a/ I
if lan=1 then. ]% t O5 t4 Y- [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 v2 z, T/ c' i2 ~ to_str("in der Andockstation: \"",?.~.name,"\""));3 q& Q6 s8 E8 o0 K/ X
else; f, K, Z2 p) Z3 A/ H2 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! F9 C- f9 b. R! e, g/ B4 q to_str("in docking station: \"",?.~.name,"\"")); 4 X5 y! i$ q1 q% S/ }2 ?2 y4 @
end;
$ ~1 ^. m) i0 G3 I; G6 } else
9 y% X$ U& a$ |3 F% p @.Destination := assignLObj[1,row];
6 S* Q) w3 [9 ^& \9 ^& R end; 9 v1 l2 Z7 n) Z
newDirection(@);+ C/ r, D( ^# P( T& R& U
@.HasOrder := true;5 z i8 R4 p5 D! ~* ]+ c+ g4 ^- M6 p/ x
end;
6 h' Y; P: M7 Q; D9 d$ X' X3 H end;
! Y2 Z, [$ v$ X8 o/ m# |) H8 oend; -- of the method
! z+ k1 E7 j" x4 s9 a, @6 K. P; v |