/* called by: entrance ctrl of the object 'track'
( w7 ? ?) X \- X/ f' K*/
4 P+ v/ m: r- F0 |% a2 }# Ais
6 U( ^/ M2 n$ M6 p* E$ ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 G3 ~; X% L( a0 c, f/ r6 v) cdo: H( a* o7 J9 ]! U
Lan := rootfolder.Internal.Tools.AOLlanguage;* x) u9 V# z$ j& W2 q& y7 s0 n) x
if current = @.Destination -- else return4 k3 n" }3 G- Z9 R3 |3 a" o
then
: n7 a% X! C2 Z W6 _ @.Destination := void;
' o0 r( j1 I* E8 o" E8 q! C if @.occupied then) W8 o8 P2 o( E( z P9 v) Q$ @
part := @.cont;. w: T" s4 x0 w9 ~/ o
@.transpOrder := void;
0 z5 ?& Q% m4 {# r* |. C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! \/ I0 y& i9 a& V* r# w2 ` @,root.eventcontroller.simTime);
$ U {6 \% s5 w0 e, Z @.HasOrder := false;
; [. S& Z- F6 ]" u+ J2 B& D7 }9 w @.DrivingHome := true;! h U9 P. Z" l: E
rgManager.tryToStartTransOrder; D% B/ }9 y% W* q( Y6 H
if @.Destination = void. ~& O# N" T+ |
then -- no transport order for vehicle @. A7 F+ f9 U3 |6 C' \1 U9 }' @6 G
@.Destination := I7 |+ h7 ^: ~* ?3 ]! [9 n2 |& a
rgManager.nearestFreeStation(@,track.~);
: w4 p2 R5 G( J. @ newDirection(@); 4 e, z6 N, D% \: n7 m0 f, m' y
if @.Destination /= void then
1 U* m9 s; Z. I' v" T: ^ @.Destination.NumReservation :=
0 h- O: Z" {/ u! \. |8 [( f @.Destination.NumReservation + 1;9 U) V3 ~4 L. |% r& t; M# s3 x
end;) x8 V3 E, s9 N; f% c& B4 C$ D2 V
@.CurrIcon := "drivingHome";
/ q5 [& E# V% U8 m @.DrivingHome := true;
& L! x- h' O9 q; S end;
( m: L( j1 a$ ~/ z0 H) P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; s, }7 W0 Z- u# V* i1 N9 k part := @.transpOrder;& h: y- H( o$ E& O+ N
part.move(@);-- load part
8 Z, w+ F' \8 J @.CurrIcon := "load";. k/ i! `& G+ z3 n: r. d
GlobalDistObj := part.globDestination;
, ^& V8 C B7 Q0 G% ^, B9 e assignLObj := rgmanager.rgAssignL;$ B# b5 ]- j" q; _9 C3 T! \% B
row := assignLObj.getRowNo(GlobalDistObj);+ ?, }3 u# s" I" F8 F# h6 t
if Row = -1 then -- since 70) F7 ^+ W2 @0 k+ w- D
if lan=1 then# y T; x4 j, c. X: Y' y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 }6 D2 u0 h' `2 N
to_str("in der Andockstation: \"",?.~.name,"\""));/ a% C+ D- I- T7 r- O: D
else+ ^( I: F6 J- x* s3 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, e4 x, @ l6 k+ G! I ~" }
to_str("in docking station: \"",?.~.name,"\""));
: U l- V9 X6 L, {* q# [# v1 U end;
5 T" a0 h( o1 t: [& u! B9 D else
" b0 @' {6 d+ O: Q% T J0 f @.Destination := assignLObj[1,row];6 w! e7 t2 s" F
end; ; ?! p* O2 ^; r* {
newDirection(@);) R) e4 c/ H( l3 l$ F! M
@.HasOrder := true;
# n2 }$ X( G ~& z end;- }* r C9 f7 t, b, b$ x2 l5 x! [' ]
end;# j) V9 w: r3 L3 a- j; x
end; -- of the method4 B# M6 L5 Q0 ~2 O0 H
|