/* called by: entrance ctrl of the object 'track'
8 g7 H' R/ D5 I# o3 v, }*/6 }# ~: q9 y5 }& E; o( d! E
is
4 U" Y" E/ r6 Q1 M# [/ Y: P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 F5 V) m7 N/ t+ G1 n% ?# A/ Ado
) b/ i1 `* g1 I Lan := rootfolder.Internal.Tools.AOLlanguage;- ~- _& }9 \, B) b& {+ z
if current = @.Destination -- else return
* d3 D1 m' |. k: A; Q) A/ h9 a/ z then
8 u+ C; B$ c7 n9 O' O" u/ r! M @.Destination := void;
# `6 x9 W. K C+ R* g$ d if @.occupied then% c( t( N" v, B, }+ b
part := @.cont;
9 c# v) x: @) W0 f- [; S1 _ @.transpOrder := void;
( |6 N% c' w- N( Z4 s. p. _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 w4 P: g% s0 i' m
@,root.eventcontroller.simTime);
; k6 k! s. C) ~) d @.HasOrder := false;
' r; j$ w9 [" N. q1 L9 P @.DrivingHome := true;
t# H, i* ~1 @, l rgManager.tryToStartTransOrder;
' W( v8 B2 L% Q) @ if @.Destination = void
/ T. {4 h0 i7 e% d8 P then -- no transport order for vehicle @
% G) _! t( S2 T/ ^& X/ @ @.Destination :=
: @3 U+ L/ [1 M& N* [ j- Y: m rgManager.nearestFreeStation(@,track.~);
* j1 j" j5 R0 R1 w7 f" b+ Z newDirection(@);
$ M# _' I! x. U+ h( `1 A- L if @.Destination /= void then6 W8 P8 w2 m/ [2 d
@.Destination.NumReservation :=
" C! W7 l" q# P- i: V Z @.Destination.NumReservation + 1;7 y5 m3 K' v. ]' _- K1 T5 A( I
end;6 p3 y1 H" O2 W5 s6 [ i
@.CurrIcon := "drivingHome";
2 O2 ?, u9 q) \# A- ~# x @.DrivingHome := true;
3 B+ `9 E+ S( t, m end;% r+ E. L# m+ j, l* V; U9 j$ T8 O4 Q/ N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 g1 E6 y2 V! D. O Y
part := @.transpOrder;1 S5 k0 f; |' j3 e; W
part.move(@);-- load part" n1 B( V3 X' u9 A
@.CurrIcon := "load";
4 A. a* v& k9 [. I& l% u GlobalDistObj := part.globDestination;
6 u# m. O) U- I }& D assignLObj := rgmanager.rgAssignL;: d; C+ o- Y3 G* V2 u6 ^
row := assignLObj.getRowNo(GlobalDistObj);. J* z" S" U& d4 h S/ c: H1 ]
if Row = -1 then -- since 70
! F: V# L# p& Q/ T9 X if lan=1 then3 {) S: ~- r9 |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( d6 x5 [# ~3 f& P9 G x B, V to_str("in der Andockstation: \"",?.~.name,"\""));
4 o8 G7 N: Q- Z9 H+ B1 Q else
* [; |5 L. w6 R. i ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ i3 S4 {1 r* V: ^8 R, u6 r to_str("in docking station: \"",?.~.name,"\""));
`6 t1 r. K* J' L9 H7 X end;
* m7 R( U3 Y9 w" P" l else
1 f: u) T, ? d) _8 u- g @.Destination := assignLObj[1,row];
5 v8 U- s) \# f& L- n6 b4 r end;
- B" s- P/ |9 }' a; x1 y5 M newDirection(@);9 b3 s8 Q( i; B n) h
@.HasOrder := true;
( I/ {) B1 S& T( H9 d% u+ W3 K/ @! [ end;$ D7 r' a( H) ~& {! F1 G
end;, s6 z% s2 c8 f9 F( y
end; -- of the method
0 G) }* A) ?8 E- S |