diff --git a/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/calculation/modes/ModeVectorEvaluatorTest.java b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/calculation/modes/ModeVectorEvaluatorTest.java index f1bb2c04..1cc68e0b 100644 --- a/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/calculation/modes/ModeVectorEvaluatorTest.java +++ b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/calculation/modes/ModeVectorEvaluatorTest.java @@ -202,7 +202,7 @@ public void testWithConcept2() { EquipmentPowerParameters equipPowerParams = new EquipmentPowerParameters(conceptCEFX); SystemMode idleMode = new SystemMode(conceptCEFX); - equipPowerParams.getPowerPerUnitOn().setDefaultValue(DEFAULT_VALUE); + equipPowerParams.getPowerUnitOn().setDefaultValue(DEFAULT_VALUE); equipParams.setMarginMaturity(DEFAULT_MARGIN); equipment.add(equipParams); @@ -211,7 +211,7 @@ public void testWithConcept2() { Value idleValue = new Value(conceptCEFX); idleValue.setMode(idleMode); idleValue.setValue(IDLE_VALUE); - equipPowerParams.getPowerPerUnitOn().getModeValues().add(idleValue); + equipPowerParams.getPowerUnitOn().getModeValues().add(idleValue); IEquationSectionContainer container = (IEquationSectionContainer) equipPowerParams.getATypeInstance(); List equations = container.getEquationSection().getEquations(); @@ -219,8 +219,8 @@ public void testWithConcept2() { EquationHelper eqHelper = new EquationHelper(); eqHelper.evaluate(equations, UserRegistry.getInstance()); - assertEquals("Default value correct", EXPECTED_DEFAULT, equipPowerParams.getPowerPerUnitOnWithMargin().getDefaultValue(), TEST_EPSILON); - assertEquals("Idle value correct", EXPECTED_IDLE, equipPowerParams.getPowerPerUnitOnWithMargin().getModeValues().get(0).getValue(), TEST_EPSILON); + assertEquals("Default value correct", EXPECTED_DEFAULT, equipPowerParams.getPowerUnitOnWithMargin().getDefaultValue(), TEST_EPSILON); + assertEquals("Idle value correct", EXPECTED_IDLE, equipPowerParams.getPowerUnitOnWithMargin().getModeValues().get(0).getValue(), TEST_EPSILON); } @Test diff --git a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept index e42a8f68..c5de3695 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -138,17 +138,17 @@ Concept de.dlr.sc.virsat.model.extension.cefx Type powerUnitActive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off."; Type powerDutyCycle of Category Parameter quantityKind "Dimensionless" unit "Percent"; - Type PowerPerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; - Type PowerPerUnitStby of Category Parameter quantityKind "Power" unit "Watt"; - Type PowerPerUnitOnWithMargin of Category Parameter quantityKind "Power" unit "Watt"; - Type PowerPerUnitStbyWithMargin of Category Parameter quantityKind "Power" unit "Watt"; - Type PowerPerUnitAvgWithMargin of Category Parameter quantityKind "Power" unit "Watt"; + Type PowerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; + Type PowerUnitStby of Category Parameter quantityKind "Power" unit "Watt"; + Type PowerUnitOnWithMargin of Category Parameter quantityKind "Power" unit "Watt"; + Type PowerUnitStbyWithMargin of Category Parameter quantityKind "Power" unit "Watt"; + Type PowerUnitAvgWithMargin of Category Parameter quantityKind "Power" unit "Watt"; Type PowerAvgWithMargin of Category Parameter quantityKind "Power" unit "Watt"; - Ref: PowerPerUnitOnWithMargin = PowerPerUnitOn + (PowerPerUnitOn * EquipmentParameters.marginMaturity); - Ref: PowerPerUnitStbyWithMargin = PowerPerUnitStby + (PowerPerUnitStby * EquipmentParameters.marginMaturity); - Ref: PowerPerUnitAvgWithMargin = PowerPerUnitOnWithMargin * powerDutyCycle + PowerPerUnitStbyWithMargin * (1 - powerDutyCycle); - Ref: PowerAvgWithMargin = (PowerPerUnitAvgWithMargin + summary{PowerAvgWithMargin, 1}) * powerUnitActive; + Ref: PowerUnitOnWithMargin = PowerUnitOn + (PowerUnitOn * EquipmentParameters.marginMaturity); + Ref: PowerUnitStbyWithMargin = PowerUnitStby + (PowerUnitStby * EquipmentParameters.marginMaturity); + Ref: PowerUnitAvgWithMargin = PowerUnitOnWithMargin * powerDutyCycle + PowerUnitStbyWithMargin * (1 - powerDutyCycle); + Ref: PowerAvgWithMargin = (PowerUnitAvgWithMargin + summary{PowerAvgWithMargin, 1}) * powerUnitActive; } Category EquipmentTemperatureParameters { diff --git a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi index 5c888361..e4338819 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -232,36 +232,36 @@ - + - + - + - + - + - + - + - + @@ -270,13 +270,13 @@ - + - + @@ -286,11 +286,11 @@ - - - - - + + + + + diff --git a/de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi b/de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi index dd7e410f..caed67eb 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi @@ -232,36 +232,36 @@ - + - + - + - + - + - + - + - + @@ -270,13 +270,13 @@ - + - + @@ -286,11 +286,11 @@ - - - - - + + + + + diff --git a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentPowerParameters.java b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentPowerParameters.java index f78b8d8a..716f9d10 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentPowerParameters.java +++ b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentPowerParameters.java @@ -56,11 +56,11 @@ public String getFullQualifiedCategoryName() { // property name constants public static final String PROPERTY_POWERUNITACTIVE = "powerUnitActive"; public static final String PROPERTY_POWERDUTYCYCLE = "powerDutyCycle"; - public static final String PROPERTY_POWERPERUNITON = "PowerPerUnitOn"; - public static final String PROPERTY_POWERPERUNITSTBY = "PowerPerUnitStby"; - public static final String PROPERTY_POWERPERUNITONWITHMARGIN = "PowerPerUnitOnWithMargin"; - public static final String PROPERTY_POWERPERUNITSTBYWITHMARGIN = "PowerPerUnitStbyWithMargin"; - public static final String PROPERTY_POWERPERUNITAVGWITHMARGIN = "PowerPerUnitAvgWithMargin"; + public static final String PROPERTY_POWERUNITON = "PowerUnitOn"; + public static final String PROPERTY_POWERUNITSTBY = "PowerUnitStby"; + public static final String PROPERTY_POWERUNITONWITHMARGIN = "PowerUnitOnWithMargin"; + public static final String PROPERTY_POWERUNITSTBYWITHMARGIN = "PowerUnitStbyWithMargin"; + public static final String PROPERTY_POWERUNITAVGWITHMARGIN = "PowerUnitAvgWithMargin"; public static final String PROPERTY_POWERAVGWITHMARGIN = "PowerAvgWithMargin"; @@ -130,118 +130,118 @@ public BeanPropertyComposed getPowerDutyCycleBean() { } // ***************************************************************** - // * Attribute: PowerPerUnitOn + // * Attribute: PowerUnitOn // ***************************************************************** - private BeanPropertyComposed PowerPerUnitOn = new BeanPropertyComposed<>(); + private BeanPropertyComposed PowerUnitOn = new BeanPropertyComposed<>(); - private void safeAccessPowerPerUnitOn() { - if (PowerPerUnitOn.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerPerUnitOn"); - PowerPerUnitOn.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitOn() { + if (PowerUnitOn.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerUnitOn"); + PowerUnitOn.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerPerUnitOn() { - safeAccessPowerPerUnitOn(); - return PowerPerUnitOn.getValue(); + public Parameter getPowerUnitOn() { + safeAccessPowerUnitOn(); + return PowerUnitOn.getValue(); } - public BeanPropertyComposed getPowerPerUnitOnBean() { - safeAccessPowerPerUnitOn(); - return PowerPerUnitOn; + public BeanPropertyComposed getPowerUnitOnBean() { + safeAccessPowerUnitOn(); + return PowerUnitOn; } // ***************************************************************** - // * Attribute: PowerPerUnitStby + // * Attribute: PowerUnitStby // ***************************************************************** - private BeanPropertyComposed PowerPerUnitStby = new BeanPropertyComposed<>(); + private BeanPropertyComposed PowerUnitStby = new BeanPropertyComposed<>(); - private void safeAccessPowerPerUnitStby() { - if (PowerPerUnitStby.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerPerUnitStby"); - PowerPerUnitStby.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitStby() { + if (PowerUnitStby.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerUnitStby"); + PowerUnitStby.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerPerUnitStby() { - safeAccessPowerPerUnitStby(); - return PowerPerUnitStby.getValue(); + public Parameter getPowerUnitStby() { + safeAccessPowerUnitStby(); + return PowerUnitStby.getValue(); } - public BeanPropertyComposed getPowerPerUnitStbyBean() { - safeAccessPowerPerUnitStby(); - return PowerPerUnitStby; + public BeanPropertyComposed getPowerUnitStbyBean() { + safeAccessPowerUnitStby(); + return PowerUnitStby; } // ***************************************************************** - // * Attribute: PowerPerUnitOnWithMargin + // * Attribute: PowerUnitOnWithMargin // ***************************************************************** - private BeanPropertyComposed PowerPerUnitOnWithMargin = new BeanPropertyComposed<>(); + private BeanPropertyComposed PowerUnitOnWithMargin = new BeanPropertyComposed<>(); - private void safeAccessPowerPerUnitOnWithMargin() { - if (PowerPerUnitOnWithMargin.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerPerUnitOnWithMargin"); - PowerPerUnitOnWithMargin.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitOnWithMargin() { + if (PowerUnitOnWithMargin.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerUnitOnWithMargin"); + PowerUnitOnWithMargin.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerPerUnitOnWithMargin() { - safeAccessPowerPerUnitOnWithMargin(); - return PowerPerUnitOnWithMargin.getValue(); + public Parameter getPowerUnitOnWithMargin() { + safeAccessPowerUnitOnWithMargin(); + return PowerUnitOnWithMargin.getValue(); } - public BeanPropertyComposed getPowerPerUnitOnWithMarginBean() { - safeAccessPowerPerUnitOnWithMargin(); - return PowerPerUnitOnWithMargin; + public BeanPropertyComposed getPowerUnitOnWithMarginBean() { + safeAccessPowerUnitOnWithMargin(); + return PowerUnitOnWithMargin; } // ***************************************************************** - // * Attribute: PowerPerUnitStbyWithMargin + // * Attribute: PowerUnitStbyWithMargin // ***************************************************************** - private BeanPropertyComposed PowerPerUnitStbyWithMargin = new BeanPropertyComposed<>(); + private BeanPropertyComposed PowerUnitStbyWithMargin = new BeanPropertyComposed<>(); - private void safeAccessPowerPerUnitStbyWithMargin() { - if (PowerPerUnitStbyWithMargin.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerPerUnitStbyWithMargin"); - PowerPerUnitStbyWithMargin.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitStbyWithMargin() { + if (PowerUnitStbyWithMargin.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerUnitStbyWithMargin"); + PowerUnitStbyWithMargin.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerPerUnitStbyWithMargin() { - safeAccessPowerPerUnitStbyWithMargin(); - return PowerPerUnitStbyWithMargin.getValue(); + public Parameter getPowerUnitStbyWithMargin() { + safeAccessPowerUnitStbyWithMargin(); + return PowerUnitStbyWithMargin.getValue(); } - public BeanPropertyComposed getPowerPerUnitStbyWithMarginBean() { - safeAccessPowerPerUnitStbyWithMargin(); - return PowerPerUnitStbyWithMargin; + public BeanPropertyComposed getPowerUnitStbyWithMarginBean() { + safeAccessPowerUnitStbyWithMargin(); + return PowerUnitStbyWithMargin; } // ***************************************************************** - // * Attribute: PowerPerUnitAvgWithMargin + // * Attribute: PowerUnitAvgWithMargin // ***************************************************************** - private BeanPropertyComposed PowerPerUnitAvgWithMargin = new BeanPropertyComposed<>(); + private BeanPropertyComposed PowerUnitAvgWithMargin = new BeanPropertyComposed<>(); - private void safeAccessPowerPerUnitAvgWithMargin() { - if (PowerPerUnitAvgWithMargin.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerPerUnitAvgWithMargin"); - PowerPerUnitAvgWithMargin.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitAvgWithMargin() { + if (PowerUnitAvgWithMargin.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("PowerUnitAvgWithMargin"); + PowerUnitAvgWithMargin.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerPerUnitAvgWithMargin() { - safeAccessPowerPerUnitAvgWithMargin(); - return PowerPerUnitAvgWithMargin.getValue(); + public Parameter getPowerUnitAvgWithMargin() { + safeAccessPowerUnitAvgWithMargin(); + return PowerUnitAvgWithMargin.getValue(); } - public BeanPropertyComposed getPowerPerUnitAvgWithMarginBean() { - safeAccessPowerPerUnitAvgWithMargin(); - return PowerPerUnitAvgWithMargin; + public BeanPropertyComposed getPowerUnitAvgWithMarginBean() { + safeAccessPowerUnitAvgWithMargin(); + return PowerUnitAvgWithMargin; } // *****************************************************************