/* called by: entrance ctrl of the object 'track'
D+ Z7 C3 |+ {. `1 u3 T' }*/
7 [" X: C. d) O/ Y" h1 ^is' P4 E8 @+ ]* `, C" ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% O' [5 w1 u5 a% h' I ?do) o' J/ M9 P& M" o' V" N9 _6 m* g
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 R5 u" n1 v% ?% G! v1 c6 x$ Y9 {8 ^4 d5 L if current = @.Destination -- else return4 L" }" h) C2 N6 |
then
6 \4 J+ I" d. V& Y! P @.Destination := void;
2 T4 g5 A$ a. ] if @.occupied then2 M- u m8 h C
part := @.cont;
$ p6 x; d Q! y/ T @.transpOrder := void;
4 H; E0 w( O; K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- f1 B- R. N2 U2 n
@,root.eventcontroller.simTime);, M% S7 [$ c5 w- @3 U
@.HasOrder := false;
. \: M3 C6 ]* j6 M- ^+ ?9 A @.DrivingHome := true;
' m$ a% ^, c$ F% Q6 w m rgManager.tryToStartTransOrder;
4 h2 U7 c+ q& I; z if @.Destination = void
" S* ]+ T, G; h/ O5 i! z' s0 t then -- no transport order for vehicle @2 P. L: c _3 h" A2 J
@.Destination :=& p% [) t6 u6 R6 O2 P. O
rgManager.nearestFreeStation(@,track.~);; a+ G5 @2 C8 t2 D1 }0 f
newDirection(@); ( _& P& ?, P$ d4 u5 P. X
if @.Destination /= void then
1 ]5 \% E- z; G6 M$ ~7 H @.Destination.NumReservation :=
* d4 ?( k3 D" F# F @.Destination.NumReservation + 1;' l/ P( z. q# S+ N- [5 L. Q
end;) }$ P; Z. _& x8 P+ Q( Z2 f
@.CurrIcon := "drivingHome";
7 z. V2 ^' X M" Y/ V, X1 T @.DrivingHome := true;0 g- I, C! P$ E# ?
end;' h* P- B7 M. d/ E- z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 M3 z* Y" t& C part := @.transpOrder;
* _) `) i J' }. ]# D part.move(@);-- load part( z' R" u. n6 C
@.CurrIcon := "load";
2 B0 q, v# ]3 b( m GlobalDistObj := part.globDestination;8 Z8 |; t4 q* L) b |' F6 Q" b
assignLObj := rgmanager.rgAssignL;
1 ? A2 V' a, A$ [6 \$ V: i row := assignLObj.getRowNo(GlobalDistObj);
: c' W$ P6 E* M6 \$ C" V- k if Row = -1 then -- since 707 K' [" D$ g& {, Z- Q
if lan=1 then
E. j5 e. i1 R0 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 I8 ~% F8 w. ^8 E3 l3 d+ ? g3 f to_str("in der Andockstation: \"",?.~.name,"\""));6 z. \6 q$ N, U7 H$ \/ ^
else7 P* a; K- g& @& _. }- d6 Z. [* n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ]. h3 U* |4 K$ T; _: j to_str("in docking station: \"",?.~.name,"\"")); 5 f$ N+ y$ k W2 `" A7 M8 |
end;5 Q9 ?. f% P* a1 e' D
else- I- E4 }7 Z2 p
@.Destination := assignLObj[1,row];& J- @; ~; G) R# V p4 }4 ^ m
end;
$ L! d0 S3 o# d% C newDirection(@);
4 P# h4 ?( h- @9 \; A @.HasOrder := true;
, @& l/ o. F0 q end;
' \; v* X6 k+ v! a* A" {- C3 k end;4 Z. [$ j4 p! B: W2 U4 u( }
end; -- of the method1 A1 x( l7 P/ J- ]
|