Commit cc103b13 authored by Jérome Perrin's avatar Jérome Perrin

Update default values with Georges feedback

parent ade1a272
...@@ -2,6 +2,7 @@ import json ...@@ -2,6 +2,7 @@ import json
import datetime import datetime
from dream.simulation.LineGenerationJSON import main as simulate_line_json from dream.simulation.LineGenerationJSON import main as simulate_line_json
from dream.simulation.Queue import Queue from dream.simulation.Queue import Queue
from copy import deepcopy
# describe type for properties # describe type for properties
schema = { schema = {
...@@ -19,7 +20,7 @@ schema = { ...@@ -19,7 +20,7 @@ schema = {
"name": "Mean", "name": "Mean",
"description": "Mean value of fixed processing time.", "description": "Mean value of fixed processing time.",
"_class": "Dream.Property", "_class": "Dream.Property",
"_default": 0.9 "_default": 1,
}, },
"distributionType": { "distributionType": {
"id": "distributionType", "id": "distributionType",
...@@ -37,7 +38,7 @@ schema = { ...@@ -37,7 +38,7 @@ schema = {
"type": "number", "type": "number",
"name": "Standard deviation", "name": "Standard deviation",
"_class": "Dream.Property", "_class": "Dream.Property",
"_default": 0.1 "_default": 0.5
}, },
"min": { "min": {
"id": "min", "id": "min",
...@@ -76,6 +77,7 @@ schema = { ...@@ -76,6 +77,7 @@ schema = {
}, },
"repairman": { "repairman": {
"id": "repairman", "id": "repairman",
"name": "Repairman",
"type": "string", "type": "string",
"_class": "Dream.Property", "_class": "Dream.Property",
"_default": "None" "_default": "None"
...@@ -132,7 +134,7 @@ schema = { ...@@ -132,7 +134,7 @@ schema = {
"name": "Confidence level", "name": "Confidence level",
"description": "Confidence level for statiscal analysis of stochastic experiments", "description": "Confidence level for statiscal analysis of stochastic experiments",
"_class": "Dream.Property", "_class": "Dream.Property",
"_default": 0.5 "_default": 0.95
}, },
"processTimeout": { "processTimeout": {
"id": "processTimeout", "id": "processTimeout",
...@@ -232,12 +234,18 @@ schema = { ...@@ -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) # complex schemas (Dream.PropertyList)
schema["processingTime"] = { schema["processingTime"] = {
"id": "processingTime", "id": "processingTime",
"property_list": [ "property_list": [
schema["distributionType"], schema["distributionType"],
schema["mean"], overloaded_property(schema["mean"], {"_default": 0.75}),
schema["stdev"], schema["stdev"],
schema["min"], schema["min"],
schema["max"] schema["max"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment