/* called by: entrance ctrl of the object 'track'
8 f9 ~% B- `( S" Z2 V& P. j*/: k' T$ B' T+ i! C! i
is
9 K* I* n: w( w' V u part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 r0 K* _4 b5 v$ ? h
do7 n- N* F7 ?" `- k; v
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 j# L, t# ^, p if current = @.Destination -- else return y+ N* ~( _2 Z' m2 y i. x
then
" Z% w/ b8 J; ], G @.Destination := void; A9 a9 M# E( I: l) [
if @.occupied then
/ j- B- H; y$ b& S part := @.cont;
+ u7 Q3 e1 S3 f7 T* ~9 |) }* |$ h @.transpOrder := void;6 L$ K' ~1 i7 \$ o1 C9 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 w* z7 i! ^; f, A; v, ?2 y
@,root.eventcontroller.simTime);0 J7 I# f6 b" E6 V
@.HasOrder := false;: b$ q S9 L$ K' ]+ A, F
@.DrivingHome := true;: T8 Z" D9 }% y0 |
rgManager.tryToStartTransOrder;
0 J7 s1 {2 F* Y) x1 q! i* J6 s if @.Destination = void( ^" c# ~2 c, D* m0 Z3 E
then -- no transport order for vehicle @5 _) j( }1 V' I& K: f3 B0 X! q& k
@.Destination :=
! R {5 |* D9 o5 s- S& I3 J rgManager.nearestFreeStation(@,track.~);
; C2 g9 c2 U, ?1 w newDirection(@); ; u1 L3 R' L& U- P
if @.Destination /= void then
! S, X6 g" B& O- l. g, i4 t @.Destination.NumReservation :=1 Y8 T' k0 _* A# o! @
@.Destination.NumReservation + 1;
" @/ v5 x3 G- A$ x+ i: Q0 G end;0 a$ `# c% N) r% z: w' U
@.CurrIcon := "drivingHome";) m0 d: D; R( s
@.DrivingHome := true;3 n$ \% ]2 m: W3 p' n) U2 P2 B
end;
3 \2 k, @% F- b) |3 y4 S0 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ P* V6 d/ V( k+ w8 R# {7 u0 `
part := @.transpOrder;
1 o, I) V. c4 _* ]2 w part.move(@);-- load part. V6 o$ m! `6 h% _4 v6 |: ^
@.CurrIcon := "load";
" X% g& L i/ E: l# a$ y; a$ a; X GlobalDistObj := part.globDestination;2 y2 ?1 f) l, i5 b: n
assignLObj := rgmanager.rgAssignL;
0 p; A9 }+ b! W$ T) q- l3 X row := assignLObj.getRowNo(GlobalDistObj);" n6 d) p Z' s$ m8 E7 a
if Row = -1 then -- since 70
, v: f* E4 Y/ o if lan=1 then
7 t0 e% D1 ]$ y6 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) u, r4 y6 g/ p8 X1 I
to_str("in der Andockstation: \"",?.~.name,"\""));
# }0 h9 {) L+ K+ K0 `. B9 t else" U% ~4 R$ u0 h# J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 B7 a5 Q* p# v: _2 J to_str("in docking station: \"",?.~.name,"\""));
) F: N5 }, E7 @" V6 s end;
* p7 e# I) L, d w0 l6 W else
! L* h2 T8 X/ q @.Destination := assignLObj[1,row];
" P* C0 D/ G7 m4 ^/ h. ?/ U0 ` ^, { end; 8 T" L5 y% S) u% D3 {. n
newDirection(@);/ |1 v( i2 y4 G% Z
@.HasOrder := true;9 j; ^1 W( l, G: E' K
end;% A6 W6 J% K% d0 K+ N$ e1 F! Y
end;) [# Z: B& f+ o
end; -- of the method1 o( L7 R1 W6 r# p3 q% @- L4 y
|