/* called by: entrance ctrl of the object 'track', j1 k! c' ]% h0 X
*/
0 Z1 m5 f! b7 fis
' Y {# t- |# w$ G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) t E# W9 G) L6 R5 J: Tdo
6 X1 C1 r$ B) m' `0 W Lan := rootfolder.Internal.Tools.AOLlanguage;
0 l1 T$ M9 u$ z" v if current = @.Destination -- else return
" n" O* l) l$ v+ T then
; Y% r6 N) Z2 ^% G- x* ^" P @.Destination := void;% Z9 i& n; D( X1 I9 j% K
if @.occupied then6 F/ x* G/ ~! {) A$ F+ J! |0 K
part := @.cont;
. d! I+ \) g' Q @.transpOrder := void;" h. A! j* b3 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; i8 j/ p$ s! x
@,root.eventcontroller.simTime);2 W R- L$ p+ i6 j/ `1 C9 \" c
@.HasOrder := false;
7 U* W' F, F4 [+ Y7 m) b' @ @.DrivingHome := true;
" ]5 |: B" l$ i# [; t! M rgManager.tryToStartTransOrder;
6 `6 G2 ~! N2 ]! `+ g. y0 q if @.Destination = void' k/ Y" {6 }# W8 E* G5 ]) U) I3 e
then -- no transport order for vehicle @, C0 j, R' x) z2 j7 q' r* m" N5 C
@.Destination :=% L/ d3 [) c8 ]+ K+ I1 \. }
rgManager.nearestFreeStation(@,track.~);
1 A- g- w( L. }0 ?6 I+ W newDirection(@);
! R9 Y6 a) V% r6 g if @.Destination /= void then: K6 j/ g; [) k
@.Destination.NumReservation :=; X. o& ?$ j* ?9 ~! d
@.Destination.NumReservation + 1;
1 i, P' I1 N0 ? end;* M Q9 [5 n0 P7 X) W; G4 ^
@.CurrIcon := "drivingHome";; z) l8 `/ f- z/ l8 v, [
@.DrivingHome := true;
# o( V$ u+ M# H end;
( P ~& Y6 ~0 Q$ r5 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, L5 M/ o4 K# ?) L part := @.transpOrder;
, K8 v9 q4 _* I& M+ e) W j part.move(@);-- load part; j8 Z4 a6 ~0 P# m
@.CurrIcon := "load";% Y; l1 V; B( o I& [, l- H1 _
GlobalDistObj := part.globDestination;
1 `1 N3 ^$ J0 a& D assignLObj := rgmanager.rgAssignL;% B5 L) W1 w: ]. M8 _
row := assignLObj.getRowNo(GlobalDistObj);. ?. l6 o" }1 b. w) P) N1 T( Y3 z
if Row = -1 then -- since 701 k% E) P4 s% a9 e
if lan=1 then
/ S5 ~& A1 g. V) m i% N9 }" p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' l" \" l/ u7 E6 t T) W+ J
to_str("in der Andockstation: \"",?.~.name,"\""));
7 B6 @8 i5 J8 [ else* n+ T9 u/ o. O& ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 j1 B$ D8 t _ to_str("in docking station: \"",?.~.name,"\"")); # m7 z2 _7 S' H9 _
end;
+ _8 F. ?5 Q5 X else. R, A+ `6 d9 \ [4 t" r: D" U9 q
@.Destination := assignLObj[1,row];
* {7 F4 F2 H% L; @- H end; $ k$ h! Y: A: M$ J+ v/ J7 ~; T) o
newDirection(@);
- C# v7 x6 x0 ? n1 [' s) N0 d @.HasOrder := true;
' q* a, Y: a, v' r2 O, H& V end;: V# }9 I7 o4 c% m2 `% N
end;& S+ K) z" z; R4 m$ t1 w/ p9 ?" `
end; -- of the method5 U8 \: X" U: ]9 e/ u9 T
|