/* called by: entrance ctrl of the object 'track') k+ l. U% U- g; g. ?% S
*/0 k* b' N2 T. u
is! U; p! |- t/ c& U1 s! M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 @; Q" `3 l2 Z' ydo
f3 l7 i( \# i4 N+ `9 H Lan := rootfolder.Internal.Tools.AOLlanguage;- y% S0 X6 s/ w
if current = @.Destination -- else return- T, {4 k% H: P1 N0 z! b1 j+ \ H
then
0 c0 z( S: f$ W% y* X( ~ @.Destination := void;
5 S8 ] ~" |# {- C; k& q7 k if @.occupied then
) n' V G, b5 ]2 W part := @.cont;
+ {# ^. C+ a6 [! g d7 L' I @.transpOrder := void;* k& t& J. E2 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 C4 D+ ]- m N/ ?: [; b) @
@,root.eventcontroller.simTime);
* ?- p& L0 ^' z1 z$ R! G* ?+ M @.HasOrder := false;8 R( J% \5 D7 i2 O& A
@.DrivingHome := true;1 W. V9 |1 l) L2 f/ A7 g% d
rgManager.tryToStartTransOrder;
( O3 ?6 Q1 O6 f+ t if @.Destination = void
5 y) }2 i( U: w( s8 K: W8 N$ r, y- N then -- no transport order for vehicle @
' I2 R4 N8 c/ J4 f% o @.Destination :=: J5 {/ S* D! j& J) d, q( t5 v
rgManager.nearestFreeStation(@,track.~);
i. Q1 Q/ K* m, H newDirection(@);
. e0 |* N1 U, |* M3 c4 r if @.Destination /= void then+ @* u8 P, O; P! X+ }* Z' [; |
@.Destination.NumReservation :=
' t% S' P- v x: W @.Destination.NumReservation + 1;5 r# ?3 o& D$ J5 o: c! ]
end;/ x) B' } K8 d6 b" K Q
@.CurrIcon := "drivingHome";; Y+ p, x" d- [; W8 |" v
@.DrivingHome := true;* Q8 B+ N \5 J; c& L, C7 \
end;+ Z9 o2 R7 q: E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 H D5 [ P+ t2 f, R1 k part := @.transpOrder;9 R; ^5 P# T& k/ u" P* B; I, ?* z
part.move(@);-- load part
, Y6 U* o: F1 C% S" m @.CurrIcon := "load";7 Z ?1 ^3 ~: `/ A
GlobalDistObj := part.globDestination;8 t- E8 W* ]: X. H8 U
assignLObj := rgmanager.rgAssignL;( u" `( b+ u d7 V8 F3 C( y' i$ |
row := assignLObj.getRowNo(GlobalDistObj);9 c6 ~! l3 ?1 B
if Row = -1 then -- since 70( y# I1 F) m( e
if lan=1 then
g, E' ^0 g2 e9 o" ~/ F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& D$ U1 z: P5 J0 s! s
to_str("in der Andockstation: \"",?.~.name,"\""));
3 b; C- u+ d' ~$ R else$ ]% n' ^3 ?" H1 l( J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 G* h+ ~0 b8 O1 O' w3 F: m- E to_str("in docking station: \"",?.~.name,"\"")); 9 p( q# A% M3 {/ O
end;4 _7 H* l; m0 O3 ^: s
else
9 M# j, Q/ q5 Q" _7 P7 p1 e' ` @.Destination := assignLObj[1,row];- H+ d0 ^- l3 X
end; 6 F5 k( a/ ]- f5 J( r* |% P/ C
newDirection(@);1 c& c# z3 M9 Z; w2 z T
@.HasOrder := true;
- v: i- z( m- k+ ?7 D9 y end;
9 h* d8 b/ E W1 C' D end;
7 ~6 y5 ^) ~8 O, Cend; -- of the method2 b& I' `- D7 Y) {
|