Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
5689407f
Commit
5689407f
authored
Nov 13, 2013
by
Georgios Dagkakis
Committed by
Jérome Perrin
Dec 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup in conveyer
parent
1b96962d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
dream/simulation/Conveyer.py
dream/simulation/Conveyer.py
+5
-3
No files found.
dream/simulation/Conveyer.py
View file @
5689407f
...
...
@@ -149,17 +149,19 @@ class Conveyer(CoreObject):
else
:
moveTime1
=
(
self
.
length
-
self
.
position
[
0
])
/
self
.
speed
self
.
position
[
0
]
=
self
.
length
self
.
entityLastReachedEnd
=
self
.
Res
.
activeQ
[
0
]
self
.
entityLastReachedEnd
=
self
.
getActiveObjectQueue
()
[
0
]
self
.
timeLastEntityReachedEnd
=
now
()
self
.
timeLastEntityEnded
=
now
()
#for the other entities
for
i
in
range
(
1
,
len
(
self
.
Res
.
activeQ
)):
for
i
in
range
(
1
,
len
(
self
.
getActiveObjectQueue
()
)):
#if it does not reach the preceding entity move it according to speed
if
self
.
position
[
i
]
+
interval
*
self
.
speed
<
self
.
position
[
i
-
1
]
-
self
.
getActiveObjectQueue
()[
i
].
length
:
moveTime2
=
interval
self
.
position
[
i
]
=
self
.
position
[
i
]
+
interval
*
self
.
speed
#else move it right before the preceding entity
else
:
mTime
=
(
self
.
position
[
i
-
1
]
-
self
.
Res
.
activeQ
[
i
].
length
-
self
.
position
[
i
])
/
self
.
speed
mTime
=
(
self
.
position
[
i
-
1
]
-
self
.
getActiveObjectQueue
()
[
i
].
length
-
self
.
position
[
i
])
/
self
.
speed
if
mTime
>
moveTime2
:
moveTime2
=
mTime
self
.
position
[
i
]
=
self
.
position
[
i
-
1
]
-
self
.
getActiveObjectQueue
()[
i
-
1
].
length
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment