/* called by: entrance ctrl of the object 'track'9 B7 {' B" E' l# y. o1 i
*/8 W- t+ C* o8 R7 B) R" `
is
7 e2 C6 B* d% m, a# s! C0 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: J+ B# [5 _) I. a I5 Ddo/ g$ P0 l' h3 n0 R. A
Lan := rootfolder.Internal.Tools.AOLlanguage;8 W2 n+ U" i* N4 a+ M; C; x
if current = @.Destination -- else return' g) B8 y/ W& q4 T
then
) M, q4 @& y ] S$ U @.Destination := void;4 o9 U0 P# _ m4 \2 B% |3 l9 `
if @.occupied then
7 Q' e6 S' T. a4 Y0 Q }$ N part := @.cont;* C2 p- Y% [" z# l# }! S
@.transpOrder := void;
" X0 b- Z" E) z0 t/ n4 }, v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. t0 ~9 p8 X6 v3 I6 x" {4 G @,root.eventcontroller.simTime);, s9 Y, ?3 B1 ?& y6 s) U
@.HasOrder := false;0 g! S _" ^- V8 @$ y
@.DrivingHome := true;; |. A# W( j" ^ m0 M
rgManager.tryToStartTransOrder;
. z8 L2 A6 [- n5 o5 w if @.Destination = void
- t6 T M$ a2 j# N then -- no transport order for vehicle @9 B, d3 m" G$ r
@.Destination :=* a" A5 Y* g' Z4 S# C4 J+ I8 O4 f0 u
rgManager.nearestFreeStation(@,track.~);# V. @' _0 @9 Y
newDirection(@);
8 R1 n5 ?* H) j7 L if @.Destination /= void then% m7 p L' G, |5 K3 g* F- k6 a$ [
@.Destination.NumReservation :=) U9 L% h- }2 Y9 \, F( F/ g8 @
@.Destination.NumReservation + 1;
0 b- @+ X* J* p' L; Y9 [ l end;7 ]# [) g6 j) u6 q* P2 M
@.CurrIcon := "drivingHome";
/ e+ D3 ^; F" R0 X9 [ @.DrivingHome := true;( y; g$ K$ Q5 ]2 ]2 \% ^3 N% u% |
end;: U; l$ d. T4 v* q/ ]- L {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ v. p( x( D8 L c part := @.transpOrder;+ u$ u! B$ f5 |( U! R& \
part.move(@);-- load part
6 y; G( T* i0 W, _ @.CurrIcon := "load";
A! N4 P' t2 u& q `+ P: F6 ]/ E' m( H GlobalDistObj := part.globDestination;( a4 I9 M7 O% K& V8 i+ C
assignLObj := rgmanager.rgAssignL;
0 Z& i2 V1 g1 y/ O( o& j1 V row := assignLObj.getRowNo(GlobalDistObj);* c, @' }# W& ~
if Row = -1 then -- since 70
5 u8 B) b. {" W' U. |2 ?& K7 Z: D if lan=1 then; j6 r6 H* u' z" q0 p2 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ K: h* G8 z# ?5 F! Q, l, b+ I* v& t" F, { to_str("in der Andockstation: \"",?.~.name,"\""));
! W" b( j- h9 {% d else! [# B0 D) R! L k1 K, }3 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& ^, ^8 b( y( W5 Q5 x to_str("in docking station: \"",?.~.name,"\"")); - z' | I9 c* u3 v# k; h) t
end;9 n0 Y& b; {( g8 \* U
else! v( W* r2 z* H2 e/ F4 m) c
@.Destination := assignLObj[1,row];
: |3 O5 m0 P( n7 z end;
$ }% v+ j4 ]' X" B1 ? newDirection(@);
9 }' e" w! |% W' i. z( s; i/ n @.HasOrder := true;
. M6 j: q( R7 E, T3 ]/ [) h" R end;6 @1 a5 r6 h9 _: U8 D
end;
4 F% L( ?7 i0 `6 ^end; -- of the method
! x" S0 e! @) _+ i; e |