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
83791603
Commit
83791603
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
correction in new objects canAccept
parent
8ebdc754
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
dream/simulation/CapacityStation.py
dream/simulation/CapacityStation.py
+3
-2
dream/simulation/CapacityStationBuffer.py
dream/simulation/CapacityStationBuffer.py
+2
-2
dream/simulation/CapacityStationExit.py
dream/simulation/CapacityStationExit.py
+2
-2
No files found.
dream/simulation/CapacityStation.py
View file @
83791603
...
...
@@ -42,6 +42,7 @@ class CapacityStation(Queue):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
# a list that holds the capacity (manhours) that is available in each interval
self
.
intervalCapacity
=
intervalCapacity
print
self
.
id
,
intervalCapacity
# a list that holds the capacity (manhours) that is available in each interval for the remaining time
self
.
remainingIntervalCapacity
=
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
...
...
@@ -52,9 +53,9 @@ class CapacityStation(Queue):
self
.
remainingIntervalCapacity
=
list
(
self
.
intervalCapacity
)
self
.
isLocked
=
True
def
canAccept
(
self
):
def
canAccept
(
self
,
callerObject
=
None
):
if
self
.
isLocked
:
return
False
return
Queue
.
canAccept
()
return
Queue
.
canAccept
(
self
)
\ No newline at end of file
dream/simulation/CapacityStationBuffer.py
View file @
83791603
...
...
@@ -44,7 +44,7 @@ class CapacityStationBuffer(Queue):
Queue
.
initialize
(
self
)
self
.
isLocked
=
True
def
canAccept
(
self
):
def
canAccept
(
self
,
callerObject
=
None
):
if
self
.
isLocked
:
return
False
return
Queue
.
canAccept
()
return
Queue
.
canAccept
(
self
)
dream/simulation/CapacityStationExit.py
View file @
83791603
...
...
@@ -48,7 +48,7 @@ class CapacityStationExit(Exit):
Exit
.
initialize
(
self
)
self
.
isLocked
=
True
def
canAccept
(
self
):
def
canAccept
(
self
,
callerObject
=
None
):
if
self
.
isLocked
:
return
False
return
Exit
.
canAccept
()
\ No newline at end of file
return
Exit
.
canAccept
(
self
)
\ 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