/* called by: entrance ctrl of the object 'track'' {0 ~3 _ ~+ E1 C+ f
*/ w2 P" s# f7 Q4 T8 X
is! j- P9 ]2 J$ w+ o" _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ u. d. R' `; B8 ldo9 ?6 l0 j# f. b6 X% t
Lan := rootfolder.Internal.Tools.AOLlanguage;5 i+ W+ Q: S3 k- i2 l" Z
if current = @.Destination -- else return: {6 Q. ~; m1 T! C1 e. h6 a
then; E; g* f0 `' @9 W. I$ K0 c1 N
@.Destination := void;- S# F9 L$ C% d
if @.occupied then
# d, a& z9 [9 L& Q$ c! n* w8 q+ d" d part := @.cont;! r2 D7 y6 R: C- O, |9 q
@.transpOrder := void;! S H' J0 U4 _( N4 {" Q: I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ o7 h, H4 H5 J+ P
@,root.eventcontroller.simTime);
. r4 t6 S. K+ ]& i$ p2 y' }: W @.HasOrder := false;, X1 }( y+ e- O* G# k+ E
@.DrivingHome := true;# E% ~+ U8 m) n! |2 g9 y- ]1 E
rgManager.tryToStartTransOrder;
8 I! E3 `) Z' |7 z2 K1 \ if @.Destination = void
5 [' J$ h5 F! y; F, n then -- no transport order for vehicle @8 w1 p9 e: [5 V! U
@.Destination :=
( r, _! V+ \5 }0 H$ } rgManager.nearestFreeStation(@,track.~);& J' C" P3 [5 q& y/ S
newDirection(@); 3 c& `$ X8 T7 x) Y! K8 f4 j+ b, p6 C+ _
if @.Destination /= void then0 y- {. P2 Q% F3 B
@.Destination.NumReservation :=! I& p8 I7 j: E
@.Destination.NumReservation + 1;
, T* a$ V9 X0 V, k end;' e) b. q1 U% u V5 R1 d
@.CurrIcon := "drivingHome";& I2 q# j/ M8 a d" W
@.DrivingHome := true;, t5 D" Q" e) e/ B
end;2 U5 k( R5 q- L+ I6 H0 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 N5 ]$ \' ^, `0 c" c. y/ l, I part := @.transpOrder;
: v: R) Y6 |: [* B3 H: o part.move(@);-- load part
* u7 G$ f& [9 {9 D8 z' a4 ]/ m3 P0 P @.CurrIcon := "load";- w% h( o g9 p) {
GlobalDistObj := part.globDestination;
/ N7 E3 j6 O7 ]+ U assignLObj := rgmanager.rgAssignL;" G5 {" ]9 G5 G4 c5 v5 r
row := assignLObj.getRowNo(GlobalDistObj);
2 t% u2 i O9 ?1 ?; w; N if Row = -1 then -- since 70( p% \, L7 h! G1 L$ f7 I
if lan=1 then5 S: @. ]9 q( R5 O6 W( S% a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ]" @( R* n* w to_str("in der Andockstation: \"",?.~.name,"\""));
! q5 y9 }3 i* ^ else' M3 q6 k% i. ?% B) d: n# v1 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# I3 Z( o) S, b+ |
to_str("in docking station: \"",?.~.name,"\"")); " ?. a0 o1 W- y7 {) n
end;3 G; p7 G) Z; P5 M/ O3 X1 e
else
# t- j6 ]; g; q, u @.Destination := assignLObj[1,row];$ U! [* c; z" \+ T% g$ C
end; 9 x$ t, Z G+ G$ ^) |
newDirection(@);
0 ^( F" K# @# M' u9 v9 t5 P- n @.HasOrder := true;
4 S8 x x5 |( r+ `3 e l end;
5 T0 ?0 q9 W1 m; F, o( o# b end;' W: N% t) ?- \( d* C
end; -- of the method+ V( ~, I: J! |' Y: Z. q7 q3 S' S* h
|