/* called by: entrance ctrl of the object 'track'
1 ^0 [7 j @1 o*/ A1 M$ W4 F( g1 M1 ^/ d' d" r
is
& L+ D/ J7 A+ y& m) O part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 C! J0 a) [" n7 h b$ s
do# g. n: x: r: L/ S. f2 A
Lan := rootfolder.Internal.Tools.AOLlanguage;" |+ t5 w z, H. v4 ~
if current = @.Destination -- else return/ {" V5 P5 Z1 S$ n+ u. Y2 F* H
then
1 }. C- S" { _' M @.Destination := void;
& V- P7 Z: c$ T" L' A. M: X# u if @.occupied then# ?* `. z& v7 X4 [- ?( Y, `' F
part := @.cont;' J( \2 O& G( K- f( N9 I
@.transpOrder := void;# A; t2 z5 I! @7 O, q5 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 l" d* K- M/ t1 u! _
@,root.eventcontroller.simTime);
5 g3 M( d) m1 G" I' h! X @.HasOrder := false;
% s# q/ s* g2 k4 {& J @.DrivingHome := true;& ^& |' m0 z& R6 f* `9 I/ G* Y: H' y
rgManager.tryToStartTransOrder;
2 v8 `+ `5 W! g2 q if @.Destination = void7 M- x9 `# n0 |- b' f- Z g6 o
then -- no transport order for vehicle @8 W* p* O; W$ C8 R/ h$ k2 q
@.Destination :=8 g' V* h; F7 l0 v1 z4 q( A: R
rgManager.nearestFreeStation(@,track.~);
% l) L; P7 s6 v( h5 K; [+ z3 o newDirection(@); ) p9 ^0 A" l" |3 G: v' u! @& P
if @.Destination /= void then
( o6 k9 ~" W$ o+ n5 T X$ S T) F @.Destination.NumReservation :=. M- P t$ I7 e
@.Destination.NumReservation + 1;
$ d0 Y* e1 n H( H/ n* j y end;
9 F9 r0 g: f. D# i$ M! e @.CurrIcon := "drivingHome";4 P; l& a0 ^! s. C8 P8 J" t. K
@.DrivingHome := true;
. S0 I8 Y7 q5 i! d$ B& V$ b end;; B1 f5 h/ D" i/ i% M+ I7 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 k; @4 L, s7 ]' G, }
part := @.transpOrder;
% X. c) g5 q% r; \ part.move(@);-- load part
, H8 g: C1 u! ~ @.CurrIcon := "load";$ s- F1 \' V0 _4 M8 R* g8 u
GlobalDistObj := part.globDestination;
1 x' a( u' W4 d assignLObj := rgmanager.rgAssignL;5 s$ _1 p. \% {& G% b5 d
row := assignLObj.getRowNo(GlobalDistObj);. Z8 s% m4 p, z0 n1 _' i8 m
if Row = -1 then -- since 70
: S: u3 q/ k, B8 T' ` if lan=1 then2 K' t( e3 b* A/ J) l7 S9 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, f) J e {6 G* z" L5 U4 Q
to_str("in der Andockstation: \"",?.~.name,"\""));& m' q E7 F9 O `: B0 o- Z
else! ^3 `5 M1 y# q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! t1 Q; I7 Q( q/ m8 a) d. Q& K; m
to_str("in docking station: \"",?.~.name,"\"")); % m. c# f9 c7 A6 @2 }* R! i" O9 M J
end;
/ \7 r; K' m7 ^5 X: \) o8 ? else3 c$ H7 Z) L& u$ p! ]% e0 C
@.Destination := assignLObj[1,row];
0 [) T$ l$ `& `& f" \0 v. I' B; p; P# o end; * J: ~6 Z6 F5 \% z! E7 w. n
newDirection(@);. _3 w' ?& ?# n% g: R
@.HasOrder := true;
0 D2 Z7 ]8 p$ k+ P end;2 x% t& Q, W" @- O: G4 }8 |
end;9 q, @7 R8 T# d" E! z' N
end; -- of the method! P) M6 | Q) A' v
|