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
0e2febe1
Commit
0e2febe1
authored
Aug 29, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EventGenerator to be able to get method as input
parent
7e652f69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
dream/simulation/EventGenerator.py
dream/simulation/EventGenerator.py
+3
-2
No files found.
dream/simulation/EventGenerator.py
View file @
0e2febe1
...
...
@@ -32,7 +32,7 @@ from ObjectInterruption import ObjectInterruption
class
EventGenerator
(
ObjectInterruption
):
def
__init__
(
self
,
id
=
id
,
name
=
None
,
start
=
0
,
stop
=
float
(
'inf'
),
interval
=
1
,
duration
=
0
,
method
=
None
,
argumentDict
=
None
,
**
kw
):
duration
=
0
,
method
=
None
,
argumentDict
=
{}
,
**
kw
):
ObjectInterruption
.
__init__
(
self
)
self
.
id
=
id
self
.
name
=
name
...
...
@@ -44,7 +44,8 @@ class EventGenerator(ObjectInterruption):
self
.
argumentDict
=
argumentDict
#the arguments of the method given in a dict
from
Globals
import
G
G
.
EventGeneratorList
.
append
(
self
)
if
method
:
self
.
method
=
method
if
isinstance
(
method
,
basestring
):
import
Globals
self
.
method
=
Globals
.
getMethodFromName
(
method
)
...
...
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