/* called by: entrance ctrl of the object 'track'. Y. h1 i& p+ r
*/4 Q* H* N7 H) [0 X( ?
is
+ T! [, h4 F3 x! O* O part, GlobalDistObj, assignLObj:object;row,Lan:integer; a+ P; w( F/ J$ [' q0 S
do
( T. D, J; H7 p }; ?. F& o* y9 t Lan := rootfolder.Internal.Tools.AOLlanguage;
- |" S# K/ y8 o* M; @7 f if current = @.Destination -- else return% J# L8 X7 k( i9 o" m
then
- R/ W6 `% @: U/ S; c# ?5 C @.Destination := void;
3 p4 w# v% @! a$ x+ d if @.occupied then
& H4 Q2 r! m$ m+ ? part := @.cont;
6 b. H3 F0 [; r+ H$ {- Y5 r @.transpOrder := void;$ U f. L& _% _, c7 ^; o; E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; F$ d* w6 k5 G+ O8 f: @/ \
@,root.eventcontroller.simTime);
$ o* {: h. ^" u4 _9 X) R) S3 F0 u @.HasOrder := false;
, Y2 F* b. `9 @7 W! k/ e, _ @.DrivingHome := true;
) P/ R. P: P2 B8 z- J f rgManager.tryToStartTransOrder;5 V$ D/ c: ]* u
if @.Destination = void
. s4 W A2 |6 G8 c- t% O then -- no transport order for vehicle @! _- D# y* d+ \" g K' S4 L
@.Destination :=
: b, s' \7 j' s; R0 c rgManager.nearestFreeStation(@,track.~);
' h) ]8 z/ e; {/ k4 D1 ]' m newDirection(@); 0 m1 I' v1 g: T
if @.Destination /= void then0 }- A9 Z" J' S
@.Destination.NumReservation :=5 M% z T( ]. ~7 y) V; e! Q8 D
@.Destination.NumReservation + 1;& c8 H6 @7 a. ~/ k
end;
4 e ^. j& G/ W1 d+ y2 } @.CurrIcon := "drivingHome";
& b2 z' k/ O+ S4 L% `6 o @.DrivingHome := true;* k0 H, J. H2 K( z Y, C
end;
/ {% ?8 R2 o7 p) N- d5 A S- Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- b, l) B5 k$ N o6 K9 U! i8 ]5 I3 o part := @.transpOrder;
3 [0 _0 X7 \, x part.move(@);-- load part
8 U( h3 X2 F7 R" f/ l9 X" J @.CurrIcon := "load";
3 G4 k1 x# p, O0 w+ m GlobalDistObj := part.globDestination;) N6 I4 ~ J* p4 W
assignLObj := rgmanager.rgAssignL;4 a& a0 W J- J' P3 ?
row := assignLObj.getRowNo(GlobalDistObj);
7 ]5 \+ E# k/ s8 L! Y0 @6 f if Row = -1 then -- since 70
5 Z( H8 ^4 ?% |- c; i& q if lan=1 then# W2 `- a! L4 c1 P5 h: L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 G5 E R# J/ F, M
to_str("in der Andockstation: \"",?.~.name,"\""));3 H- P" f! x9 X+ H, P+ \; Q
else4 C) ~( H/ }& `* Q6 _. {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: Z; e p2 s, t4 p/ N$ Y3 |/ z, Q
to_str("in docking station: \"",?.~.name,"\"")); 8 _8 L. P4 h2 l& C2 a+ |7 j
end;# L) f7 ?: Q/ W S' h$ N [
else, N7 h) |* g* N1 b1 \
@.Destination := assignLObj[1,row];9 \: g3 r$ u- a
end;
; Y/ R! @7 J5 C/ q# a1 y( k newDirection(@);
7 U. u5 N+ ?" n3 X- r @.HasOrder := true;4 W4 `, f3 h" ^- Q8 y0 }: a
end;$ }' v+ F* D3 _# s. D6 L
end; X, R' b3 j! K* h3 G$ B
end; -- of the method
) \0 p0 o2 x. B( X! Z; q4 B |