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
07569fd7
Commit
07569fd7
authored
Sep 30, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unused SimPy imports removed
parent
cb1fc027
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
17 additions
and
14 deletions
+17
-14
dream/simulation/Assembly.py
dream/simulation/Assembly.py
+2
-1
dream/simulation/Conveyer.py
dream/simulation/Conveyer.py
+2
-1
dream/simulation/Dismantle.py
dream/simulation/Dismantle.py
+3
-2
dream/simulation/Exit.py
dream/simulation/Exit.py
+1
-1
dream/simulation/Failure.py
dream/simulation/Failure.py
+1
-1
dream/simulation/Frame.py
dream/simulation/Frame.py
+1
-1
dream/simulation/Globals.py
dream/simulation/Globals.py
+1
-1
dream/simulation/JSONInputs/Topology01.json
dream/simulation/JSONInputs/Topology01.json
+1
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+1
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-2
dream/simulation/Queue.py
dream/simulation/Queue.py
+2
-1
dream/simulation/Source.py
dream/simulation/Source.py
+1
-1
No files found.
dream/simulation/Assembly.py
View file @
07569fd7
...
...
@@ -26,7 +26,8 @@ Models an assembly object
it gathers frames and parts which are loaded to the frames
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
Process
,
Resource
from
SimPy.Simulation
import
waituntil
,
now
,
hold
import
xlwt
from
RandomNumberGenerator
import
RandomNumberGenerator
import
scipy.stats
as
stat
...
...
dream/simulation/Conveyer.py
View file @
07569fd7
...
...
@@ -26,7 +26,8 @@ Models a conveyer object
it gathers entities and transfers them with a certain speed
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
Process
,
Resource
from
SimPy.Simulation
import
waituntil
,
now
,
hold
,
infinity
,
activate
import
xlwt
import
scipy.stats
as
stat
from
CoreObject
import
CoreObject
...
...
dream/simulation/Dismantle.py
View file @
07569fd7
...
...
@@ -26,7 +26,8 @@ Models a dicmantle object
it gathers frames that have parts loaded, unloads the parts and sends the frame to one destination and the parts to another
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
Process
,
Resource
from
SimPy.Simulation
import
waituntil
,
now
,
hold
,
infinity
import
xlwt
from
RandomNumberGenerator
import
RandomNumberGenerator
import
scipy.stats
as
stat
...
...
@@ -93,7 +94,7 @@ class Dismantle(CoreObject):
self
.
nameLastFrameWasFull
=
""
#holds the name of the last frame that was full, ie that assembly process started
self
.
nameLastEntityEntered
=
""
#holds the name of the last frame that entered processing in the object
self
.
nameLastEntityEnded
=
""
#holds the name of the last frame that ended processing in the object
self
.
Res
=
Resource
(
capacity
=
I
nfinity
)
self
.
Res
=
Resource
(
capacity
=
i
nfinity
)
self
.
Res
.
activeQ
=
[]
self
.
Res
.
waitQ
=
[]
...
...
dream/simulation/Exit.py
View file @
07569fd7
...
...
@@ -25,7 +25,7 @@ Created on 6 Feb 2013
models the exit of the model
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
waituntil
import
xlwt
import
scipy.stats
as
stat
from
CoreObject
import
CoreObject
...
...
dream/simulation/Failure.py
View file @
07569fd7
...
...
@@ -26,7 +26,7 @@ Created on 9 Nov 2012
models the failures that servers can have
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
now
,
Process
,
hold
,
request
,
reactivate
,
release
import
math
from
RandomNumberGenerator
import
RandomNumberGenerator
from
ObjectInterruption
import
ObjectInterruption
...
...
dream/simulation/Frame.py
View file @
07569fd7
...
...
@@ -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
*
from
SimPy.Simulation
import
Resource
from
Globals
import
G
from
Entity
import
Entity
...
...
dream/simulation/Globals.py
View file @
07569fd7
...
...
@@ -25,7 +25,7 @@ Created on 8 Nov 2012
carries some global variables
'''
from
SimPy.Simulation
import
*
#
from SimPy.Simulation import *
from
Machine
import
Machine
from
Queue
import
Queue
from
Repairman
import
Repairman
...
...
dream/simulation/JSONInputs/Topology01.json
View file @
07569fd7
...
...
@@ -52,7 +52,7 @@
},
"successorList"
:
[
"E1"
]
},
{
"_class"
:
"Dream.Queue
LIFO
"
,
{
"_class"
:
"Dream.Queue"
,
"id"
:
"DummyQ"
,
"name"
:
"DummyQ"
,
"isDummy"
:
"1"
,
...
...
dream/simulation/LineGenerationJSON.py
View file @
07569fd7
...
...
@@ -50,7 +50,7 @@ except ImportError:
sys
.
modules
[
'scipy'
]
=
scipy
logger
.
error
(
"Scipy cannot be imported, using dummy implementation"
)
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
activate
,
initialize
,
simulate
from
Source
import
Source
from
Globals
import
G
from
Machine
import
Machine
...
...
dream/simulation/Machine.py
View file @
07569fd7
...
...
@@ -313,8 +313,7 @@ class Machine(CoreObject):
self
.
totalFailureTime
+=
now
()
-
self
.
timeLastFailure
#we add the value only if it hasn't already been added
#if((len(self.next[0].Res.activeQ)>0) and (self.nameLastEntityEnded==self.nameLastEntityEntered) and (not alreadyAdded)):
if
((
self
.
nameLastEntityEnded
==
self
.
nameLastEntityEntered
)
and
(
not
alreadyAdded
)):
print
"in"
if
((
mightBeBlocked
)
and
(
self
.
nameLastEntityEnded
==
self
.
nameLastEntityEntered
)
and
(
not
alreadyAdded
)):
self
.
totalBlockageTime
+=
(
now
()
-
self
.
timeLastEntityEnded
)
-
(
now
()
-
self
.
timeLastFailure
)
-
self
.
downTimeInTryingToReleaseCurrentEntity
#Machine was idle when it was not in any other state
...
...
dream/simulation/Queue.py
View file @
07569fd7
...
...
@@ -26,7 +26,8 @@ Models a FIFO queue where entities can wait in order to get into a server
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
Process
,
Resource
from
SimPy.Simulation
import
waituntil
,
now
from
CoreObject
import
CoreObject
#the Queue object
...
...
dream/simulation/Source.py
View file @
07569fd7
...
...
@@ -26,7 +26,7 @@ Created on 8 Nov 2012
models the source object that generates the entities
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
hold
from
Part
import
Part
from
RandomNumberGenerator
import
RandomNumberGenerator
from
CoreObject
import
CoreObject
...
...
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