/* called by: entrance ctrl of the object 'track'
1 V1 {5 c3 g+ [) s8 a3 j( ?1 f*/, N- j, }7 u& x
is; D9 W) w& [0 }! n# C/ B+ i/ R
part, GlobalDistObj, assignLObj:object;row,Lan:integer; [( v" u0 p, i( t
do
& `9 S6 {9 F8 ?3 Z7 Z! o Lan := rootfolder.Internal.Tools.AOLlanguage;
N. S' w# i ^* R if current = @.Destination -- else return. J* E8 s8 H& J" O5 k
then7 Y, T: l& v' [2 C3 e# x
@.Destination := void;
* o* B/ H- t$ _) w5 s R2 ?, G if @.occupied then( e! o1 l4 e& j4 s* M4 B4 [1 l# }
part := @.cont;
; C; A) Y% s3 c" E: | @.transpOrder := void;
6 S9 o1 j5 J* V/ l! f; h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 q( Q1 ]3 z2 v1 t3 Y4 g
@,root.eventcontroller.simTime);
% w! A9 n4 a7 t" ?+ l @.HasOrder := false;
# o7 M, F- U* @6 O4 `4 P @.DrivingHome := true;
* q$ b4 {* G0 L: o rgManager.tryToStartTransOrder;* ]" D$ O. W5 b2 ]" R. \/ J
if @.Destination = void
; x0 P5 x9 u& P1 {& t9 E; K then -- no transport order for vehicle @) W: c1 \! r( n5 \# R- R
@.Destination :=
1 V3 I2 A8 t! P7 w# b+ A rgManager.nearestFreeStation(@,track.~);
4 @4 I+ P/ \( n3 P* i( k- e newDirection(@);
- Z3 E. |; C7 d7 Z @ if @.Destination /= void then
9 t$ J O8 z7 i6 ?% b @.Destination.NumReservation :=
( `, l2 K( b1 S @.Destination.NumReservation + 1;
6 x3 r) T5 u8 M- _ end;* d; F9 L2 g2 g% m
@.CurrIcon := "drivingHome";
/ d9 J, F1 o0 E" c4 J, Z8 ?1 O$ l @.DrivingHome := true;& R0 C, R7 n; O3 j$ ^! j6 u
end;
' o3 y( c8 Q2 z6 R, @$ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station- r5 h3 |2 D+ Y# l3 V. S
part := @.transpOrder;+ o1 C9 y) X+ n1 b. z
part.move(@);-- load part: Y) W/ i8 m) x$ z
@.CurrIcon := "load";' ]( Q* X ~% w9 Q" ?
GlobalDistObj := part.globDestination;
+ E" ?; \3 B3 z. ?; \. q assignLObj := rgmanager.rgAssignL;
$ F8 `8 X+ n' q, l row := assignLObj.getRowNo(GlobalDistObj);4 V- y6 b5 l8 j6 _; _7 x9 U- e
if Row = -1 then -- since 70
' k3 f* q4 U- k/ `% B/ V if lan=1 then/ [: E3 N* R. v. Q% c) H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ C) v A6 F, u/ q9 W to_str("in der Andockstation: \"",?.~.name,"\""));
" S# `% |6 z0 F# J7 s4 K else
3 U5 o x0 F% C* i- v" K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( O/ i: S% U6 L4 ]; Z* k5 s! Z# t to_str("in docking station: \"",?.~.name,"\""));
1 M! W5 M7 W3 n9 u end;
# c& N( Z5 q9 q" H6 N4 `! g2 n else
, c/ S0 U' \9 T+ ^7 Q7 @ @.Destination := assignLObj[1,row];
1 @) S4 R$ W: E' W4 { r0 L: N$ L end; $ K4 g/ y2 o+ {* F) V" \- {: v! c
newDirection(@);
- }' d9 y, k( ^) d/ b @.HasOrder := true;
& S3 c4 F% r5 v5 f" L end;
4 z: @0 U. W; E) y4 I; F* f9 S' M end;
$ x4 R, [3 H {& E. @* B6 B1 U7 mend; -- of the method
& T2 T2 S) G* [6 J3 c- @ a4 D) K8 I |