/* called by: entrance ctrl of the object 'track'
' ]+ m# m7 U( z' A( l9 ~1 A6 J*/
% L* K3 g+ A' V, I d* A# Y8 ~is
/ P' B5 B) D7 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. m+ ~9 `5 J! Z7 [% Edo
0 Z; ]" j8 T o7 h2 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
v( H- f5 u2 w( G$ w2 ~" N if current = @.Destination -- else return
, a$ n. s( d9 ~ then
" z/ ?0 F8 v6 L) a, R9 @/ o. v @.Destination := void;
( _& [! b* E- K$ m7 H$ h7 ~ if @.occupied then
$ V& u8 y2 ^/ E- m {2 E) F: w8 e part := @.cont;
7 j5 {" M% M1 M8 \2 T% x/ w @.transpOrder := void;
0 _3 f" v' W( P5 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: E" j* p1 H0 ~8 q/ f7 {
@,root.eventcontroller.simTime);- h0 q* W: f; ]; ]
@.HasOrder := false;. r6 T; @/ T% \3 a1 k6 O7 Q
@.DrivingHome := true;
8 j2 B1 t) |4 u$ s) G; X rgManager.tryToStartTransOrder;
7 v A5 q1 f& b if @.Destination = void
4 c' m4 B% U! H. [# q then -- no transport order for vehicle @& j- J, R; K- R$ E6 o/ ^& q9 `( U
@.Destination :=
) b I U6 M6 j: r" h9 N& O; v5 t rgManager.nearestFreeStation(@,track.~); ^, x8 i4 P4 W6 H
newDirection(@); # Z: S' l! j3 F7 b2 O! B+ R
if @.Destination /= void then% a7 T- }$ j) E! ]# r# M0 ]& @
@.Destination.NumReservation :=. C6 r. O. n0 V; h8 c- l( _
@.Destination.NumReservation + 1;- ?) h; y h2 D; O/ |, V/ Q
end;
* U7 a! |' e$ b& Y @.CurrIcon := "drivingHome";/ M1 ^6 @6 V9 C c/ i
@.DrivingHome := true;
1 e/ k C; t5 I3 c5 ^ \ end;1 j @7 [0 R% A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. ~2 X g: E/ q H4 j0 P part := @.transpOrder;
: B3 x0 {. v/ q r# J part.move(@);-- load part
& ]+ k4 R t& \7 T3 W* a4 O @.CurrIcon := "load";. J* f# B2 v2 ]
GlobalDistObj := part.globDestination;1 k7 W* n$ P M& {2 a3 m
assignLObj := rgmanager.rgAssignL;
! k8 q4 [6 l C( _: C row := assignLObj.getRowNo(GlobalDistObj);/ ~/ O2 R" J- k# C# _4 ^
if Row = -1 then -- since 70! Y* B' p' R# ?
if lan=1 then, A+ x+ k4 a; S3 M" K# I; r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, P+ b; \; m, G; I
to_str("in der Andockstation: \"",?.~.name,"\""));
/ X! N. Z" U _ else
4 R: @ n$ Z5 C; n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- |8 }4 ^$ n1 W& y# U/ m9 ? to_str("in docking station: \"",?.~.name,"\"")); . W- u) Q( e l4 K
end;
* _6 A7 y- Q! u* a else; g2 l) H, @# E- i* y: k5 X
@.Destination := assignLObj[1,row];' A q. C% }6 O
end;
0 g1 Q! o1 B: }7 p: q# D newDirection(@);
/ j: J1 s( v4 R2 Q+ X; @ @.HasOrder := true;6 i' ?* ~7 D& g! {* S1 A4 B
end;
( S! h8 b: {( C! o. u8 R* m. g end;8 j$ J% N$ s4 m& n) ^6 I1 s
end; -- of the method
6 F; Z0 D$ H# k" a |