/* called by: entrance ctrl of the object 'track'
, t, ~$ X& {* s+ |5 }$ k*/" a _3 Q+ v, q$ h
is
/ U# r/ j8 ^7 k& n7 n. M. N& d part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 @% F" W1 q2 a O
do/ M9 q6 H4 Y9 \9 B7 y3 C7 \5 W' [: m$ K
Lan := rootfolder.Internal.Tools.AOLlanguage;) `+ @5 M4 Y- Y
if current = @.Destination -- else return+ P. S: a3 s( E0 X1 m
then# M. Z- B0 m! I& G- R% D' x# g
@.Destination := void;3 E6 {0 e* I8 W( g9 S1 j" J# m
if @.occupied then
' R/ ^% \; z; ^! ~! F part := @.cont;
. H$ c/ j4 H' a- U! P0 p @.transpOrder := void;
* }$ } O! k j* R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 z0 s3 g4 p5 N5 A- ~: V: i
@,root.eventcontroller.simTime);
% o" u' t; [# F! {2 f @.HasOrder := false;) p9 {: @' S8 V9 c
@.DrivingHome := true;
: |. U. k9 N y2 `- M* T @3 b; I' t rgManager.tryToStartTransOrder;' Y; [: L/ b& b3 ~: F4 u1 _
if @.Destination = void
! U) d& F8 x7 N7 Y then -- no transport order for vehicle @8 @! {. U0 m! D
@.Destination :=2 O. @$ `! Y' t0 t+ D! q. J, [
rgManager.nearestFreeStation(@,track.~);
3 e0 e9 |1 n5 L- V, e8 q newDirection(@); # |2 j) |' S/ \6 e- W7 p6 F
if @.Destination /= void then
4 [% c* h7 @- | @.Destination.NumReservation :=, L3 J' C |% y: p4 M# ]
@.Destination.NumReservation + 1;
' V! j5 y% d. a' F4 I end;
9 g7 w' X$ u/ x9 \9 y$ m) W @.CurrIcon := "drivingHome";
# j0 T8 D! e Y* N1 b8 g; L4 w @.DrivingHome := true;$ G# z( \% |( v3 [! ^
end;9 V! f+ K0 w9 g$ L+ {- r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% a7 P5 w& }; H1 j" y5 _
part := @.transpOrder;
9 X3 I# |" c2 _$ d part.move(@);-- load part
* T, c# q$ ?" z) D$ m } @.CurrIcon := "load";
( m6 Z' ~- o& G, G GlobalDistObj := part.globDestination;3 R1 ?( Y2 f/ ?" N/ u, v. v. v
assignLObj := rgmanager.rgAssignL;
9 u0 }- D) j0 A* `0 C" d- e row := assignLObj.getRowNo(GlobalDistObj);) K: L2 }+ W9 b
if Row = -1 then -- since 701 ~- m8 [7 G3 h2 i- _
if lan=1 then$ ]2 O+ Y2 m5 }4 F( J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) X t7 Z/ j1 H, f; g to_str("in der Andockstation: \"",?.~.name,"\""));, e8 Z$ \# G) h) U
else
6 F2 q2 T! g- I2 ~; ?3 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) p5 G9 D% A) k8 d$ c to_str("in docking station: \"",?.~.name,"\""));
+ K! Q9 w4 Y$ |4 W, { R end;
: L: i: U7 n# S" r else3 ^; M0 G/ f0 K' p/ y
@.Destination := assignLObj[1,row];
) T) D7 M2 |5 @" k end;
5 W, j+ T( e) s' k/ x O newDirection(@);
) W( G7 }& P% j/ o, g# v @.HasOrder := true;4 j2 U. A8 u5 P/ ^0 E; L% N
end;
7 s& H* n+ Y5 r end;
3 s# E4 J. F, |end; -- of the method
% I3 U# I8 {& K |