/* called by: entrance ctrl of the object 'track'
. z& j3 \' {7 v/ E*/
/ s( K( f$ b! A" dis
, S6 g# y5 t0 T0 \! U" E0 W J part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 @9 {3 E- z$ ?( t) O t
do
) `) s' S' m6 n* p4 l) b- A1 }4 L. Q Lan := rootfolder.Internal.Tools.AOLlanguage;
/ t7 I& }# d. T9 n5 B& O if current = @.Destination -- else return; }2 w5 V: B( ~: } |
then2 ~$ W5 N( M/ `
@.Destination := void;
& U: [2 i. B: K0 G if @.occupied then, J4 @9 a! N' r1 W0 Y+ g
part := @.cont;
$ U. a- [9 q- X. x2 w0 W0 J @.transpOrder := void;# p l" l9 q, ?" f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! M2 w, C* h: J) C @,root.eventcontroller.simTime);
4 M8 t$ R' |( J9 U1 Y9 ~5 l8 { @.HasOrder := false;
+ Q$ D* l# P$ V; D( _ @.DrivingHome := true;
/ |2 p2 p6 J1 [7 {; M; q rgManager.tryToStartTransOrder;, D0 w# K, t- U) ]& W% u, [* h. x
if @.Destination = void" Q Z4 a) V* W9 Z
then -- no transport order for vehicle @
3 k& {" t) n: N% Y1 H @.Destination :=6 Q/ N/ u+ U. I4 B
rgManager.nearestFreeStation(@,track.~);
) x2 u) f0 i7 \5 f5 L9 N, t6 |3 d newDirection(@);
! Z+ |) l$ s" ^6 {6 M0 }$ [$ o if @.Destination /= void then. r( }3 u- ^$ w2 L
@.Destination.NumReservation :=6 ^* u! Q* F7 N0 O' S6 T
@.Destination.NumReservation + 1;
8 p( e$ N1 `. `& \" r* p end;1 e8 `" \7 R. I8 G$ {
@.CurrIcon := "drivingHome";# ~& I: q4 R' m; t" k
@.DrivingHome := true;3 C. Z/ T$ j: `, J6 p
end;
& e; A: j o a) N else -- the vehicle @ is empty, both vehicle and part are in the same dock station( f3 U; y& a" F" [
part := @.transpOrder;" ]2 e5 b |9 I4 g' N1 H
part.move(@);-- load part
- {! I! X$ N% o6 @0 x" | @.CurrIcon := "load";
, E- X( J2 \ x# J GlobalDistObj := part.globDestination;
, E1 l3 [8 y* d3 m3 ~" U! o3 h assignLObj := rgmanager.rgAssignL;2 a+ n' D5 y( a# O0 m7 T: }
row := assignLObj.getRowNo(GlobalDistObj);8 @; d% w" z5 ^6 h$ Q+ H2 ?
if Row = -1 then -- since 70
]2 f- e8 F S* L3 r l if lan=1 then2 z8 W: o5 f! l0 g1 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 V# [9 {: x5 W to_str("in der Andockstation: \"",?.~.name,"\""));
# Z1 `* ] ]! \% o a7 I5 L else
5 y7 j# x# W4 U! ]2 ^3 ^# G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) K% f H. ]( f: ~! `: }) L. \, t! |
to_str("in docking station: \"",?.~.name,"\"")); * T- A! S4 o6 \( `2 y9 t" O
end;1 e& v& M# j* W5 I/ P8 W$ f
else: _5 [, F) U! Z1 }
@.Destination := assignLObj[1,row];
2 j1 }& u3 O9 B7 W& z4 E9 } w$ G8 H, D1 X end;
) Y" x( k/ S% R5 W V newDirection(@);
* ~+ E9 U- h9 ^8 N) l# D @.HasOrder := true;; L$ A" D& B/ w" p
end; u2 D1 M. p' f2 l; A
end;
/ U" ^6 g: Y& C+ Iend; -- of the method
. e( q8 L8 C7 z. _& Y1 ` |