/* called by: entrance ctrl of the object 'track'
' z& N- E% [% X$ D*/" S, f7 ?0 s; L5 r q" W
is" H' E; x1 o: n5 [ h$ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 Z1 f- m. B9 c8 Y3 Y7 n7 M
do! ?5 ]1 {& @% g( O3 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
* P, H* @7 L* Y- A8 ~0 A( h if current = @.Destination -- else return9 f z# F. v$ S$ K
then
! F/ {3 c4 x) h6 T0 k9 W @.Destination := void;
" I, @7 m! w/ F* k& k% ]8 y if @.occupied then
/ V4 ]6 q8 p& E0 Y part := @.cont;
. R6 Z) J) [8 q4 D" K: ^7 f5 z: v @.transpOrder := void;
4 K q ~& G: W7 M6 S% N. { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, a/ @' |" {8 W2 D, d" W
@,root.eventcontroller.simTime);0 v4 Z' P% J6 o# r
@.HasOrder := false;, A Y/ {3 y& U% z% V
@.DrivingHome := true;
6 b, B. c/ o: v. J rgManager.tryToStartTransOrder;: Y3 F: Z! U4 o7 O4 Q& D
if @.Destination = void
6 [1 A% G2 Q% m then -- no transport order for vehicle @
. w2 L# {/ N( U: l1 t" h1 h @.Destination :=# {7 Y+ G# J6 e! Y7 y
rgManager.nearestFreeStation(@,track.~);
$ e# i' `; L& ~8 o7 ?# j newDirection(@);
4 E5 V$ C7 r4 r* y if @.Destination /= void then
+ T2 `6 t$ H8 p) u& v3 `8 j+ | @.Destination.NumReservation :=) p5 {# H! o) ~- L
@.Destination.NumReservation + 1;/ `& z- x4 f1 i p" y5 K
end;8 I5 L1 ^* A" f+ d
@.CurrIcon := "drivingHome";
5 O6 A5 L- _$ {: W6 t9 U+ h3 t8 } @.DrivingHome := true;
2 W8 \! D! h' I# E6 ` end;, ~: a7 M4 y! L6 F$ B& E& b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 f, J7 F3 S, q0 q& T6 E8 z% Q part := @.transpOrder;
9 u: [6 {* j9 `, o part.move(@);-- load part- Y4 s2 t7 ^% U Q( e6 L9 d
@.CurrIcon := "load";8 E& m4 C5 @7 i0 {
GlobalDistObj := part.globDestination;7 h$ w1 B0 S; [1 i" `0 ?
assignLObj := rgmanager.rgAssignL;
+ |# p; f) D4 J9 C0 w row := assignLObj.getRowNo(GlobalDistObj); m$ `. |! w7 v0 v u! [
if Row = -1 then -- since 70
; P# o, |4 |$ @6 s. _1 ~. _ if lan=1 then
! S5 b. w: h1 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 O# x- p: c( H) q* q to_str("in der Andockstation: \"",?.~.name,"\""));
6 S; Z1 c. ^# a5 X else- D& P# J; Z* l" j9 `6 y) o7 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 N s( a" K! s; q to_str("in docking station: \"",?.~.name,"\""));
7 ~* r% @$ Y# H3 }0 O1 l9 g end;
# r. B/ U7 V0 q4 @, {! Y else
# @: k# ] f& r4 X, T1 p @.Destination := assignLObj[1,row];
/ S5 s9 I5 i3 v0 H- N& V9 [# V' o end; " h: y$ w( v/ J& e( l7 @
newDirection(@);# P- y1 x* G7 v; U' Y* m
@.HasOrder := true;# C. ]7 e. l: O1 A
end;+ ]1 g. V% O( i0 e( p* K
end;
9 Z: m( r' K, a0 u9 Hend; -- of the method
/ A# m; i3 H7 }3 k/ K; M |