/* called by: entrance ctrl of the object 'track'
4 ]1 O" R- l; m, J; g6 ?+ W*/$ ]4 W. t; i! f% z
is
9 w4 |6 |# k5 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( C9 l0 X% K9 j( a6 [- `do" G+ u. U. c4 O3 C5 h% D9 I
Lan := rootfolder.Internal.Tools.AOLlanguage;6 M" a% f l( P2 q' E f4 x
if current = @.Destination -- else return
, P6 ?2 s! W2 B0 e$ X6 s then4 J9 G8 z- w# k9 S; n* H" n
@.Destination := void;
6 M0 I4 K7 w% w k7 T! } if @.occupied then. g- M8 J( V2 m
part := @.cont;
$ t6 z8 V# E' L @.transpOrder := void;2 \ i9 {- j3 V- _% y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ B+ N) n; f8 ~# g @,root.eventcontroller.simTime);+ k. ~; c& }" M1 i1 Y5 f, z% D
@.HasOrder := false;
) U! E) L$ I }" f: m3 o4 \: f f @.DrivingHome := true;
" q7 K7 X g' n% e6 |! L rgManager.tryToStartTransOrder;
6 |; Y( r* s7 n if @.Destination = void
2 I; g% U* h! ]7 J& E then -- no transport order for vehicle @
# A8 q- P- ~6 M; L6 M/ J( E. I2 R @.Destination :=9 R! [" h! S* g1 i1 o
rgManager.nearestFreeStation(@,track.~);$ A2 U* w% t$ K) p9 M$ m
newDirection(@); # N7 ^( e, C8 P! b+ S8 Y* i, d3 d
if @.Destination /= void then
# V) T4 r8 t+ y4 ?3 N6 E @.Destination.NumReservation :=
8 x ]. F) o/ h8 }$ w/ w! L8 { @.Destination.NumReservation + 1;+ e& Y+ _+ ~2 l3 q5 B
end;
) V5 D$ L" ~- U2 o3 ]# V @.CurrIcon := "drivingHome";
3 o- p( S- H9 U2 w @.DrivingHome := true;* E0 r: z. r& Y2 K' U0 D
end;
3 k9 W: ~ |- S+ b( t% b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! X' V$ s7 }) ~% g9 C part := @.transpOrder;& T8 [+ a- O7 g8 m7 z4 e
part.move(@);-- load part
6 o q5 [4 f8 Q( o3 @0 X+ W! I. E% V @.CurrIcon := "load";, G9 K r1 v+ z/ w
GlobalDistObj := part.globDestination;
2 D! f: {/ e( [/ t5 M0 N9 X assignLObj := rgmanager.rgAssignL;
7 y5 l; V" C, k/ `5 ]! X7 ?/ Q row := assignLObj.getRowNo(GlobalDistObj);9 I+ \* Q5 ?0 J9 S2 |3 i
if Row = -1 then -- since 70
. ]( Y8 l8 c1 F7 O% n if lan=1 then6 ^2 Y) t- T' H& d6 l W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# z& z$ x& a) @" l
to_str("in der Andockstation: \"",?.~.name,"\""));
o; o: z5 o( t2 u5 ^ else9 q, n, v+ [& p) K# a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ Q) G8 M1 i8 P1 g9 Q) z
to_str("in docking station: \"",?.~.name,"\"")); , N S. U7 Z' B6 O* ?
end;" c- ^4 S& ~2 c m
else* P' Y; Y- k m% _
@.Destination := assignLObj[1,row];% a3 M! R1 F$ x# N
end;
! O+ ~7 t1 u1 i- j newDirection(@);8 X8 I1 \; ?( w4 k# b- B
@.HasOrder := true;9 ^9 [$ S8 P* v' Y9 f
end;5 x7 l* b% f" @: A) H) G6 _
end;! C- V# W. M, l( Y* B/ I. m) m( i
end; -- of the method
/ {5 C" {" B4 d; `7 L |