/* called by: entrance ctrl of the object 'track'
" K1 z4 F& h# `# J1 P! V1 S*// o5 Y5 i# d. c$ o( [3 i
is! J2 A5 i, |0 V* ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& _* \2 w& c" u# `/ `/ tdo& J9 n6 g. ^* s2 [ D
Lan := rootfolder.Internal.Tools.AOLlanguage;
& g7 m6 F( g$ t/ Y if current = @.Destination -- else return2 S- i( G. Z) X) C+ d' B; \. v: \
then
8 f: [' M2 Z# M% M" e3 `8 | @.Destination := void;
! l$ U6 a2 D @% P8 d# K if @.occupied then
, h" Q+ A- B: {! ~8 | part := @.cont;+ ~- ]" H0 e0 ^ ?
@.transpOrder := void;
0 ~1 [& D3 p! z4 \; J# g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, N# S. w! h7 L6 }# a. @6 R$ ~7 t @,root.eventcontroller.simTime);
4 [' ]/ D R! r @.HasOrder := false;
$ W8 D6 B# W8 `6 R @.DrivingHome := true;/ ?8 U7 b! P- b% T. h
rgManager.tryToStartTransOrder;
" e8 f' a, K, g* V6 ^ if @.Destination = void3 y) ]) ^6 j! J2 t! A
then -- no transport order for vehicle @
4 Z+ q2 e" e2 n( L @.Destination :=8 a$ C1 `+ [' v
rgManager.nearestFreeStation(@,track.~);
2 H/ N: v ]. W, V+ k3 o newDirection(@); - a/ E* f9 L/ D1 x% e8 d) L
if @.Destination /= void then2 {( f3 Q3 Q& \
@.Destination.NumReservation :=& u, b6 o C% W3 Q4 z
@.Destination.NumReservation + 1;: O5 ^, U& k( O% ^
end;
1 o$ [ A7 H$ g @.CurrIcon := "drivingHome";
0 T9 f+ z* {9 z5 c9 a$ f! ~6 K2 l+ I: u @.DrivingHome := true;4 n4 ^) N% g2 H/ g* M9 B
end;
9 a# g; F0 N$ x J* e% [$ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& }# O4 U5 T# Y2 U1 {$ G$ y) R4 Y- t: z part := @.transpOrder;
# z2 h( x+ R, `1 K( P part.move(@);-- load part
) C) \3 A4 t6 b( D% p @.CurrIcon := "load";
/ w- p7 ^# i9 T! y. q, {2 z GlobalDistObj := part.globDestination;
$ \( Z I5 J, O# \& ~5 e assignLObj := rgmanager.rgAssignL;6 t, Q, }; G/ `
row := assignLObj.getRowNo(GlobalDistObj);
2 `8 k7 ^+ T! h, G2 F$ `" v if Row = -1 then -- since 70
3 q- V! n" x% w [/ F if lan=1 then; f% _. f- _5 N" L" W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) h$ p" H4 q5 j' j$ \' C
to_str("in der Andockstation: \"",?.~.name,"\""));
9 I6 W5 B1 `* K* T7 ]5 t7 q else
& y. W* B& l+ a, @" L( w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, s6 S% d% J( v" J
to_str("in docking station: \"",?.~.name,"\""));
: c: @# J4 @2 B+ N$ w end;9 q$ s1 ]+ u% S7 |7 h6 s, m! d
else
* {% z# L+ I1 D; R- `. e @.Destination := assignLObj[1,row];4 n& h. v! |$ t( y7 Z! D+ j
end; % e6 z! p- i1 S3 D% f% {& z9 Y+ I
newDirection(@);
* k. W1 k' C) S# G8 v @.HasOrder := true;/ n% X0 @; n7 B* z. Z& W5 }
end;+ h5 J; w+ D: f
end;
/ ^8 o! E5 O. I( s; s) tend; -- of the method
3 [, l9 H! v" W. x Z |