/* called by: entrance ctrl of the object 'track'3 }3 h* N: f- \% x( `$ Q' V2 E% t y2 K
*/
1 M) y& Z* {9 _+ A5 `is6 E; S5 E/ c5 W+ x) T8 y9 `8 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: r5 p6 _- e2 n8 f% |
do
- N7 ?! H+ K" i# O: [/ X: c Lan := rootfolder.Internal.Tools.AOLlanguage;
- m4 w9 Y; P# G9 p) i3 b0 \ if current = @.Destination -- else return2 u5 b+ Q6 A5 `* |, U. H
then7 @- S& p6 A' `2 X
@.Destination := void;
! V1 a4 _. x+ M( m" n if @.occupied then
, H) C4 L1 {4 W \% l part := @.cont;
! V' `, u% r6 \& N @.transpOrder := void;
# P3 X [3 T3 t7 ]5 F& q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 ^* U4 \) ?% T/ d; D3 J5 t; T% ]5 k& D @,root.eventcontroller.simTime);3 L( L. G6 X+ F1 F; k+ T3 q$ s
@.HasOrder := false;
! K# W$ ?, N' Y: z @.DrivingHome := true;- s. h0 \/ I3 W: i5 \
rgManager.tryToStartTransOrder;+ [! g3 \/ t$ @2 z9 x
if @.Destination = void/ R: S* ]- K1 T/ W" A
then -- no transport order for vehicle @
- f. Y* K# j, ~9 v8 T @.Destination :=! y5 ~6 i- j, w( {9 Y
rgManager.nearestFreeStation(@,track.~);' K. T; y" X& `: D) q" O9 d7 ~
newDirection(@); ; t# @2 k$ v- h* b1 W# C- ^; U& s
if @.Destination /= void then
/ S$ {( ?5 u$ m$ V) `# @/ D @.Destination.NumReservation :=
- h5 ?& I" ~- q, L8 U @.Destination.NumReservation + 1;5 s" f0 h1 l& J+ H
end;, a) ^% Y, `6 U! w( i' ]: y. T# }
@.CurrIcon := "drivingHome";5 k: V& Z4 C1 R1 d- C; A
@.DrivingHome := true;* Q3 `7 O" u" t/ C; r2 w
end;8 ~; c4 L# t1 v4 o# b3 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 q. f2 a* `$ C% f* U l; B0 X part := @.transpOrder;9 P, N3 y; ~* U ?7 P/ I" _
part.move(@);-- load part, ^& {+ X' C- C
@.CurrIcon := "load";' v7 g/ ?0 |0 t" c" o
GlobalDistObj := part.globDestination;2 @0 y& E* J5 [% K9 P* A, |
assignLObj := rgmanager.rgAssignL;( ]/ w( X" n+ m
row := assignLObj.getRowNo(GlobalDistObj);
7 d0 R( `8 l1 w6 X, W, Y6 |8 o if Row = -1 then -- since 70! o) i- F( d' R! B# o
if lan=1 then# Y$ q9 y% b' M7 N9 o7 d0 c: i" B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 u5 x* [ `6 R' }" L to_str("in der Andockstation: \"",?.~.name,"\""));0 h0 \9 a+ M8 y& b y9 R
else% z$ m: p% k( C9 Y5 d: ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, h% b! j; s. M- j8 G5 I
to_str("in docking station: \"",?.~.name,"\"")); $ w* e" F' T4 g; S- `+ r9 z2 D4 u: E V
end; t* D, Z! ^' L f* ?! h
else
$ U2 h2 A6 H7 B& M9 P9 h @.Destination := assignLObj[1,row];
* {5 v" d. T d3 {: [5 I end; 6 ~. v+ R5 ?1 ]* @
newDirection(@);
6 `+ ]' j$ B6 }& c, ` @.HasOrder := true;
* H" {. g+ G( x: Y4 t end;# M. n5 P! F8 P( @
end;0 F0 {' ]8 z/ Y5 n4 D7 Q
end; -- of the method
8 V2 S% ?: E# B. q9 b+ F |