/* called by: entrance ctrl of the object 'track'
, z% S6 G; p; O7 p" R9 u" u*/
, L: j' p% x& H$ E" jis
1 }' v1 L3 N- y( c0 ~- t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ w H2 d7 ^9 D' z& M. zdo
]3 \+ N' m+ G( S u Lan := rootfolder.Internal.Tools.AOLlanguage;
6 ^0 q. v+ s+ K; J/ {3 d1 b) v if current = @.Destination -- else return& W( R* _/ N! Z
then
$ b. j/ q* I6 O5 O+ O @.Destination := void;
, z2 Z' C, f, H& X% @ if @.occupied then
o! ^7 g% }: K6 D7 Y$ K# C part := @.cont;! P2 k z2 `8 o% X* C0 y( e6 M
@.transpOrder := void;
! m7 g L9 Q( ^; q, m% R/ B# t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% }$ f- ^5 [1 w9 c
@,root.eventcontroller.simTime);
/ G R" V+ P( T! u6 r& L1 E; o @.HasOrder := false;
5 }. _, c- b/ y+ T* ? \' L* H" d @.DrivingHome := true;
8 a0 w; }- r9 m- P" E rgManager.tryToStartTransOrder;
( B* W8 O; I& [ i. N" ^* t; R if @.Destination = void
/ K5 C1 Z* q8 z2 X then -- no transport order for vehicle @
/ p2 ]: p$ x6 D @.Destination :=0 [# h8 f1 z% Y5 x
rgManager.nearestFreeStation(@,track.~);# n& g% f' r3 I1 Q# x+ O( U! | u" M% i
newDirection(@); 8 u u, r4 @; H
if @.Destination /= void then1 m* s' Q, Z. |$ Q* ~
@.Destination.NumReservation :=9 {. P. Z8 Z1 V1 I2 b
@.Destination.NumReservation + 1;
/ n/ A+ y$ }: } end;6 e8 D3 e. [, O5 d
@.CurrIcon := "drivingHome";
* h" W1 T) c, ]/ t @.DrivingHome := true;
( y9 }1 V5 V/ g9 ] end;
6 R0 j; f* V, Y1 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station& O$ l; s4 O/ E" {' O3 {8 @
part := @.transpOrder;2 M& C7 V# K/ U& S: J2 G" M
part.move(@);-- load part, E1 Z6 a( R" i9 K6 q5 _
@.CurrIcon := "load";# Y: g0 e0 Y7 p3 W! l0 j; m: l* A
GlobalDistObj := part.globDestination;
7 h! ~! k6 V3 o" V7 ^& J! R v assignLObj := rgmanager.rgAssignL;
$ k- ?! {& S( w" g6 e row := assignLObj.getRowNo(GlobalDistObj);
* A1 s3 ^8 |$ s- m) e# J if Row = -1 then -- since 70% ?) y$ }) S8 k6 z+ `
if lan=1 then% C! ~7 Q' Q3 B k8 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 s' u" z, v4 \7 w# l4 e to_str("in der Andockstation: \"",?.~.name,"\""));
1 d. v1 C" \' k9 V- l, Q else" N' O( L2 E. M+ |* }/ U; Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& j8 ?/ H. X6 U7 x2 h4 U9 _# D to_str("in docking station: \"",?.~.name,"\""));
, Q. C0 r' h" }' a) g end;, Q: K F+ s1 n7 [8 ]
else
7 Y' l' |9 o: z* z9 I- ]# G: I @.Destination := assignLObj[1,row];: W P4 v: q1 O S
end; . ]0 s- X/ ^( B& C( Q8 q! w. H; T
newDirection(@);
6 J2 g; G. P. g( Y: U* M4 h @.HasOrder := true;- N7 u) S" E. z
end;9 T# W6 u/ R* p+ M4 v- K; L- O
end;
) x! h; k4 q$ w- E$ \" C0 @7 Bend; -- of the method+ W9 @5 I% Q! d: t9 H/ M
|