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
cb7cc6a1
Commit
cb7cc6a1
authored
Jun 05, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Jun 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CapacityStation initialize and canAccept added
parent
0c3151f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
dream/simulation/CapacityStation.py
dream/simulation/CapacityStation.py
+13
-1
No files found.
dream/simulation/CapacityStation.py
View file @
cb7cc6a1
...
...
@@ -40,8 +40,20 @@ class CapacityStation(Queue):
#===========================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=
float
(
"inf"
),
intervalCapacity
=
[],
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
,
schedulingRule
,
gatherWipStat
)
# a list that holds the capacity (manhours) that is available in each interval
self
.
intervalCapacity
=
intervalCapacity
self
.
dailyIntervalCapacity
=
list
(
intervalCapacity
)
# a list that holds the capacity (manhours) that is available in each interval for the remaining time
self
.
dailyIntervalCapacity
=
list
(
self
.
intervalCapacity
)
# blocks the entry of the capacity station, so that it can be manipulated to accept only in certain moments of simulation time
self
.
isBlocked
=
True
def
initialize
(
self
):
self
.
dailyIntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
isBlocked
=
True
def
canAccept
(
self
):
if
self
.
isBlocked
:
return
False
return
Queue
.
canAccept
()
\ No newline at end of file
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