/* called by: entrance ctrl of the object 'track'
- ?& [% w2 Z: o* K*/
/ i7 Q3 r' V2 a2 W8 T$ ]3 n' [is0 ~# Q6 y$ T1 ^0 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( S) S! v$ |$ S. B! p* Z
do1 v. o# _/ w- n) ~- c
Lan := rootfolder.Internal.Tools.AOLlanguage;
! V6 M' E8 T( X$ Q( G# v if current = @.Destination -- else return
/ B4 s6 D# k7 H) {1 v3 r6 ], G then
0 \& E- P, [4 c' Z @.Destination := void;3 h* f: H/ ~- g7 G* \( }
if @.occupied then
: K- p; d; w7 y, ?7 S# B' E part := @.cont;
% f. T. E4 p5 u; i, f4 T4 G @.transpOrder := void;
& q. o& V6 G7 a2 S9 [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* T5 c) i* Q9 @+ J3 a: m: @
@,root.eventcontroller.simTime);2 B2 `! B/ S+ [ t/ }$ r$ A
@.HasOrder := false;" X. Q4 o& P/ ~9 {4 z! C `
@.DrivingHome := true;
2 Y5 {$ R2 I b. @7 s* l8 ?: F rgManager.tryToStartTransOrder;
H) J _ ^! Y9 I2 N if @.Destination = void
3 l* S* N! B; X# E% U5 V# T1 Z then -- no transport order for vehicle @2 E) m- q/ m1 c; e
@.Destination :=6 F. U( |7 _; G t* n+ r
rgManager.nearestFreeStation(@,track.~);$ u+ o" ~# A+ l8 y& {6 b$ n
newDirection(@);
9 g7 `( F7 M2 ^; C. @5 p if @.Destination /= void then
! F5 c8 c! P) a# q& ] @.Destination.NumReservation :=0 t! Y! p0 L$ J" B3 {3 O7 g
@.Destination.NumReservation + 1;
9 @4 M) ~' f# y i3 w: | end;
0 X) {( z: g# R- U7 Y- D @.CurrIcon := "drivingHome";
/ j L. X/ Y8 i @.DrivingHome := true;2 |' z$ E; I, h! g
end;
& t7 f- a/ N- z' z& Z! Z, U. `5 U* O/ P else -- the vehicle @ is empty, both vehicle and part are in the same dock station" } R" S- Z4 ` S' ~
part := @.transpOrder;$ ^. e/ r3 \, i+ b/ ?; d3 r& N$ H, k
part.move(@);-- load part
% {' i( R o, I, x @.CurrIcon := "load";
X) f- }1 a# w8 G8 _2 J: p GlobalDistObj := part.globDestination;
1 U, ?7 @4 r* K# j4 N1 e assignLObj := rgmanager.rgAssignL;2 b# O. z& @& k% _0 L
row := assignLObj.getRowNo(GlobalDistObj);
2 G7 q9 z: [5 P! ] if Row = -1 then -- since 70) V% x q# w2 h
if lan=1 then4 W7 p9 N' l; Z; c3 h% @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ C8 O! x* {; c( [3 f' v
to_str("in der Andockstation: \"",?.~.name,"\""));
! X5 y# o$ K3 `3 K. n* u else
! v: F' x/ H9 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# \2 j( M6 x) {/ ]
to_str("in docking station: \"",?.~.name,"\"")); 1 b. e5 ~6 d/ i7 H2 r4 F# ]/ @
end;& I3 Q% e7 ^/ [8 K
else" @) R0 V) E" v2 U5 F4 J
@.Destination := assignLObj[1,row];& R) }: M) m- J5 }; D; x; r T
end;
6 ]9 Z% F4 F% y% V v newDirection(@);
: J# n+ F0 d" u" {8 a1 H @.HasOrder := true;; F' X; Z8 }* I: g& v
end;7 E7 Q7 j: Z2 s1 O' |! t; |+ F
end;, c0 q* V1 f# T" V- Z/ e
end; -- of the method" q+ p2 e6 G. j. d+ Y
|