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
5a2f1cd0
Commit
5a2f1cd0
authored
Aug 07, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Sep 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class_name removed from Exit also and Job updated
parent
6e665e46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
dream/simulation/Exit.py
dream/simulation/Exit.py
+3
-2
dream/simulation/Job.py
dream/simulation/Job.py
+5
-5
dream/simulation/Machine.py
dream/simulation/Machine.py
+2
-0
dream/simulation/Queue.py
dream/simulation/Queue.py
+2
-0
No files found.
dream/simulation/Exit.py
View file @
5a2f1cd0
...
...
@@ -34,7 +34,8 @@ from CoreObject import CoreObject
# The exit object
# ===========================================================================
class
Exit
(
CoreObject
):
class_name
=
'Dream.Exit'
family
=
'Exit'
def
__init__
(
self
,
id
,
name
=
None
):
if
not
name
:
name
=
id
...
...
@@ -215,7 +216,7 @@ class Exit(CoreObject):
def
outputResultsJSON
(
self
):
from
Globals
import
G
from
Globals
import
getConfidenceIntervals
json
=
{
'_class'
:
self
.
class_name
,
json
=
{
'_class'
:
'Dream.%s'
%
self
.
__class__
.
__name__
,
'id'
:
self
.
id
,
'results'
:
{}
}
if
(
G
.
numberOfReplications
==
1
):
...
...
dream/simulation/Job.py
View file @
5a2f1cd0
...
...
@@ -33,7 +33,8 @@ from Entity import Entity
# The job object
# =======================================================================
class
Job
(
Entity
):
# inherits from the Entity class
type
=
"Job"
type
=
'Job'
family
=
'Job'
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
extraPropertyDict
=
None
,
isCritical
=
False
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
isCritical
=
isCritical
)
...
...
@@ -56,10 +57,9 @@ class Job(Entity): # inherits from the Entity c
def
outputResultsJSON
(
self
):
from
Globals
import
G
if
(
G
.
numberOfReplications
==
1
):
#if we had just one replication output the results to excel
json
=
{}
# dictionary holding information related to the specific entity
json
[
'_class'
]
=
'Dream.Job'
json
[
'id'
]
=
str
(
self
.
id
)
json
[
'results'
]
=
{}
json
=
{
'_class'
:
'Dream.%s'
%
self
.
__class__
.
__name__
,
'id'
:
self
.
id
,
'results'
:
{}
}
#json['extraPropertyDict'] = self.extraPropertyDict
#if the Job has reached an exit, input completion time in the results
...
...
dream/simulation/Machine.py
View file @
5a2f1cd0
...
...
@@ -43,6 +43,8 @@ from RandomNumberGenerator import RandomNumberGenerator
# the Machine object
# ===========================================================================
class
Machine
(
CoreObject
):
family
=
'Server'
# =======================================================================
# initialise the id the capacity, of the resource and the distribution
# =======================================================================
...
...
dream/simulation/Queue.py
View file @
5a2f1cd0
...
...
@@ -32,6 +32,8 @@ from CoreObject import CoreObject
# the Queue object
# ===========================================================================
class
Queue
(
CoreObject
):
family
=
'Buffer'
#===========================================================================
# the __init__ method of the Queue
#===========================================================================
...
...
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