/* called by: entrance ctrl of the object 'track'( F+ J) Q1 t! V3 h+ P
*/
* Y- l& X3 J, K. R$ T( Xis' W3 P- j4 x: m& @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ n$ y9 w& I) X& i7 }do
4 {) J% ]. ] |) ]+ p3 t- R4 S, G Lan := rootfolder.Internal.Tools.AOLlanguage;
* I, c2 ^5 o4 B0 n& d% x if current = @.Destination -- else return# O ~( b* V: F! O8 m
then7 o: A: E; [9 n" i
@.Destination := void;
% T- {! W* F! ^8 T: u+ M if @.occupied then8 O( _! y% k5 a9 Z$ _: T0 s
part := @.cont;5 ]9 T, P: k# X
@.transpOrder := void;
- |, }4 h. S5 f' z S& q( R- O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 n4 d3 `8 V3 C0 E. {& O7 j/ p% A K @,root.eventcontroller.simTime);
& E( T9 t% @+ t- N7 E; ~8 |( j+ T( }9 B* Z @.HasOrder := false;; R* z, F8 `% G$ j- ?
@.DrivingHome := true;, S$ A9 c1 R4 S1 o
rgManager.tryToStartTransOrder;, J2 Q0 _5 V, m8 E
if @.Destination = void( x0 `; Q6 `0 W0 _ b
then -- no transport order for vehicle @
' D3 p: J! @4 A0 H$ R+ i @.Destination :=5 U0 p. C% G/ X/ n1 J+ I
rgManager.nearestFreeStation(@,track.~);
8 m' c8 s; |/ y, | newDirection(@);
7 r) ~' }; C4 s8 Y if @.Destination /= void then
. G3 @) C' q3 E* d) | Z% d0 s @.Destination.NumReservation :=; O9 r4 u2 v! O3 e9 k& I- e" L
@.Destination.NumReservation + 1;* v# T8 Y4 h- a* M
end;6 J( l% [: t) B* q! w- _7 m9 E/ B
@.CurrIcon := "drivingHome";* i3 @4 f0 u8 K3 O0 a
@.DrivingHome := true;' z8 X* u$ ?, g1 Z# S; a8 h
end;, L6 M" i) a6 x5 V0 c; V9 P* z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 f& e1 z6 _ h; D0 ~1 c
part := @.transpOrder;8 u1 H5 o7 X+ w2 Q% e" a# J
part.move(@);-- load part
) O- ]+ v6 J: D, y @.CurrIcon := "load"; ?7 D" N2 }2 ~" D" y6 ^
GlobalDistObj := part.globDestination;
) |7 @& \5 |7 h assignLObj := rgmanager.rgAssignL;
3 t9 q1 Y( S& x row := assignLObj.getRowNo(GlobalDistObj);
! Z7 J {6 E, K1 l- o3 p if Row = -1 then -- since 709 u5 b8 i* @ z v- G" U
if lan=1 then; }4 i1 ~" x' E6 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( H; i. O) |2 A; q. y) Q to_str("in der Andockstation: \"",?.~.name,"\""));3 y. N9 P4 k, d$ F; x
else
1 \7 _5 F9 i x" ?# H% @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( O! |0 y# @6 |/ F- t% k to_str("in docking station: \"",?.~.name,"\"")); + |" k6 z' [7 T4 N
end;
5 t z7 K! X3 w' j, s! q else. K: g, l; A" Z" H
@.Destination := assignLObj[1,row];( t2 }$ x6 T1 D9 ]! ~ [
end;
. {0 F) \- r# I/ @* v, P newDirection(@);4 Q I8 O$ `- J8 Y4 i
@.HasOrder := true;( s/ d" v) V" T/ `! l
end;
3 X- \9 T& O: E; @! v/ q end;
5 E' G; X: Y! j; ?8 Q# Xend; -- of the method5 H6 [4 G" V. `: t; A
|