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
86c1267f
Commit
86c1267f
authored
May 20, 2013
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In all objects Run() method changed to run() for the shake of consistency
parent
143fea7f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
8 additions
and
8 deletions
+8
-8
DREAM/dream/simulation/src/Assembly.py
DREAM/dream/simulation/src/Assembly.py
+1
-1
DREAM/dream/simulation/src/Exit.py
DREAM/dream/simulation/src/Exit.py
+1
-1
DREAM/dream/simulation/src/Failure.py
DREAM/dream/simulation/src/Failure.py
+1
-1
DREAM/dream/simulation/src/LineGenerationJSON.py
DREAM/dream/simulation/src/LineGenerationJSON.py
+1
-1
DREAM/dream/simulation/src/Machine.py
DREAM/dream/simulation/src/Machine.py
+2
-2
DREAM/dream/simulation/src/Queue.py
DREAM/dream/simulation/src/Queue.py
+1
-1
DREAM/dream/simulation/src/Source.py
DREAM/dream/simulation/src/Source.py
+1
-1
DREAM/dream/simulation/src/output.xls
DREAM/dream/simulation/src/output.xls
+0
-0
DREAM/dream/simulation/src/trace1.xls
DREAM/dream/simulation/src/trace1.xls
+0
-0
No files found.
DREAM/dream/simulation/src/Assembly.py
View file @
86c1267f
...
@@ -81,7 +81,7 @@ class Assembly(Process):
...
@@ -81,7 +81,7 @@ class Assembly(Process):
self
.
Res
.
waitQ
=
[]
self
.
Res
.
waitQ
=
[]
def
R
un
(
self
):
def
r
un
(
self
):
while
1
:
while
1
:
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Assembly can accept a frame
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Assembly can accept a frame
#and one "frame" predecessor requests it
#and one "frame" predecessor requests it
...
...
DREAM/dream/simulation/src/Exit.py
View file @
86c1267f
...
@@ -60,7 +60,7 @@ class Exit(Process):
...
@@ -60,7 +60,7 @@ class Exit(Process):
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
def
R
un
(
self
):
def
r
un
(
self
):
while
1
:
while
1
:
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Queue can accept an entity
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Queue can accept an entity
#and one predecessor requests it
#and one predecessor requests it
...
...
DREAM/dream/simulation/src/Failure.py
View file @
86c1267f
...
@@ -53,7 +53,7 @@ class Failure(Process):
...
@@ -53,7 +53,7 @@ class Failure(Process):
self
.
rngTTR
=
RandomNumberGenerator
(
self
,
self
.
distType
)
self
.
rngTTR
=
RandomNumberGenerator
(
self
,
self
.
distType
)
self
.
rngTTR
.
avg
=
MTTR
self
.
rngTTR
.
avg
=
MTTR
def
R
un
(
self
):
def
r
un
(
self
):
while
1
:
while
1
:
#yield hold,self,self.calcTimeToFailure()
#yield hold,self,self.calcTimeToFailure()
yield
hold
,
self
,
self
.
rngTTF
.
generateNumber
()
#wait until a failure happens
yield
hold
,
self
,
self
.
rngTTF
.
generateNumber
()
#wait until a failure happens
...
...
DREAM/dream/simulation/src/LineGenerationJSON.py
View file @
86c1267f
...
@@ -198,7 +198,7 @@ def initializeObjects():
...
@@ -198,7 +198,7 @@ def initializeObjects():
def
activateObjects
():
def
activateObjects
():
for
j
in
range
(
len
(
G
.
ObjList
)):
for
j
in
range
(
len
(
G
.
ObjList
)):
try
:
try
:
activate
(
G
.
ObjList
[
j
],
G
.
ObjList
[
j
].
R
un
())
activate
(
G
.
ObjList
[
j
],
G
.
ObjList
[
j
].
r
un
())
except
AttributeError
:
except
AttributeError
:
pass
pass
...
...
DREAM/dream/simulation/src/Machine.py
View file @
86c1267f
...
@@ -86,12 +86,12 @@ class Machine(Process):
...
@@ -86,12 +86,12 @@ class Machine(Process):
#if the failure distribution for the machine is fixed, activate the failure
#if the failure distribution for the machine is fixed, activate the failure
if
(
self
.
failureDistType
==
"Fixed"
or
self
.
failureDistType
==
"Availability"
):
if
(
self
.
failureDistType
==
"Fixed"
or
self
.
failureDistType
==
"Availability"
):
MFailure
=
Failure
(
self
,
self
.
failureDistType
,
self
.
MTTF
,
self
.
MTTR
,
self
.
availability
,
self
.
id
,
self
.
repairman
)
MFailure
=
Failure
(
self
,
self
.
failureDistType
,
self
.
MTTF
,
self
.
MTTR
,
self
.
availability
,
self
.
id
,
self
.
repairman
)
activate
(
MFailure
,
MFailure
.
R
un
())
activate
(
MFailure
,
MFailure
.
r
un
())
self
.
Res
=
Resource
(
self
.
capacity
)
self
.
Res
=
Resource
(
self
.
capacity
)
#the main process of the machine
#the main process of the machine
def
R
un
(
self
):
def
r
un
(
self
):
#execute all through simulation time
#execute all through simulation time
while
1
:
while
1
:
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the machine can accept an entity
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the machine can accept an entity
...
...
DREAM/dream/simulation/src/Queue.py
View file @
86c1267f
...
@@ -59,7 +59,7 @@ class Queue(Process):
...
@@ -59,7 +59,7 @@ class Queue(Process):
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
def
R
un
(
self
):
def
r
un
(
self
):
while
1
:
while
1
:
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Queue can accept an entity
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Queue can accept an entity
#and one predecessor requests it
#and one predecessor requests it
...
...
DREAM/dream/simulation/src/Source.py
View file @
86c1267f
...
@@ -65,7 +65,7 @@ class Source(Process):
...
@@ -65,7 +65,7 @@ class Source(Process):
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
self
.
waitToDispose
=
False
#shows if the machine waits to dispose an entity
def
R
un
(
self
):
def
r
un
(
self
):
i
=
0
i
=
0
if
(
self
.
distType
==
"Fixed"
):
#if the distribution type is fixed
if
(
self
.
distType
==
"Fixed"
):
#if the distribution type is fixed
from
Globals
import
G
from
Globals
import
G
...
...
DREAM/dream/simulation/src/output.xls
View file @
86c1267f
No preview for this file type
DREAM/dream/simulation/src/trace1.xls
View file @
86c1267f
No preview for this file type
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