/* called by: entrance ctrl of the object 'track'
# q! ~8 O4 M: Y- e*/. j1 z- H/ F( }* f5 \7 h l
is: C8 |; v8 o( }4 g/ A3 s2 w2 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Y w$ C' T2 _, g4 A3 E0 N$ g8 C
do
% H! v9 O' W4 p3 { Lan := rootfolder.Internal.Tools.AOLlanguage; D$ ^7 \8 N9 M5 ^9 j$ J
if current = @.Destination -- else return& U5 @- h6 t8 Q5 m
then
& i& d M8 [$ m, c5 { @.Destination := void;
+ \; p, z% Q9 B if @.occupied then4 a1 Y5 [% C4 y" k) Z
part := @.cont;/ \$ I3 @5 }' a. M: z
@.transpOrder := void;, y; b, f% a) [' Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ~3 n" j }! n
@,root.eventcontroller.simTime);; X% M- o8 O/ t: ^+ |
@.HasOrder := false;
. ~: n, Z' {3 t3 w @.DrivingHome := true;" ]" ~* K0 V3 x5 Q1 m8 i: \
rgManager.tryToStartTransOrder;
1 d5 G1 [0 T+ x, _7 x if @.Destination = void: U; v7 r% E8 L L! U
then -- no transport order for vehicle @
& F1 a8 o9 E" k [ @.Destination :=
3 a6 b* b0 e6 [* U0 ~) h rgManager.nearestFreeStation(@,track.~);
8 d" m: z( s+ Y) M* G/ `- R3 F newDirection(@); " z A" G3 l: M( `: U
if @.Destination /= void then
4 _& o, m& Z& p4 u! e/ u' N @.Destination.NumReservation :=1 D# K+ h; i" K/ `- ]
@.Destination.NumReservation + 1;
+ Z; X3 {5 G* V: ^" I, r end;3 a! _ z8 z/ S% n D
@.CurrIcon := "drivingHome";
" g) }' S6 U- p) [0 I- F @.DrivingHome := true;
( V) }4 [ l& | end;
2 V2 O1 S; z8 }: Z' Z \9 w' }- h/ b } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! J2 |! Y& z. b6 }! ]" W part := @.transpOrder;
- w* `$ o! l* A& J( }, A" S# G& A part.move(@);-- load part2 k* |0 q/ h0 i2 T
@.CurrIcon := "load";8 E# k5 s$ |+ f: A/ S1 S
GlobalDistObj := part.globDestination;( z! a. U9 n" @
assignLObj := rgmanager.rgAssignL;# K" f; z0 `+ L
row := assignLObj.getRowNo(GlobalDistObj);( @1 N8 w' N+ q4 O& j/ l
if Row = -1 then -- since 70$ |( f+ A5 o- ?, Q9 R. o5 A
if lan=1 then5 h% C% Y9 C* M2 n. j% U5 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! U- l: n% o! u" q, N to_str("in der Andockstation: \"",?.~.name,"\""));0 J6 d. p/ ^+ Q+ ]
else4 ^. O- k+ i7 C: u, I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& e/ M7 P) a' n5 K: @2 T" l" h to_str("in docking station: \"",?.~.name,"\"")); 5 s8 M' F' a8 ?1 S1 j5 H
end;( K; I4 S% G5 M* Q- R
else
3 A+ N" r' h2 V" x+ M' ` @.Destination := assignLObj[1,row];0 O" c2 h6 U, P4 d. n( b, ?
end;
8 o4 ^7 `4 u% B( o8 S1 \ newDirection(@);
& l. I* Z) |. D* A$ X @.HasOrder := true;# x( w6 }3 P- h( b) m q) S
end; T$ a* S+ g/ H# u7 }/ ^. i
end;5 J6 K$ H8 U8 r8 L/ ?- A
end; -- of the method
" _* d5 [, X5 w5 D3 L |