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
d8abad93
Commit
d8abad93
authored
Aug 21, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exit updated
parent
63d66d46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+2
-0
dream/simulation/Exit.py
dream/simulation/Exit.py
+16
-9
dream/simulation/Machine.py
dream/simulation/Machine.py
+0
-2
No files found.
dream/simulation/CoreObject.py
View file @
d8abad93
...
...
@@ -77,6 +77,8 @@ class CoreObject(object):
def
parseInputs
(
self
,
inputsDict
):
self
.
id
=
inputsDict
.
get
(
'id'
)
self
.
objName
=
inputsDict
.
get
(
'name'
)
from
Globals
import
G
G
.
ObjList
.
append
(
self
)
# add object to ObjList
def
initialize
(
self
):
from
Globals
import
G
...
...
dream/simulation/Exit.py
View file @
d8abad93
...
...
@@ -36,20 +36,27 @@ from CoreObject import CoreObject
class
Exit
(
CoreObject
):
family
=
'Exit'
def
__init__
(
self
,
id
,
name
=
None
):
if
not
name
:
name
=
id
CoreObject
.
__init__
(
self
,
id
,
name
)
self
.
predecessorIndex
=
0
# holds the index of the predecessor from which the Exit will take an entity next
# general properties of the Exit
def
__init__
(
self
,
id
=
''
,
name
=
''
,
inputsDict
=
{}):
self
.
type
=
"Exit"
# XXX needed ?
#lists to hold statistics of multiple runs
self
.
Exits
=
[]
self
.
UnitExits
=
[]
self
.
Lifespan
=
[]
self
.
TaktTime
=
[]
self
.
TaktTime
=
[]
# if input is given in a dictionary
if
inputsDict
:
CoreObject
.
__init__
(
self
,
inputsDict
=
inputsDict
)
else
:
CoreObject
.
__init__
(
self
,
id
,
name
)
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
CoreObject
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
ExitList
.
append
(
self
)
def
initialize
(
self
):
# using the Process __init__ and not the CoreObject __init__
...
...
dream/simulation/Machine.py
View file @
d8abad93
...
...
@@ -227,8 +227,6 @@ class Machine(CoreObject):
G
.
MachineList
.
append
(
self
)
# add machine to global MachineList
if
self
.
operatorPool
!=
"None"
:
G
.
OperatedMachineList
.
append
(
self
)
# add the machine to the operatedMachines List
G
.
ObjList
.
append
(
self
)
# add machine to ObjList
# =======================================================================
# initialize the machine
...
...
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