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
9b24d077
Commit
9b24d077
authored
Mar 19, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction in main script
parent
1bd960a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+4
-4
No files found.
dream/simulation/LineGenerationJSON.py
View file @
9b24d077
...
...
@@ -327,12 +327,12 @@ def createObjectInterruptions():
shiftPattern
=
list
(
shift
.
get
(
'shiftPattern'
,
[]))
# patch to correct if input has end of shift at the same time of start of next shift
# TODO check if the backend should be able to handle this
for
index
,
element
in
enumerate
(
shiftPattern
):
if
element
is
shiftPattern
[
-
1
]:
for
index
,
record
in
enumerate
(
shiftPattern
):
if
record
is
shiftPattern
[
-
1
]:
break
next
=
shiftPattern
[
index
+
1
]
if
element
[
1
]
==
next
[
0
]:
element
[
1
]
=
next
[
1
]
if
record
[
1
]
==
next
[
0
]:
record
[
1
]
=
next
[
1
]
shiftPattern
.
remove
(
next
)
endUnfinished
=
bool
(
int
(
shift
.
get
(
'endUnfinished'
,
0
)))
receiveBeforeEndThreshold
=
float
(
shift
.
get
(
'receiveBeforeEndThreshold'
,
0
))
...
...
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