/* called by: entrance ctrl of the object 'track'
8 f/ W% |" x9 N*/
3 L& I: b; ~/ d- Y8 Cis
8 Z1 F$ ^4 y8 m5 [* Y: A6 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;" u( k, R% E. P9 V7 Y3 a
do" A z+ r& f$ r% n- H8 ~3 H
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 L8 h2 a; B3 a" k if current = @.Destination -- else return0 d0 K: B( L" g+ i; |0 i0 H- r
then
3 X* ~+ R6 f, Q, x6 Y @.Destination := void;
* G" Q& K% b+ s! M' K4 x' E if @.occupied then
; r3 S5 p& G2 g2 [, [2 }6 ~- B+ _ part := @.cont;: G7 `: y1 `2 D
@.transpOrder := void;
4 h2 U7 Z% w: @3 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ [4 g( r( w0 t" q" L4 @ @,root.eventcontroller.simTime);! q9 G% Z' u: q/ Y5 Y E' v
@.HasOrder := false;
) Q/ o& V2 Q9 |8 U5 H: A8 W; V6 K @.DrivingHome := true;$ V6 R: v- ]! c* P0 o6 R
rgManager.tryToStartTransOrder;
, h( ~. ?9 F0 }) k9 e5 r if @.Destination = void# T, O# a1 F' I+ f& B& ]+ I
then -- no transport order for vehicle @
# ]. G# I& r1 A9 P* z @.Destination :=
$ r9 W! [3 R! o; k$ `' K rgManager.nearestFreeStation(@,track.~);" U- |3 C( A! a2 s
newDirection(@);
( A. Y% Z1 Z0 H) d+ W if @.Destination /= void then
; }2 E0 R9 b- B, c' I: Z6 @ @.Destination.NumReservation :=" T- h; x( E: h w R
@.Destination.NumReservation + 1;0 c/ |) s% K3 }% e/ i2 q7 C* W
end;
# r- {9 `. H1 k( R @.CurrIcon := "drivingHome";
2 e0 a& ~/ \. b' d& F @.DrivingHome := true;
d6 k J( K0 j- N end;8 s3 S6 M. h: b: }: z: A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) M- b/ p& u$ Z; s8 a part := @.transpOrder;5 z" }, J' y$ T- g+ y2 F2 _
part.move(@);-- load part
* ^+ v; j I- c2 A @.CurrIcon := "load";, J4 z) R7 ]0 }- ] y4 U$ g' _/ q
GlobalDistObj := part.globDestination;5 i2 Z' u8 o% Q
assignLObj := rgmanager.rgAssignL;
( N7 L: m, S2 H5 x( y4 Z row := assignLObj.getRowNo(GlobalDistObj);
7 G2 K. a7 a# P4 }+ N7 ? if Row = -1 then -- since 70
8 y7 a9 b/ I; J1 k8 F4 O if lan=1 then. x5 p8 R7 `( V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 B C7 C' |( ^0 A4 O0 F2 ?$ x
to_str("in der Andockstation: \"",?.~.name,"\""));" v5 i" q+ q7 t) [# g8 p- ~6 D- x
else2 c q1 B3 a. O2 S `$ }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( P% G& @* X! ^. |* c" a' Q' l to_str("in docking station: \"",?.~.name,"\"")); ' c% S) ~+ I- _
end;
: s2 c+ Y' M* } else
: @, i# G/ j, q* J; X) f# x4 M @.Destination := assignLObj[1,row];# H$ a0 q" C2 q
end; : G9 S( Z3 f3 }
newDirection(@);
& G, B" C0 R7 @& M. J @.HasOrder := true;, U! b; @- K' y
end;% Z h4 p% b1 o ?' n0 z) n
end;
2 D/ C1 Z: K2 K0 P7 n7 }3 {/ Xend; -- of the method- \8 \6 v( A; z: f* D7 I
|