/* called by: entrance ctrl of the object 'track'
6 i s3 U" S+ F$ L0 w*/
2 V" R' f0 t! g: x& q) h4 Mis
. u, K- z& D8 a5 o! V. R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) w* z# d& f; c' P/ h3 v2 N1 tdo* e% p. |5 l) G9 v" \: J! b
Lan := rootfolder.Internal.Tools.AOLlanguage;/ ]( ?5 c" _$ t. {
if current = @.Destination -- else return
4 u; } J- B# \# ]9 ^% e9 P7 t then
- A/ X2 d1 l; K3 _ @.Destination := void;
, c" T; i8 ~. ]$ u! s* [ if @.occupied then$ j+ @) \, v5 \! F0 Y8 B6 O5 z
part := @.cont;' P- p: S- w5 G" G5 t6 W
@.transpOrder := void;! a3 ~! z& Z8 Y8 m& P! W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," l8 I+ e5 a. I6 K4 W, j
@,root.eventcontroller.simTime);
, ~" z; f% D3 ]! j+ u1 [! G- R* Z3 O- G @.HasOrder := false;: ?4 r8 h( ~. r9 T* q- a, v
@.DrivingHome := true;
- i0 \- t. s- \ rgManager.tryToStartTransOrder;
+ U8 S. h0 [0 Y' |9 V x b if @.Destination = void& g0 q4 C' [2 T# ?2 e
then -- no transport order for vehicle @ d5 _" M5 ?' r( r, e) o
@.Destination :=
% S; w# T* \- k# c5 f/ _ rgManager.nearestFreeStation(@,track.~);
7 _7 V9 {3 {6 D+ S- b newDirection(@);
5 O/ @+ F) u& P. e if @.Destination /= void then
# [0 L* M0 C6 V P. X7 @ @.Destination.NumReservation :=
* P4 D+ L ~; k. v6 @ @.Destination.NumReservation + 1;
; F+ a5 _8 N' R! X% \ end;
! t# P' W% }* D( `! E @.CurrIcon := "drivingHome";4 {% l3 B9 t4 T( |5 h B- W! _
@.DrivingHome := true;
1 g3 S( f1 r) H# [) Y end;
1 }6 ^& t2 x6 S7 ~6 Q8 J, w else -- the vehicle @ is empty, both vehicle and part are in the same dock station; H* E9 A* N& a' T
part := @.transpOrder;2 A6 b( ]2 N3 O* B) O% ]- z4 l" D
part.move(@);-- load part
! l' |" K2 i2 t+ P @.CurrIcon := "load";
8 G; v, X' R! E( X$ G GlobalDistObj := part.globDestination;- z5 p2 C7 Y. a
assignLObj := rgmanager.rgAssignL;
6 Z9 n# N# @! n row := assignLObj.getRowNo(GlobalDistObj);* W) o M6 l2 |2 u. Q
if Row = -1 then -- since 70
: t3 k8 v' q# E* e if lan=1 then
- ?3 C' j, j1 H8 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# s1 b) m/ R! B# f# ? to_str("in der Andockstation: \"",?.~.name,"\""));
- Z; j1 u, g+ a7 n u& R else( t# v7 \: b% V$ M* ~% |7 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- s$ |$ S' `, K; @ to_str("in docking station: \"",?.~.name,"\""));
: D1 V2 P2 o( C% W5 { end;
( p# t6 L4 c) M; t1 B1 n$ U else
8 U0 x" Z7 Z& ^$ {( |& I6 L5 h @.Destination := assignLObj[1,row];
, R+ [* Z8 I% j( N, g$ V* e end;
7 \$ U" K) \- t% C newDirection(@);: ]+ q9 {/ V7 ?* @' A K
@.HasOrder := true;
$ B, i0 ^! o, g0 q2 ~ end;; u1 i6 a& D' ?- p* d3 d
end;' ]1 y7 e7 o# ]5 k" |
end; -- of the method
9 W# k0 l/ c% d9 ^ |