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

fix: use deepcopy otherwise we are editing the same dict

parent 519ef4fc
from copy import copy import copy
import json import json
import time import time
import random import random
...@@ -16,7 +16,7 @@ class Simulation(ShiftsSimulation): ...@@ -16,7 +16,7 @@ class Simulation(ShiftsSimulation):
"short_id": "C", "short_id": "C",
"property_list": conf['Dream-Queue']['property_list']} "property_list": conf['Dream-Queue']['property_list']}
batch_source_entity = copy(schema["entity"]) batch_source_entity = copy.deepcopy(schema["entity"])
batch_source_entity['_default'] = "Dream.Batch" batch_source_entity['_default'] = "Dream.Batch"
conf['Dream-BatchSource'] = { conf['Dream-BatchSource'] = {
"_class": "Dream.BatchSource", "_class": "Dream.BatchSource",
...@@ -27,7 +27,7 @@ class Simulation(ShiftsSimulation): ...@@ -27,7 +27,7 @@ class Simulation(ShiftsSimulation):
schema['batchNumberOfUnits']] schema['batchNumberOfUnits']]
} }
zeroProcessingTime = copy(schema['processingTime']) zeroProcessingTime = copy.deepcopy(schema['processingTime'])
for prop in zeroProcessingTime['property_list']: for prop in zeroProcessingTime['property_list']:
if prop['id'] == 'mean': if prop['id'] == 'mean':
prop['_default']= 0.0 prop['_default']= 0.0
......
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