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
745e070e
Commit
745e070e
authored
Jun 04, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix imports
remove unused imports and the use of import *
parent
e14dcb06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
DREAM/dream/simulation/Machine.py
DREAM/dream/simulation/Machine.py
+4
-7
No files found.
DREAM/dream/simulation/Machine.py
View file @
745e070e
...
@@ -7,10 +7,10 @@ Created on 8 Nov 2012
...
@@ -7,10 +7,10 @@ Created on 8 Nov 2012
Models a machine that can also have failures
Models a machine that can also have failures
'''
'''
from
SimPy.Simulation
import
*
from
SimPy.Simulation
import
Process
,
Resource
from
SimPy.Simulation
import
activate
,
passivate
,
waituntil
,
now
,
hold
from
Failure
import
Failure
from
Failure
import
Failure
import
xlwt
import
xlrd
from
RandomNumberGenerator
import
RandomNumberGenerator
from
RandomNumberGenerator
import
RandomNumberGenerator
import
scipy.stats
as
stat
import
scipy.stats
as
stat
...
@@ -29,10 +29,7 @@ class Machine(Process):
...
@@ -29,10 +29,7 @@ class Machine(Process):
self
.
failureDistType
=
fDist
#the distribution that the failure follows
self
.
failureDistType
=
fDist
#the distribution that the failure follows
self
.
repairman
=
repairman
self
.
repairman
=
repairman
#self.xls = xlwt.Workbook() #create excel file
#self.sheet = self.xls.add_sheet('sheet ', cell_overwrite_ok=True) #create excel sheet
#self.xlindex=0
self
.
rng
=
RandomNumberGenerator
(
self
,
self
.
distType
)
self
.
rng
=
RandomNumberGenerator
(
self
,
self
.
distType
)
self
.
rng
.
avg
=
time
[
0
]
self
.
rng
.
avg
=
time
[
0
]
self
.
rng
.
stdev
=
time
[
1
]
self
.
rng
.
stdev
=
time
[
1
]
...
...
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