/* called by: entrance ctrl of the object 'track'
/ e3 p; k3 N6 ]/ K*/
5 | ^7 m' i3 s! p4 pis
9 a* Q+ Y: J3 J+ T$ f- x. L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& ^2 v8 Z1 O$ J1 I8 Udo; D1 Y) N% h B4 }4 H& [
Lan := rootfolder.Internal.Tools.AOLlanguage;
* [' u5 p/ w3 U% \ if current = @.Destination -- else return R5 p, ]+ w7 f. ^
then5 I p4 R( T6 o% v
@.Destination := void;
8 K1 j M! s9 t f) ]4 t, J if @.occupied then2 B& N' w: f9 x
part := @.cont;
8 R$ D' A& j" ^8 K2 \/ @ @.transpOrder := void;* R' k# S! ]3 t+ l- l: T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ H" T. x9 o a @,root.eventcontroller.simTime);2 g1 p8 t* D( Q" ^# e6 g8 P
@.HasOrder := false;
q& K" T/ z) V' X @.DrivingHome := true;
! s' i! P% U& c- P( g/ u8 b5 M rgManager.tryToStartTransOrder;5 T. k) g9 q. r+ t; C* w
if @.Destination = void
4 y8 \3 V, R% O; R7 J then -- no transport order for vehicle @, t1 [* j: J: _/ x5 n. [4 `
@.Destination :=3 J: y+ g- `) h9 }, G X; D$ d, }) @1 h
rgManager.nearestFreeStation(@,track.~);. [4 R, u4 E$ p; l4 f
newDirection(@); # }( ^+ |( e6 `5 J$ i
if @.Destination /= void then) Q0 H1 |2 m/ J
@.Destination.NumReservation :=* e. u- A% m3 F% e8 R
@.Destination.NumReservation + 1;5 ~( N, v& y; ?/ _- U7 s) I* V
end;
! C! ~4 B" T3 B2 F$ p1 p4 K6 I @.CurrIcon := "drivingHome";
0 ~* C1 R$ j: t2 k! C) n @.DrivingHome := true;. l2 r2 b$ }6 v. ?
end;" u4 f- j1 {. m2 ?7 b' w% m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ @1 J5 B# k8 j" C: g8 u
part := @.transpOrder;) l! `# V5 \6 o# [- u F
part.move(@);-- load part
5 J& M( Z" H/ P" | @.CurrIcon := "load";0 F8 ~8 f; z3 Q+ j
GlobalDistObj := part.globDestination;
4 b: }9 `7 S5 u! X( \" K- x { assignLObj := rgmanager.rgAssignL;# `4 c( L: @, O5 R( w, A
row := assignLObj.getRowNo(GlobalDistObj);% V7 E" h4 L6 `1 k
if Row = -1 then -- since 700 ^9 W# r$ Z( i- L
if lan=1 then
; Z( H5 ] s7 | ?! {8 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) q: o' n( {0 B' G3 p8 I, w& R to_str("in der Andockstation: \"",?.~.name,"\""));7 b; W9 X( O3 T: v
else% z3 n; s: C+ ~/ [) {2 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! k3 b e+ U. [. U$ G
to_str("in docking station: \"",?.~.name,"\"")); ) k# j4 e" j# P: `
end;
' P! u" Y) U3 @# M) S& G7 o/ L else
. q. Y. j1 t) {/ U; s, e; u2 M+ W @.Destination := assignLObj[1,row];5 T7 c% z; d8 b3 ?* N2 p8 M
end;
* z! k, }: K4 \- |$ e+ l newDirection(@);
, C5 [. A* L6 [ l4 [7 t @.HasOrder := true;
' M# X# w, o# R. {; c' i; d) { end;
$ F# h/ i2 b N1 P5 j" y1 l end;
" S7 {3 p0 m4 pend; -- of the method; W& h2 T6 M0 C
|