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
713a3f03
Commit
713a3f03
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
enhancements in capacity station objects
parent
1901e681
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
dream/simulation/CapacityStation.py
dream/simulation/CapacityStation.py
+6
-6
dream/simulation/CapacityStationBuffer.py
dream/simulation/CapacityStationBuffer.py
+4
-4
dream/simulation/CapacityStationExit.py
dream/simulation/CapacityStationExit.py
+6
-4
No files found.
dream/simulation/CapacityStation.py
View file @
713a3f03
...
...
@@ -39,21 +39,21 @@ class CapacityStation(Queue):
# the __init__ method of the CapacityStation
#===========================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=
float
(
"inf"
),
intervalCapacity
=
[],
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
,
schedulingRule
,
gatherWipStat
)
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
# a list that holds the capacity (manhours) that is available in each interval
self
.
intervalCapacity
=
intervalCapacity
# a list that holds the capacity (manhours) that is available in each interval for the remaining time
self
.
daily
IntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
remaining
IntervalCapacity
=
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
.
is
Bl
ocked
=
True
self
.
is
L
ocked
=
True
def
initialize
(
self
):
Queue
.
initialize
(
self
)
self
.
daily
IntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
is
Bl
ocked
=
True
self
.
remaining
IntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
is
L
ocked
=
True
def
canAccept
(
self
):
if
self
.
is
Bl
ocked
:
if
self
.
is
L
ocked
:
return
False
return
Queue
.
canAccept
()
dream/simulation/CapacityStationBuffer.py
View file @
713a3f03
...
...
@@ -36,15 +36,15 @@ 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
.
is
Bl
ocked
=
True
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
self
.
is
L
ocked
=
True
def
initialize
(
self
):
Queue
.
initialize
(
self
)
self
.
is
Bl
ocked
=
True
self
.
is
L
ocked
=
True
def
canAccept
(
self
):
if
self
.
is
Bl
ocked
:
if
self
.
is
L
ocked
:
return
False
return
Queue
.
canAccept
()
dream/simulation/CapacityStationExit.py
View file @
713a3f03
...
...
@@ -38,15 +38,17 @@ class CapacityStationExit(Exit):
#===========================================================================
# the __init__ method of the CapacityStationExit
#===========================================================================
def
__init__
(
self
,
id
,
name
=
None
):
def
__init__
(
self
,
id
,
name
=
None
,
nextCapacityStationBufferId
=
None
):
Exit
.
__init__
(
self
,
id
,
name
)
self
.
isBlocked
=
True
self
.
isLocked
=
True
self
.
nextCapacityStationBufferId
=
nextCapacityStationBufferId
# the id of the next station. If it is None it
# means it is the end of the system.
def
initialize
(
self
):
Exit
.
initialize
(
self
)
self
.
is
Bl
ocked
=
True
self
.
is
L
ocked
=
True
def
canAccept
(
self
):
if
self
.
is
Bl
ocked
:
if
self
.
is
L
ocked
:
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