/* called by: entrance ctrl of the object 'track'/ `$ X8 W9 W, b' i
*/
0 |, K. v! n. t$ `: O4 c5 X/ ^is
( z. g# `6 S+ u' a part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ {3 _& s4 ~6 D e
do5 k6 {3 k; u$ D1 H: J
Lan := rootfolder.Internal.Tools.AOLlanguage;3 {9 m: a ]/ ~
if current = @.Destination -- else return5 n$ ?" C7 d6 r- R: L
then8 U1 D& \* O1 i" n# Z, k
@.Destination := void;
- [' q' O$ J& O% o& o4 t& |" G% _ if @.occupied then* p: _* U5 L" |, w
part := @.cont;& n C% k! K0 g; W
@.transpOrder := void;/ p( _2 h* I" D0 a9 p! y* Q* }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ }6 X2 l6 c* _. a/ w/ o9 c @,root.eventcontroller.simTime);2 ?+ W1 N' x2 u
@.HasOrder := false;! l2 d* ^, c j8 a# b+ `
@.DrivingHome := true;7 q- p8 M/ m+ y& z) K
rgManager.tryToStartTransOrder;; a$ o+ l5 j( Y9 O
if @.Destination = void
! l/ |/ P) Q9 F# ?9 Q; r then -- no transport order for vehicle @
. C) y* o4 L6 [/ b# v$ w @.Destination :=8 }2 Q- ?! ]! L6 e* O3 q+ n& v
rgManager.nearestFreeStation(@,track.~);) E& J/ G. r9 ^6 Y: V
newDirection(@);
4 k# ~# }* B& V if @.Destination /= void then- ^3 ]6 ^* F5 C/ J
@.Destination.NumReservation :=
6 z1 y2 a8 {6 Y5 b A/ A @.Destination.NumReservation + 1;
6 p$ v1 B) h# L# Q5 y: y end;
: x; a2 i; Y6 ^* a( F/ r @.CurrIcon := "drivingHome";
$ L; d, q6 d4 m' j; ]* l% E" C' H ] @.DrivingHome := true;
4 S; I) d1 f( r# y1 B: k end;
# X( i3 a* N l/ U4 W& K6 J/ ]) p else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 r) S2 I& M [
part := @.transpOrder;1 |6 K$ E& r# `5 w
part.move(@);-- load part! p6 F6 Q9 s" I3 _; g' z
@.CurrIcon := "load";( e$ v' c: l4 E* r. ]( ]2 H' ^' G0 y
GlobalDistObj := part.globDestination;
4 I1 v, w7 z5 n# q assignLObj := rgmanager.rgAssignL;/ X. k* O0 v8 |+ R- S; ~) s
row := assignLObj.getRowNo(GlobalDistObj);
! ~( Z; v: J" S if Row = -1 then -- since 70+ M) e" x0 s* q9 C# P1 {
if lan=1 then" @" \; L! E; c$ @' s( e* @: b# j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) j+ i2 T9 T5 b0 W
to_str("in der Andockstation: \"",?.~.name,"\""));* D7 E1 c+ A( X+ `- F# |' v
else# ]* J5 l5 r5 J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 T7 D% F& |( ] F$ Y to_str("in docking station: \"",?.~.name,"\""));
) L% ?* ]/ i- \8 |( {0 z$ i3 X end;
. ^" @1 Z( |7 [) O! T9 Z else
9 B7 G; F0 t. I @.Destination := assignLObj[1,row];
2 S; L6 ?+ k8 S0 N end; ' y' l! f# l% P' F! u
newDirection(@);
/ o, W# ~7 p# s @.HasOrder := true;/ U t2 u% J3 [1 f2 \- P0 ^+ d
end;
; J5 C( Q5 R/ G1 p9 V6 O( \$ [; u end;
4 n1 L3 p: a& oend; -- of the method
6 l6 \! _7 H% V' Y# o, \ |