Skip to content
Snippets Groups Projects
Commit 4a5104a7 authored by Stefano Borini's avatar Stefano Borini
Browse files

Fixed tests

parent cfb4cfd4
No related branches found
No related tags found
1 merge request!69Introduce slots and resolution of named variables
......@@ -9,8 +9,8 @@ class DummyDakotaCommunicator(BaseMCOCommunicator):
def receive_from_mco(self, model):
data = sys.stdin.read()
values = list(map(float, data.split()))
value_names = [p.value_name for p in model.parameters]
value_types = [p.value_type for p in model.parameters]
value_names = [p.name for p in model.parameters]
value_types = [p.type for p in model.parameters]
return [
DataValue(type=type_, name=name, value=value)
......
......@@ -22,6 +22,8 @@ class KPIAdderCalculator(BaseKPICalculator):
return (
(
Slot(type=model.cuba_type_in),
Slot(type=model.cuba_type_in),
Slot(type=model.cuba_type_in),
),
(
Slot(type=model.cuba_type_out),
......
......@@ -14,10 +14,10 @@ class BaseMCOParameter(HasStrictTraits):
factory = Instance(BaseMCOParameterFactory, visible=False, transient=True)
#: A user defined name for the parameter
value_name = String()
name = String()
#: A CUBA key describing the type of the parameter
value_type = String()
type = String()
def __init__(self, factory, *args, **kwargs):
self.factory = factory
......
......@@ -10,7 +10,9 @@
"model_data": {
"initial_value": 3,
"lower_bound": 0,
"upper_bound": 10
"upper_bound": 10,
"name": "p0",
"type": "PRESSURE"
}
}
]
......@@ -53,6 +55,9 @@
"cuba_type_in": "PRESSURE",
"cuba_type_out": "TOTAL_PRESSURE",
"input_slot_maps": [
{
"name": "p0"
},
{
"name": "p1"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment