/* called by: entrance ctrl of the object 'track'
2 J' q0 |; s0 ~0 P9 h4 a* s5 i*/
% D I) `( s. R6 ais2 [& ~. S/ [# y; y9 B. ^$ d5 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 q& b5 t2 |6 n7 W: n
do
1 w7 J8 b* R) k" q! I Lan := rootfolder.Internal.Tools.AOLlanguage;1 a+ ^. {) _4 O( Q/ K
if current = @.Destination -- else return% a: f3 i+ R4 U, J4 ]
then* Z' ]( J1 l: ^3 Y
@.Destination := void;
' {% u& [( [* Q$ v ~ if @.occupied then
; e" X$ o# U7 ~8 o* e part := @.cont;/ l5 y( f* b: Q7 ?
@.transpOrder := void;
8 c, @3 y, R4 ~4 u* q3 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, t4 Y9 C' }2 O @,root.eventcontroller.simTime);
& K) |& i+ H) m8 \( U* |. H @.HasOrder := false;
) {" k7 V. p. t4 Y* G) O1 n, ^ @.DrivingHome := true;. p3 f3 Q" r3 I3 P3 j5 m
rgManager.tryToStartTransOrder;# t' I& d# C6 \
if @.Destination = void d& [. w- T5 o! k$ T
then -- no transport order for vehicle @
" v6 n0 B* z/ [4 F6 D! f @.Destination :=& e2 N9 ]' z; n, b, Y
rgManager.nearestFreeStation(@,track.~);, {* P, q. x( Y, x
newDirection(@); + o; j, g* E, P; w( w6 I% P
if @.Destination /= void then* b! y: e# b9 f" R0 R3 x
@.Destination.NumReservation :=/ [' c& d# @0 O% Z; \" ~* W
@.Destination.NumReservation + 1;
/ i! \- R+ |: F, z9 z/ c. Y end;) k" t R% T! C7 h
@.CurrIcon := "drivingHome";$ Z8 R+ Q$ I; Z5 m/ o7 @% a; k* _
@.DrivingHome := true;
2 i5 d3 { F' H" y( U end;
- `& u& T' M3 ]& [6 ~. L: ]% o$ z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 u5 [+ ^7 V" V# X6 U+ ?6 t part := @.transpOrder;
v1 T5 E! X* H7 k/ V: N3 H part.move(@);-- load part
: z7 F4 _: X# G6 s2 \ w @.CurrIcon := "load";; w' p- |% q% B3 ?9 K
GlobalDistObj := part.globDestination;
: o! \+ n. p7 j3 d+ d7 h8 f$ o assignLObj := rgmanager.rgAssignL;# g$ B2 Q3 Q5 d" Z, v1 m9 T
row := assignLObj.getRowNo(GlobalDistObj);
. ]1 @* c% \ \: C( {: p1 W if Row = -1 then -- since 70. O4 u' z( O: R. b
if lan=1 then3 r3 V- O' v+ _: a, w! M4 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( o/ }5 b' O. F
to_str("in der Andockstation: \"",?.~.name,"\""));6 p r* C: v4 U, I- D' ~: P
else
X& G; M+ E* Y; n/ g! m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 J, y7 C5 Y; F to_str("in docking station: \"",?.~.name,"\"")); " M$ }8 M g3 _; S+ ~! I$ p8 p
end;
- M! f* t A" b. s( h7 ~ else& G( ?* s) }6 n$ A- }" U# I( }0 X U! ]
@.Destination := assignLObj[1,row];
+ q$ i/ e- o- t- u, [ end; & V( }" D! g" M% q/ [
newDirection(@);
6 S2 ?( s) G; W" L. R' C0 M @.HasOrder := true;* C- ?( h- Y9 V
end;
# o- E: R2 e0 h8 { end;
" R2 p" P' X) Y2 I F3 M: bend; -- of the method
: P" x% r' ]+ l% P1 o$ l6 P |