/* called by: entrance ctrl of the object 'track'
! C! `) o4 u0 F2 m& k*/
0 l4 G) j- F/ l( s5 _is. Y& ^$ p, Y0 K j! s" z- O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ i; P* E" S+ y& {
do
# @7 W, `! d7 D3 |( D! Z1 ^+ O/ z, K Lan := rootfolder.Internal.Tools.AOLlanguage;
; M6 G1 V1 k# A if current = @.Destination -- else return# X+ h' R$ f+ H" T# R6 [+ z
then+ f' p% p7 _ S6 O, t' i! Z, o
@.Destination := void;
' z9 f- T- M, \4 T5 b' j! Q+ h if @.occupied then
0 r$ A" A% {/ F4 I part := @.cont;
0 j- z9 B- X, h4 m/ Z# @ @.transpOrder := void;
, \6 F: J4 i$ t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; k$ ]1 h2 L* p @,root.eventcontroller.simTime); H8 L) C9 ~7 d D; f# |) s# @
@.HasOrder := false; q$ y) ~3 X0 N# j; U2 Q' c7 g
@.DrivingHome := true;- e* l @5 i% M9 y8 o1 s
rgManager.tryToStartTransOrder;
4 a# m! F4 Y- b8 x1 Q if @.Destination = void- K8 |6 }) w) Z" m0 N3 f3 Q
then -- no transport order for vehicle @. U) C3 ]# G, |! e) b
@.Destination :=% |% S( t. I1 o: T& A* p* d
rgManager.nearestFreeStation(@,track.~);
3 I: ^% ^" n" R0 }; E newDirection(@); ( c, B2 z, `9 a! I6 o9 d4 X' _
if @.Destination /= void then0 {- [. K# G( M2 J# V3 |
@.Destination.NumReservation :=0 T: V* \" k8 ]' }( U# ]" Q+ Y% T7 v' {8 y
@.Destination.NumReservation + 1;
4 G" I& ^' q8 F6 ^4 s end;
e: g/ I% s5 O @.CurrIcon := "drivingHome";
* |2 @; s# Y) J ~4 h* f @.DrivingHome := true;
7 i: _" F. v- n2 C+ f end;; y+ Z1 R6 E# Y) Y! D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 w# {1 Z( h7 |) H' u. `( n% G/ M
part := @.transpOrder;
$ j5 X z3 t3 J* R1 |& r* n: n% _5 @ part.move(@);-- load part
* r0 o8 @; x. ]; Q' v. V @.CurrIcon := "load";$ ]' l' R( O! z
GlobalDistObj := part.globDestination;" G$ p( K l# n: Z
assignLObj := rgmanager.rgAssignL;
: g4 {( p4 v; D7 o9 i row := assignLObj.getRowNo(GlobalDistObj);
9 _9 G/ `) H% H; k- ], T4 X$ } if Row = -1 then -- since 70* G: V* R# O5 j1 B1 v
if lan=1 then
7 I/ E/ y- ?( B$ E2 Q M7 i8 B0 l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; T( F0 H. O4 Q% m% ^' ?1 J5 ^7 v3 o% L to_str("in der Andockstation: \"",?.~.name,"\""));- t9 X, {3 T7 b$ f
else* I1 d6 U/ }+ @5 S. F2 b9 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ u t1 W) b2 l. ^# |$ D to_str("in docking station: \"",?.~.name,"\"")); ! J. W/ Y" c1 l9 q
end;( o4 V w/ M+ i H
else1 g' s& y5 z4 H- G! ?# i
@.Destination := assignLObj[1,row];) i) n- N6 Q/ y0 R
end; . s2 }9 `, g8 u( t4 i
newDirection(@);
4 v& M) q2 N( n! j" u: ~& _4 t @.HasOrder := true;
h& t3 ?# p5 C' I3 |) j, i: k end;
- f/ I. Q) ^ h% C' v7 c; x end;* G3 S5 C$ n8 T
end; -- of the method1 y Y$ T/ u- @5 {. P o
|