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
1901e681
Commit
1901e681
authored
Jun 06, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Jun 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more capacity station objects added
parent
cb7cc6a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
0 deletions
+103
-0
dream/simulation/CapacityStation.py
dream/simulation/CapacityStation.py
+1
-0
dream/simulation/CapacityStationBuffer.py
dream/simulation/CapacityStationBuffer.py
+50
-0
dream/simulation/CapacityStationExit.py
dream/simulation/CapacityStationExit.py
+52
-0
No files found.
dream/simulation/CapacityStation.py
View file @
1901e681
...
...
@@ -48,6 +48,7 @@ class CapacityStation(Queue):
self
.
isBlocked
=
True
def
initialize
(
self
):
Queue
.
initialize
(
self
)
self
.
dailyIntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
isBlocked
=
True
...
...
dream/simulation/CapacityStationBuffer.py
0 → 100644
View file @
1901e681
# ===========================================================================
# Copyright 2013 University of Limerick
#
# This file is part of DREAM.
#
# DREAM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DREAM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with DREAM. If not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
'''
Created on 6 June 2013
@author: George
'''
'''
the buffer of the capacity station. Only change from queue that it can be blocked.
'''
import
simpy
from
Queue
import
Queue
# ===========================================================================
# the Queue object
# ===========================================================================
class
CapacityStationBuffer
(
Queue
):
#===========================================================================
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=
float
(
"inf"
),
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
,
isDummy
,
schedulingRule
,
gatherWipStat
)
self
.
isBlocked
=
True
def
initialize
(
self
):
Queue
.
initialize
(
self
)
self
.
isBlocked
=
True
def
canAccept
(
self
):
if
self
.
isBlocked
:
return
False
return
Queue
.
canAccept
()
dream/simulation/CapacityStationExit.py
0 → 100644
View file @
1901e681
# ===========================================================================
# Copyright 2013 University of Limerick
#
# This file is part of DREAM.
#
# DREAM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DREAM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with DREAM. If not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
'''
Created on 6 June 2013
@author: George
'''
'''
the exit of the capacity station. Only change from buffer that it can be blocked.
'''
from
Exit
import
Exit
import
simpy
# ===========================================================================
# the CapacityStationExit object
# ===========================================================================
class
CapacityStationExit
(
Exit
):
#===========================================================================
# the __init__ method of the CapacityStationExit
#===========================================================================
def
__init__
(
self
,
id
,
name
=
None
):
Exit
.
__init__
(
self
,
id
,
name
)
self
.
isBlocked
=
True
def
initialize
(
self
):
Exit
.
initialize
(
self
)
self
.
isBlocked
=
True
def
canAccept
(
self
):
if
self
.
isBlocked
:
return
False
return
Exit
.
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