/* called by: entrance ctrl of the object 'track'5 R$ c9 g6 s- P6 v7 X
*/$ `* m& k' K- Z# O' f3 W1 a
is4 T# ~0 F, X& }7 V( z' @# ~$ D2 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ~8 W4 U+ l V+ E3 Pdo
/ H# G, H. `/ N2 Z! A9 o Lan := rootfolder.Internal.Tools.AOLlanguage;/ b i3 U" y# c: s3 B
if current = @.Destination -- else return, U, `9 f/ H$ a
then& C1 H& {7 X/ f4 w: i5 e' M
@.Destination := void;& G. H* {( J+ b& P" }
if @.occupied then' G5 @7 H# i* n+ b2 S' J
part := @.cont;2 c* Z6 R% r# X
@.transpOrder := void;7 u. Q" ?" ^* B/ F+ I: V9 v8 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* i4 W! j! Q9 r. U7 I; ^( w @,root.eventcontroller.simTime);6 m: o$ p7 L7 ~+ L3 A' _0 c: a
@.HasOrder := false;
8 j$ g& e T. B( x& o$ X @.DrivingHome := true;
H$ t# U7 W) Q! d- W rgManager.tryToStartTransOrder;- F" n' C3 ?! J' q- M- L* @
if @.Destination = void
5 b X1 |8 ], g- |( k1 j. V! O then -- no transport order for vehicle @% ^& U2 y# Z# J
@.Destination :=" W" j6 w7 A# F7 r3 ?' x1 K- ~
rgManager.nearestFreeStation(@,track.~);
, H+ K" J( W: Z4 j0 n3 h) ]9 J newDirection(@);
& M0 F1 t$ u" D( r if @.Destination /= void then# X1 z1 k g s5 P$ I( n; q
@.Destination.NumReservation :=( l0 x, V0 h3 j
@.Destination.NumReservation + 1;
* M% n" j) |* Y- ~" h end;
: }5 x( n c& E$ \, Q" n3 O8 O) f @.CurrIcon := "drivingHome";
' i/ v; ?* h9 k Z9 S @.DrivingHome := true;
/ g7 w6 Z; M) `% S7 ?6 O end;! R* E1 N: d+ a" g6 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% |$ E6 `% |. |- {+ I2 I6 d part := @.transpOrder;
0 T* N* F% e* l/ T1 p part.move(@);-- load part
, Y8 @$ Z! A. y% F; _1 W$ o @.CurrIcon := "load";4 Y) j: R$ I: f4 g
GlobalDistObj := part.globDestination;0 z: Y, O5 G9 ?# {4 w
assignLObj := rgmanager.rgAssignL;
3 `4 K3 f$ |" d- Y row := assignLObj.getRowNo(GlobalDistObj);
- y5 q" W6 {$ ~/ W$ g( p7 C3 A if Row = -1 then -- since 70
2 L: i' E$ A ~9 }( \& | {% W- L if lan=1 then
) M! A3 S3 S5 s+ W1 |" E' E/ X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ Y O \1 J; _& V5 ]# G7 F- ]
to_str("in der Andockstation: \"",?.~.name,"\""));
- ]' s0 \$ v% i" j" ` else. [6 I0 k% X$ p+ V% [4 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& R7 N( a$ S) J* T8 ^, @
to_str("in docking station: \"",?.~.name,"\""));
8 H! x! S& k2 z end;% q* \. A& H* ~4 w3 ?3 ~* n
else
, C6 r' o2 P. `# g: L @.Destination := assignLObj[1,row];
! n- t- P7 d9 h! j6 H end; ( |0 G. i6 Q2 O3 S4 x
newDirection(@);) B* }. X) L- g Y4 I3 B" v
@.HasOrder := true;
6 b/ Q# k* y* z( z: B8 D end;4 J, g! m- E- C! D, R
end;5 r+ U# H! Z' y5 t' K c2 Y
end; -- of the method
1 y4 W& z' t e- O6 T1 u t |