/* called by: entrance ctrl of the object 'track'
/ |8 {/ `0 t8 [; T*/
3 [) j7 F5 l7 _) \is
0 W5 h& x: Q1 b" g" K+ K part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 l- ^, S- M! T( M$ l1 X/ K3 t
do2 o9 L" p& H% I* c* V I' I/ F
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ G+ h5 I. x! Y if current = @.Destination -- else return2 v& g- b* c3 }
then
- J' L* g& h& i @.Destination := void;
@/ k5 O; h0 m0 Y1 `! b0 O" w6 D if @.occupied then8 e5 m& f: T* p$ `# F! c. q
part := @.cont;
( ]9 e8 w9 P C3 X @.transpOrder := void;
! d9 k7 _& s$ [# ]+ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* Y+ [* x E k, }* h. { @,root.eventcontroller.simTime);7 d& u% W) u) f; |; o& r
@.HasOrder := false;
# J7 I/ B1 t/ X# z, Z @.DrivingHome := true;$ r% u: F# ]$ h+ ^0 b
rgManager.tryToStartTransOrder;% C0 A- T/ X( u z# P; z$ N
if @.Destination = void$ T3 O( K7 d- ?6 {( O& A! H; q: W
then -- no transport order for vehicle @
) J9 r& I' I, m0 G& p @.Destination :=" r2 L3 O+ a2 z L. S" \
rgManager.nearestFreeStation(@,track.~);
5 D9 r5 @0 `: G0 Y) Z9 E8 B2 u1 _4 u newDirection(@); 4 r$ B1 d- z, \7 f% X% k9 F7 g x
if @.Destination /= void then
, d: K2 T; j& ]& _/ M @.Destination.NumReservation :=# y2 C5 k- u9 m
@.Destination.NumReservation + 1;: [$ u9 [ Q3 N/ ?, K
end;' l/ x- G$ p; f0 E
@.CurrIcon := "drivingHome";
0 G3 @+ E! n v2 J) l0 a | @.DrivingHome := true;
$ n# e7 \5 X2 b$ J- e end;6 Z: W$ k6 X' h: A0 E/ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
?" W- d" @* U: C part := @.transpOrder;
5 Q" W0 }$ T( x4 o3 {" q/ J part.move(@);-- load part/ I5 v, R1 Z( f. W) V
@.CurrIcon := "load";/ m- R8 P4 ?1 l( R( A& M9 {" f
GlobalDistObj := part.globDestination;
7 l2 M: [7 ]9 m4 [ assignLObj := rgmanager.rgAssignL;- Q: K6 y& m: d/ s, Z
row := assignLObj.getRowNo(GlobalDistObj);1 q2 Z* z; g! P+ }
if Row = -1 then -- since 70
$ B$ d e* p! j) B) W. k if lan=1 then; {7 p8 ?0 v2 i: `; h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, G+ ?# t/ ^5 ~1 M6 Q+ Z6 `9 _* o to_str("in der Andockstation: \"",?.~.name,"\""));- \( \( c. g7 j4 c$ X2 J
else* I4 T( v0 X; y- [2 {3 y9 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 ]. I# f- L) y1 o5 [
to_str("in docking station: \"",?.~.name,"\"")); 1 O3 q/ M6 W) Q
end;7 ~! l' [. p6 b; G; P/ ?
else
, u0 x$ W4 o" R1 k+ L" i: H @.Destination := assignLObj[1,row];
& | w/ [0 {7 l' [+ _5 d end;
- G! R3 v" G8 X# T# g newDirection(@);
$ D9 q B3 J7 [7 ?; W @.HasOrder := true;
) v1 J; W0 B. B6 u+ k* H: ^ end;
& D* \" b6 a) J6 R, k end;
8 W" i( C, ]# J9 L' x1 x7 @# p% u7 Pend; -- of the method) e. k: l; v+ A" L$ l
|