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
cc103b13
Commit
cc103b13
authored
Mar 12, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update default values with Georges feedback
parent
ade1a272
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
dream/simulation/GUI/Default.py
dream/simulation/GUI/Default.py
+12
-4
No files found.
dream/simulation/GUI/Default.py
View file @
cc103b13
...
...
@@ -2,6 +2,7 @@ import json
import
datetime
from
dream.simulation.LineGenerationJSON
import
main
as
simulate_line_json
from
dream.simulation.Queue
import
Queue
from
copy
import
deepcopy
# describe type for properties
schema
=
{
...
...
@@ -19,7 +20,7 @@ schema = {
"name"
:
"Mean"
,
"description"
:
"Mean value of fixed processing time."
,
"_class"
:
"Dream.Property"
,
"_default"
:
0.9
"_default"
:
1
,
},
"distributionType"
:
{
"id"
:
"distributionType"
,
...
...
@@ -37,7 +38,7 @@ schema = {
"type"
:
"number"
,
"name"
:
"Standard deviation"
,
"_class"
:
"Dream.Property"
,
"_default"
:
0.
1
"_default"
:
0.
5
},
"min"
:
{
"id"
:
"min"
,
...
...
@@ -76,6 +77,7 @@ schema = {
},
"repairman"
:
{
"id"
:
"repairman"
,
"name"
:
"Repairman"
,
"type"
:
"string"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"None"
...
...
@@ -132,7 +134,7 @@ schema = {
"name"
:
"Confidence level"
,
"description"
:
"Confidence level for statiscal analysis of stochastic experiments"
,
"_class"
:
"Dream.Property"
,
"_default"
:
0.5
"_default"
:
0.
9
5
},
"processTimeout"
:
{
"id"
:
"processTimeout"
,
...
...
@@ -232,12 +234,18 @@ schema = {
},
}
# helper function to overload a property
def
overloaded_property
(
prop
,
overload
):
prop
=
deepcopy
(
prop
)
prop
.
update
(
overload
)
return
prop
# complex schemas (Dream.PropertyList)
schema
[
"processingTime"
]
=
{
"id"
:
"processingTime"
,
"property_list"
:
[
schema
[
"distributionType"
],
schema
[
"mean"
]
,
overloaded_property
(
schema
[
"mean"
],
{
"_default"
:
0.75
})
,
schema
[
"stdev"
],
schema
[
"min"
],
schema
[
"max"
]
...
...
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