/* called by: entrance ctrl of the object 'track'! S2 c. b* q4 _4 j l7 _# g% C, ]
*/
* U8 I- u) Q* c) ^0 Z$ uis3 N7 g& @- u4 q" [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ a7 I( d: C" Q2 g d* C, Y; ?" N
do! [$ @1 |3 t% e' N" N; w
Lan := rootfolder.Internal.Tools.AOLlanguage;! G, c6 d; `/ X `7 h" y2 |) v
if current = @.Destination -- else return
/ x, B: k, u p$ m& V then
, j! U ]1 T( d( A2 o @.Destination := void;
; ?8 s* F$ J1 x/ a/ g) L. C if @.occupied then4 ~' x5 \0 I8 T
part := @.cont;
/ h: w. j6 D. p# i7 r3 H @.transpOrder := void;4 j }5 I. m$ S# S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* F6 @: i8 ]3 P0 K1 {+ w+ c$ a `
@,root.eventcontroller.simTime);
; |/ f: w) w& t) c9 @2 o M. M8 U @.HasOrder := false;* f1 t; @7 f* l1 v3 Y1 Y1 ~. e
@.DrivingHome := true;9 | `& a1 h) |9 a* C) Q Z
rgManager.tryToStartTransOrder;1 f2 i0 r$ F3 ?. Q& T6 c. h! @
if @.Destination = void) Y0 Y& F0 G" i
then -- no transport order for vehicle @
/ ~ b+ T* o* ]" ~ @.Destination :=! i9 u9 s ~. ^3 Y1 L2 T, e
rgManager.nearestFreeStation(@,track.~);& u, l2 u: l# i s
newDirection(@);
) ~1 _3 ?3 |; q P# L) v+ Q if @.Destination /= void then
( \+ W/ `- Z# j- T& y @.Destination.NumReservation :=. e( H; o% y- {0 o# g/ Z- q0 t
@.Destination.NumReservation + 1;
3 Z# K4 v+ E' o3 ]7 \% u3 [5 D end;& H7 N. u* O" f- w
@.CurrIcon := "drivingHome";" m! W* o0 e% ^1 `( `, `
@.DrivingHome := true;( G2 A$ u, Q2 S# H/ c3 H# p4 ^" S
end;
: t7 o1 m7 b7 P, T7 h) L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. u, Y: N+ ^+ g part := @.transpOrder;6 M2 J2 R3 o' }# y% S
part.move(@);-- load part. @3 O" T% u) ]/ N
@.CurrIcon := "load";( o% a* n+ C. G8 C. u2 f* Y
GlobalDistObj := part.globDestination;
+ ?5 h B" k. P2 k4 P' _; o) F assignLObj := rgmanager.rgAssignL;
. `% x6 B- C, N# k row := assignLObj.getRowNo(GlobalDistObj);5 y' e; d# m1 M" z
if Row = -1 then -- since 70
/ H& u2 ^6 r z( [6 Y5 }* J if lan=1 then5 _. v- F; d" u2 T f" N3 k; Z4 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% F% K8 L9 |6 E9 K& t E
to_str("in der Andockstation: \"",?.~.name,"\""));! E% X1 M/ h. \% e9 ?% P& Y: P4 j
else
3 d& \$ c! q; d. e/ j* W8 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 \4 E. M, U/ k5 d
to_str("in docking station: \"",?.~.name,"\"")); , y! T# C+ p: k5 U
end;* J8 q5 S5 {, `: X
else6 k6 D. n8 V% f! J! J: ^! V/ }
@.Destination := assignLObj[1,row];9 o; N0 ^# R% L$ I) u5 T1 R
end;
1 V& Z5 w# I! d$ M newDirection(@);( @% [* I9 W! s' z, ^+ U* n& B
@.HasOrder := true;
, F/ n2 }4 I& w7 N- _; X2 H: z6 \ end;
) C% i& j% {: y% A+ C7 z+ o end;
& w0 X) b# B) S0 Fend; -- of the method
' B8 {4 u; M% {' O |