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
b2918e6f
Commit
b2918e6f
authored
Jun 16, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReadJSShifts now only for operators, minor correction
parent
664d0895
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
37 deletions
+41
-37
dream/plugins/JobShop/ReadJSShifts.py
dream/plugins/JobShop/ReadJSShifts.py
+41
-37
No files found.
dream/plugins/JobShop/ReadJSShifts.py
View file @
b2918e6f
...
@@ -98,6 +98,9 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
...
@@ -98,6 +98,9 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
breakStart
,
breakEnd
=
timePair
breakStart
,
breakEnd
=
timePair
timeStartList
.
append
(
breakEnd
)
timeStartList
.
append
(
breakEnd
)
timeEndList
.
insert
(
0
,
breakStart
)
timeEndList
.
insert
(
0
,
breakStart
)
# sort the list before proceeding
timeEndList
.
sort
()
timeStartList
.
sort
()
#if it is the current row is an extended row for the information belonging to a resource, and no resource name is entered
#if it is the current row is an extended row for the information belonging to a resource, and no resource name is entered
if
line
[
0
]:
if
line
[
0
]:
entityID
=
line
[
0
].
split
(
"-"
)[
0
]
entityID
=
line
[
0
].
split
(
"-"
)[
0
]
...
@@ -142,7 +145,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
...
@@ -142,7 +145,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
#create default pattern for all operators (10 days long)
#create default pattern for all operators (10 days long)
timeStartList
=
[]
timeStartList
=
[]
timeEndList
=
[]
timeEndList
=
[]
for
dayNumber
in
range
(
0
,
1
0
):
for
dayNumber
in
range
(
0
,
2
0
):
startTime
=
"08:00"
startTime
=
"08:00"
endTime
=
"18:00"
endTime
=
"18:00"
upDate
=
now
.
date
()
+
datetime
.
timedelta
(
days
=
dayNumber
)
upDate
=
now
.
date
()
+
datetime
.
timedelta
(
days
=
dayNumber
)
...
@@ -167,6 +170,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
...
@@ -167,6 +170,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
# ================================================================
# ================================================================
for
node
,
node_data
in
nodes
.
items
():
for
node
,
node_data
in
nodes
.
items
():
if
node_data
.
get
(
'_class'
,
None
)
==
'Dream.Operator'
:
modifiedDefaultDays
=
[]
# the days of the defaultShiftPattern that have been modified according to the exceptionShiftPattern
modifiedDefaultDays
=
[]
# the days of the defaultShiftPattern that have been modified according to the exceptionShiftPattern
if
node
in
exceptionShiftPattern
:
if
node
in
exceptionShiftPattern
:
for
index1
,
exception
in
enumerate
(
exceptionShiftPattern
[
node
]):
for
index1
,
exception
in
enumerate
(
exceptionShiftPattern
[
node
]):
...
...
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