/* called by: entrance ctrl of the object 'track'3 z" A0 c/ V# e2 C
*/7 V4 ^ J( {: q& @. E) C7 a* v
is4 O" g1 c X6 S' }8 m: J! q4 E9 V/ y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 x& W. g' y# s0 H5 `
do
9 @0 N4 a' [( v) f) l; H Lan := rootfolder.Internal.Tools.AOLlanguage;0 r7 G) r6 a* @# O* b' B" e/ L
if current = @.Destination -- else return2 h7 k3 a- E4 j$ O6 u+ m2 T
then
( H- @3 O Y# X3 C$ ^$ x @.Destination := void;
- |! T4 i1 q' T3 f if @.occupied then
3 O8 F4 o$ R& _ part := @.cont;2 k- d, P9 X4 d9 R+ Q8 f( P9 ?
@.transpOrder := void;7 S J0 y- H+ @. q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 z; D+ P1 w- G4 B/ c
@,root.eventcontroller.simTime);
+ k' R1 q& c+ N. g @.HasOrder := false;! A3 ^* ^% Q8 B- ~# z/ K- l
@.DrivingHome := true;
! ~( V0 D# D% p rgManager.tryToStartTransOrder;
1 \ @$ ~/ L* _3 w# x- [ if @.Destination = void/ s$ N. F: W- K+ ~9 R( C
then -- no transport order for vehicle @/ v9 E- O0 _5 `; B; [, ?* U
@.Destination :=
M8 Q. Z& E* \ rgManager.nearestFreeStation(@,track.~);2 p) @# \6 {$ t" m# y7 T/ w
newDirection(@); 5 ?" S+ I) E1 u5 _* |( _* R& F
if @.Destination /= void then
2 j m4 |3 n1 {$ m3 j$ Y @.Destination.NumReservation :=
( g8 ^4 v7 Y& n6 P7 b2 H! e @.Destination.NumReservation + 1;
- P& _4 M' T$ v0 k, N' U' x! q end;! b: S/ a F }2 H* o2 G/ n g" T
@.CurrIcon := "drivingHome";( e u5 p+ G) f: t6 j% b
@.DrivingHome := true;
( h. k" I/ _2 p" C+ U1 O end;& K4 P/ B+ q, m' j6 N" X4 e) Y' c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. M8 t. T/ b" b4 t0 Q! [; p
part := @.transpOrder;6 O# I( c8 G3 I, ?
part.move(@);-- load part
8 b9 Y: ?# p# _( [5 q' E4 V, G @.CurrIcon := "load";. ^- {3 a9 G% N7 B
GlobalDistObj := part.globDestination;3 ?! P/ Y; R5 ]2 {3 v
assignLObj := rgmanager.rgAssignL;( P- c0 F% M0 b& f- ~ S' u3 y
row := assignLObj.getRowNo(GlobalDistObj);
' d+ B" N, q! F+ F if Row = -1 then -- since 70
' _( t6 F! v7 o/ r9 @; k if lan=1 then$ n6 u1 H$ G+ E5 V$ u) `2 L& ~# f) Q2 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ }2 d" z3 H% r O! t to_str("in der Andockstation: \"",?.~.name,"\""));# }0 O! B. n7 b! \' @2 U! G
else
3 c) y5 `* X3 r$ D" F8 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" v$ d; m' I5 ^' M3 h$ ?' j$ M to_str("in docking station: \"",?.~.name,"\""));
: b6 V2 P+ Q8 O% ~& c end;% {9 k/ B# b) C2 T
else
) N: Y4 Z; t8 }3 ^- R' q( A2 t8 L @.Destination := assignLObj[1,row];
( F+ W) B9 ~. {/ I! Y# m+ s- w, } end;
0 U( M. L1 Z) p newDirection(@);
* b. x- m* A- z% l @.HasOrder := true;" S6 m' F4 `( n2 W S9 q/ [
end;
* Z% Q1 s2 |9 ~% e end;$ D5 X; \" w( X( u
end; -- of the method
1 U, K* H: ^3 ` |