/* called by: entrance ctrl of the object 'track') K% R V; s" l1 V2 b3 L
*/* F) d9 `2 P2 Y8 {# C+ j9 r1 e% [7 a
is
# G9 o9 z: G. l" ?/ m$ |8 H7 J3 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U9 f3 y0 `" F' e6 L5 S! L1 Bdo! S: o2 `4 H3 g
Lan := rootfolder.Internal.Tools.AOLlanguage; O# ] N! x [$ p, O
if current = @.Destination -- else return5 ]& O2 t4 v. H# Z6 s1 N
then
9 P; O) R! W: B" o9 O w @.Destination := void;
: }, E$ P5 s( {1 c if @.occupied then+ M. _/ I; T8 f( y; t0 q8 b
part := @.cont;
3 ^. g. r3 D/ W1 G6 G' r @.transpOrder := void;0 R7 g3 Y# g0 n; V: Z8 B2 p! n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! T9 |# H9 k' T+ o
@,root.eventcontroller.simTime);( g" G) \3 }+ z( ^8 k5 F
@.HasOrder := false;! E# {, u1 M8 h2 B: @( V: t% I5 e9 b
@.DrivingHome := true;
' w @( b/ E+ w! e- k rgManager.tryToStartTransOrder;
6 L4 G# M7 _4 C9 y2 s1 M2 D if @.Destination = void1 z$ e- O7 y7 X, g% @
then -- no transport order for vehicle @
* `. S- Q, H( B @.Destination :=2 y' p" O* e# v2 g% d0 c
rgManager.nearestFreeStation(@,track.~);( ]7 Q# M' g; k5 B* a4 N0 s
newDirection(@); 1 j p O& T) v& z$ n
if @.Destination /= void then
- L( Z4 b$ @, m* g- K6 y. G @.Destination.NumReservation :=, q" Y0 L% c$ |
@.Destination.NumReservation + 1;
* ^; G1 g0 s8 i G6 J: l' R: t end;
* a$ C$ ]8 i) |9 p4 } @.CurrIcon := "drivingHome";; L! f; y! Y' d+ h/ h
@.DrivingHome := true;
: j: g* F! i ? end;
" j8 g! S- V1 p3 R0 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station# z9 [, W: c0 `# i8 }
part := @.transpOrder;& \% U& E/ t+ v7 U# s: [$ i1 X
part.move(@);-- load part' j$ _: k2 ?7 c' W- ~
@.CurrIcon := "load";
* t# `9 ?0 u1 X' M GlobalDistObj := part.globDestination;
$ N2 S6 n2 o ]) Y; N0 J/ ]/ n4 e assignLObj := rgmanager.rgAssignL;
+ c) ]# n0 o/ K% N& \% J% v row := assignLObj.getRowNo(GlobalDistObj);5 L# r5 [8 l- k+ S
if Row = -1 then -- since 70; v9 d9 a1 Q1 l2 [, `
if lan=1 then
5 D5 g" h0 `/ d: k- L: Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 z9 a0 G$ o6 W) }3 i
to_str("in der Andockstation: \"",?.~.name,"\""));$ ^) ^9 _8 p; v6 @
else2 G, R$ y9 ^; u; [7 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 e4 N0 f0 L# L$ R: z
to_str("in docking station: \"",?.~.name,"\"")); " d$ \8 [( f' |' ]$ o+ h# L
end;8 K: G; | P# u/ m% C \
else
; C/ q- s" y/ S: G9 W @.Destination := assignLObj[1,row];% o0 B, e) ?3 W. A- p: S
end; ; m0 `) b4 C4 L7 T4 n6 n8 P
newDirection(@);
/ `1 [( l* I6 X7 H( G4 U @.HasOrder := true;
2 [$ n! C+ P: Y1 N9 N6 B3 C3 @ d end;
* }# e2 r3 h5 l! ^! {( w! S end;! o( ?1 J6 T. U9 \! q" L
end; -- of the method
/ I1 u$ X- q$ V& R# l: L" D. g% t |