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
6981dad9
Commit
6981dad9
authored
Jun 04, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace simpy2 by their simpy3 equivalents
parent
82b4b0d3
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
53 deletions
+50
-53
dream/simulation/BatchDecompositionStartTime.py
dream/simulation/BatchDecompositionStartTime.py
+2
-3
dream/simulation/ConditionalBuffer.py
dream/simulation/ConditionalBuffer.py
+1
-2
dream/simulation/Frame.py
dream/simulation/Frame.py
+2
-2
dream/simulation/M3.py
dream/simulation/M3.py
+0
-1
dream/simulation/OperatedMachine.py
dream/simulation/OperatedMachine.py
+43
-42
dream/simulation/OperatorPreemptive.py
dream/simulation/OperatorPreemptive.py
+1
-2
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+1
-1
No files found.
dream/simulation/BatchDecompositionStartTime.py
View file @
6981dad9
...
...
@@ -27,7 +27,6 @@ Custom object. Maybe we should have a generic method that the objects can call i
'''
from
BatchDecomposition
import
BatchDecomposition
from
SimPy.Simulation
import
now
class
BatchDecompositionStartTime
(
BatchDecomposition
):
...
...
@@ -35,7 +34,7 @@ class BatchDecompositionStartTime(BatchDecomposition):
#gets an entity from the predecessor
def getEntity(self):
activeEntity=BatchDecomposition.getEntity(self)
activeEntity.startTime=
now()
activeEntity.startTime=
self.env.now
return activeEntity
'''
...
...
@@ -45,6 +44,6 @@ class BatchDecompositionStartTime(BatchDecomposition):
# assign it as the batch start time
if
len
(
self
.
getActiveObjectQueue
())
==
self
.
numberOfSubBatches
:
batch
=
self
.
getActiveObjectQueue
()[
0
].
parentBatch
batch
.
startTime
=
now
()
batch
.
startTime
=
self
.
env
.
now
activeEntity
=
BatchDecomposition
.
removeEntity
(
self
,
entity
)
return
activeEntity
dream/simulation/ConditionalBuffer.py
View file @
6981dad9
...
...
@@ -26,7 +26,6 @@ Inherits from QueueManagedJob. Checks the condition of (a) component(s) before i
'''
from
QueueManagedJob
import
QueueManagedJob
from
SimPy.Simulation
import
now
# ===========================================================================
# Error in the setting up of the WIP
...
...
@@ -156,4 +155,4 @@ class ConditionalBuffer(QueueManagedJob):
activeEntity
.
proceed
=
True
activeEntity
.
candidateReceivers
.
append
(
nextObject
)
mayProceed
=
True
return
mayProceed
\ No newline at end of file
return
mayProceed
dream/simulation/Frame.py
View file @
6981dad9
...
...
@@ -26,7 +26,7 @@ Created on 18 Feb 2013
models a frame entity. This can flow through the system and carry parts
'''
from
SimPy.Simulation
import
Resource
from
simpy
import
Resource
from
Globals
import
G
from
Entity
import
Entity
...
...
@@ -45,4 +45,4 @@ class Frame(Entity):
self
.
lenght
=
2.0
def
getFrameQueue
(
self
):
return
self
.
Res
.
activeQ
return
self
.
Res
.
users
dream/simulation/M3.py
View file @
6981dad9
...
...
@@ -28,7 +28,6 @@ BatchScrapMachine->BatchDecomposition
'''
from
BatchScrapMachine
import
BatchScrapMachine
from
SimPy.Simulation
import
now
class
M3
(
BatchScrapMachine
):
...
...
dream/simulation/OperatedMachine.py
View file @
6981dad9
This diff is collapsed.
Click to expand it.
dream/simulation/OperatorPreemptive.py
View file @
6981dad9
...
...
@@ -28,7 +28,6 @@ he checks if the operation that calls him is of higher priority than the one
that he is currently in.
'''
from
SimPy.Simulation
import
Resource
,
now
from
Operator
import
Operator
# ===========================================================================
...
...
@@ -94,7 +93,7 @@ class OperatorPreemptive(Operator):
# then the receiver must be preemptied before it can receive any entities from the calerObject
victim
.
shouldPreempt
=
True
victim
.
preempt
()
victim
.
timeLastEntityEnded
=
now
()
#required to count blockage correctly in the preemptied station
victim
.
timeLastEntityEnded
=
self
.
env
.
now
#required to count blockage correctly in the preemptied station
return
True
# if the entity has no isCritical property then ran the default behaviour
except
:
...
...
dream/simulation/OperatorRouter.py
View file @
6981dad9
...
...
@@ -31,7 +31,7 @@ Models an Interruption that schedules the operation of the machines by different
import
simpy
from
ObjectInterruption
import
ObjectInterruption
from
SimPy.Simulation
import
waituntil
,
now
,
hold
,
request
,
release
,
waitevent
#
from SimPy.Simulation import waituntil, now, hold, request, release, waitevent
# ===========================================================================
...
...
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