From 5a268c48ded7a6a99ffab61013e825557352b214 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Mon, 14 Aug 2023 15:38:06 +0200 Subject: [PATCH 01/10] Update links to HTTPS --- de.dlr.sc.virsat.cef.target/virsat_cef_development.target | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/de.dlr.sc.virsat.cef.target/virsat_cef_development.target b/de.dlr.sc.virsat.cef.target/virsat_cef_development.target index bc95d0af..06b910f2 100644 --- a/de.dlr.sc.virsat.cef.target/virsat_cef_development.target +++ b/de.dlr.sc.virsat.cef.target/virsat_cef_development.target @@ -73,7 +73,7 @@ - + @@ -87,14 +87,14 @@ - + - + From f2e2d676f7970abaa2bd48d5f90af0c67f9d4338 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Mon, 14 Aug 2023 15:38:39 +0200 Subject: [PATCH 02/10] Task #169 change "massPerUnit" to "mass" --- .../cefx/migrator/AMigrator1v1Test.java | 49 +++ .../extension/cefx/test/AllTestsGen.java | 2 + .../modes/ModeVectorEvaluatorTest.java | 4 +- .../cefx/migrator/Migrator1v1Test.java | 50 +++ .../concept/concept.concept | 8 +- .../concept/concept.xmi | 10 +- .../concept/concept_v1_1.xmi | 323 ++++++++++++++++++ .../plugin.xml | 10 +- .../model/extension/cefx/PluginXml.java | 10 +- .../extension/cefx/migrator/AMigrator1v1.java | 29 ++ .../cefx/model/AEquipmentMassParameters.java | 26 +- .../extension/cefx/migrator/Migrator1v1.java | 35 ++ 12 files changed, 529 insertions(+), 27 deletions(-) create mode 100644 de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1Test.java create mode 100644 de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java create mode 100644 de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi create mode 100644 de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1.java create mode 100644 de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java diff --git a/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1Test.java b/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1Test.java new file mode 100644 index 00000000..0ff2cb86 --- /dev/null +++ b/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1Test.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2008-2019 German Aerospace Center (DLR), Simulation and Software Technology, Germany. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package de.dlr.sc.virsat.model.extension.cefx.migrator; + +// ***************************************************************** +// * Import Statements +// ***************************************************************** + + +import de.dlr.sc.virsat.model.dvlm.concepts.Concept; +import org.eclipse.emf.ecore.util.EcoreUtil; + + +// ***************************************************************** +// * Class Declaration +// ***************************************************************** + +import org.junit.Before; + +/** + * Auto Generated Abstract Generator Gap Class + * + * Don't Manually modify this class + * + * VirSat DLR CEF Concept for extended Product Structures + * + */ +public abstract class AMigrator1v1Test { + protected Concept conceptMigrateTo; + protected Concept conceptMigrateFromRepository; + protected Concept conceptMigrateFrom; + + @Before + public void setUp() throws Exception { + String conceptXmiPluginPathMigrateTo = "de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi"; + String conceptXmiPluginPathMigrateFrom = "de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_0.xmi"; + + conceptMigrateTo = de.dlr.sc.virsat.concept.unittest.util.ConceptXmiLoader.loadConceptFromPlugin(conceptXmiPluginPathMigrateTo); + conceptMigrateFromRepository = de.dlr.sc.virsat.concept.unittest.util.ConceptXmiLoader.loadConceptFromPlugin(conceptXmiPluginPathMigrateFrom); + conceptMigrateFrom = EcoreUtil.copy(conceptMigrateFromRepository); + } +} diff --git a/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/test/AllTestsGen.java b/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/test/AllTestsGen.java index 172e5193..9c142c07 100644 --- a/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/test/AllTestsGen.java +++ b/de.dlr.sc.virsat.model.extension.cefx.test/src-gen/de/dlr/sc/virsat/model/extension/cefx/test/AllTestsGen.java @@ -26,6 +26,7 @@ import de.dlr.sc.virsat.model.extension.cefx.model.ParameterTest; import de.dlr.sc.virsat.model.extension.cefx.model.SystemParametersTest; import de.dlr.sc.virsat.model.extension.cefx.model.EquipmentPowerParametersTest; +import de.dlr.sc.virsat.model.extension.cefx.migrator.Migrator1v1Test; import de.dlr.sc.virsat.model.extension.cefx.validator.CefxValidatorTest; import de.dlr.sc.virsat.model.extension.cefx.model.ExcelCalculationTest; import de.dlr.sc.virsat.model.extension.cefx.model.SubSystemPowerParametersTest; @@ -57,6 +58,7 @@ ParameterRangeTest.class, ExcelCalculationTest.class, Migrator1v0Test.class, + Migrator1v1Test.class, CefxValidatorTest.class, }) 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 c8b3a778..f1bb2c04 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 @@ -173,13 +173,13 @@ public void testWithConcept1() { equipment.add(equipParams); equipment.add(equipMassParams); - equipMassParams.getMassPerUnit().setDefaultValue(DEFAULT_VALUE); + equipMassParams.getMass().setDefaultValue(DEFAULT_VALUE); equipParams.setMarginMaturity(DEFAULT_MARGIN); Value idleValue = new Value(conceptCEFX); idleValue.setMode(idleMode); idleValue.setValue(IDLE_VALUE); - equipMassParams.getMassPerUnit().getModeValues().add(idleValue); + equipMassParams.getMass().getModeValues().add(idleValue); IEquationSectionContainer container = (IEquationSectionContainer) equipMassParams.getATypeInstance(); List equations = container.getEquationSection().getEquations(); diff --git a/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java new file mode 100644 index 00000000..5ffbeb0b --- /dev/null +++ b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2008-2019 German Aerospace Center (DLR), Simulation and Software Technology, Germany. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package de.dlr.sc.virsat.model.extension.cefx.migrator; + +// ***************************************************************** +// * Import Statements +// ***************************************************************** + + +import de.dlr.sc.virsat.model.dvlm.DVLMFactory; +import de.dlr.sc.virsat.model.dvlm.Repository; + +// ***************************************************************** +// * Class Declaration +// ***************************************************************** + +import org.junit.Test; + +/** + * Auto Generated Class inheriting from Generator Gap Class + * + * This class is generated once, do your changes here + * + * VirSat DLR CEF Concept for extended Product Structures + * + */ +public class Migrator1v1Test extends AMigrator1v1Test { + + @Test + public void testMigrator1v1() { + Migrator1v1 testMigrator1v1 = new Migrator1v1(); + + Repository repository = DVLMFactory.eINSTANCE.createRepository(); + repository.getActiveConcepts().add(conceptMigrateFromRepository); + + //TODO: Setup test instances + + testMigrator1v1.migrate(conceptMigrateFrom, conceptMigrateFromRepository, conceptMigrateTo); + + //TODO: Check for correct migration + } + +} 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 36377b27..4ef8cdb7 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -9,7 +9,7 @@ *******************************************************************************/ Concept de.dlr.sc.virsat.model.extension.cefx displayname "CEF-Extended" - version 1.0 + version 1.1 description "VirSat DLR CEF Concept for extended Product Structures" beta { @@ -123,12 +123,12 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - Type massPerUnit of Category Parameter quantityKind "Mass" unit "Kilogram"; + Type mass of Category Parameter quantityKind "Mass" unit "Kilogram"; Type massTotal of Category Parameter quantityKind "Mass" unit "Kilogram"; Type massTotalWithMargin of Category Parameter quantityKind "Mass" unit "Kilogram"; - Ref: massTotal = massPerUnit + summary{massTotal, 1}; - Ref: massTotalWithMargin = massPerUnit + (massPerUnit * EquipmentParameters.marginMaturity) + summary{massTotalWithMargin, 1}; + Ref: massTotal = mass + summary{massTotal, 1}; + Ref: massTotalWithMargin = mass + (mass * EquipmentParameters.marginMaturity) + summary{massTotalWithMargin, 1}; } Category EquipmentPowerParameters { 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 e403d51d..aca039d2 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -1,5 +1,5 @@ - + @@ -200,7 +200,7 @@ - + @@ -208,10 +208,10 @@ - + - + @@ -220,7 +220,7 @@ - + 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 new file mode 100644 index 00000000..1825e09b --- /dev/null +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de.dlr.sc.virsat.model.extension.cefx/plugin.xml b/de.dlr.sc.virsat.model.extension.cefx/plugin.xml index 9b701985..18dc71bc 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/plugin.xml +++ b/de.dlr.sc.virsat.model.extension.cefx/plugin.xml @@ -4,7 +4,7 @@ @@ -82,6 +82,14 @@ class="de.dlr.sc.virsat.model.extension.cefx.migrator.Migrator1v0" xmi="concept/concept_v1_0.xmi"> + + + + diff --git a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/PluginXml.java b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/PluginXml.java index 0ca473d1..c533c3cd 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/PluginXml.java +++ b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/PluginXml.java @@ -25,11 +25,17 @@ public static class Extensioncefx1_0 { public static final String VERSION = "1.0"; public static final String XMI = "concept/concept_v1_0.xmi"; } + public static class Extensioncefx1_1 { + public static final String CLASSNAME = "de.dlr.sc.virsat.model.extension.cefx.migrator.Migrator1v1"; + public static final String ID = "de.dlr.sc.virsat.model.extension.cefx"; + public static final String VERSION = "1.1"; + public static final String XMI = "concept/concept_v1_1.xmi"; + } } public static class Concept { - public static class Extensioncefx1_0 { + public static class Extensioncefx1_1 { public static final String ID = "de.dlr.sc.virsat.model.extension.cefx"; - public static final String VERSION = "1.0"; + public static final String VERSION = "1.1"; public static final String XMI = "concept/concept.xmi"; } } diff --git a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1.java b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1.java new file mode 100644 index 00000000..8563821d --- /dev/null +++ b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/migrator/AMigrator1v1.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2008-2019 German Aerospace Center (DLR), Simulation and Software Technology, Germany. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package de.dlr.sc.virsat.model.extension.cefx.migrator; + +import de.dlr.sc.virsat.model.concept.migrator.AMigrator; + + +// ***************************************************************** +// * Class Declaration +// ***************************************************************** + +/** + * Auto Generated Abstract Generator Gap Class + * + * Don't Manually modify this class + * + * VirSat DLR CEF Concept for extended Product Structures + * + */ +public abstract class AMigrator1v1 extends AMigrator { + +} diff --git a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentMassParameters.java b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentMassParameters.java index 2255f512..cad6cf83 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentMassParameters.java +++ b/de.dlr.sc.virsat.model.extension.cefx/src-gen/de/dlr/sc/virsat/model/extension/cefx/model/AEquipmentMassParameters.java @@ -54,7 +54,7 @@ public String getFullQualifiedCategoryName() { } // property name constants - public static final String PROPERTY_MASSPERUNIT = "massPerUnit"; + public static final String PROPERTY_MASS = "mass"; public static final String PROPERTY_MASSTOTAL = "massTotal"; public static final String PROPERTY_MASSTOTALWITHMARGIN = "massTotalWithMargin"; @@ -79,26 +79,26 @@ public AEquipmentMassParameters(CategoryAssignment categoryAssignement) { // ***************************************************************** - // * Attribute: massPerUnit + // * Attribute: mass // ***************************************************************** - private BeanPropertyComposed massPerUnit = new BeanPropertyComposed<>(); + private BeanPropertyComposed mass = new BeanPropertyComposed<>(); - private void safeAccessMassPerUnit() { - if (massPerUnit.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("massPerUnit"); - massPerUnit.setTypeInstance(propertyInstance); + private void safeAccessMass() { + if (mass.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("mass"); + mass.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getMassPerUnit() { - safeAccessMassPerUnit(); - return massPerUnit.getValue(); + public Parameter getMass() { + safeAccessMass(); + return mass.getValue(); } - public BeanPropertyComposed getMassPerUnitBean() { - safeAccessMassPerUnit(); - return massPerUnit; + public BeanPropertyComposed getMassBean() { + safeAccessMass(); + return mass; } // ***************************************************************** diff --git a/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java b/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java new file mode 100644 index 00000000..171f1cd8 --- /dev/null +++ b/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2008-2019 German Aerospace Center (DLR), Simulation and Software Technology, Germany. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package de.dlr.sc.virsat.model.extension.cefx.migrator; + +import de.dlr.sc.virsat.model.dvlm.concepts.Concept; +import de.dlr.sc.virsat.model.concept.migrator.IMigrator; + + +// ***************************************************************** +// * Class Declaration +// ***************************************************************** + +/** + * Auto Generated Class inheriting from Generator Gap Class + * + * This class is generated once, do your changes here + * + * VirSat DLR CEF Concept for extended Product Structures + * + */ +public class Migrator1v1 extends AMigrator1v1 implements IMigrator { + + @Override + public void migrate(Concept concept, IMigrator previousMigrator) { + //TODO: Implement custom concept migration for version 1.1 + super.migrate(concept, previousMigrator); + } +} From a7575aef1dc6d23743c8bafbcc32fd88e9c2db9f Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Mon, 14 Aug 2023 19:04:25 +0200 Subject: [PATCH 03/10] Task #169 Add description for mass --- de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept | 4 ++-- de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi | 4 ++-- .../concept/concept_v1_1.xmi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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 4ef8cdb7..e42a8f68 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -123,8 +123,8 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - Type mass of Category Parameter quantityKind "Mass" unit "Kilogram"; - Type massTotal of Category Parameter quantityKind "Mass" unit "Kilogram"; + Type mass of Category Parameter quantityKind "Mass" unit "Kilogram" description "Mass of the unit."; + Type massTotal of Category Parameter quantityKind "Mass" unit "Kilogram" description "Mass of the unit including the mass of the child elements."; Type massTotalWithMargin of Category Parameter quantityKind "Mass" unit "Kilogram"; Ref: massTotal = mass + summary{massTotal, 1}; 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 aca039d2..5c888361 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -220,8 +220,8 @@ - - + + 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 1825e09b..dd7e410f 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 @@ -220,8 +220,8 @@ - - + + From 8f0b3e04abcd256cad9295d4746119096a0cb634 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Mon, 14 Aug 2023 19:04:56 +0200 Subject: [PATCH 04/10] Update mailmap with dlr username --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 2ee90437..15e18dc0 100644 --- a/.mailmap +++ b/.mailmap @@ -16,5 +16,6 @@ PhilMFischer Philipp M. Fischer Tjorve Kujath dellerDLR Eller, Dennis +dellerDLR elle_de pchrszon-dlr Chrszon, Philipp From 1b95f4b568e5a949b03ad0ae6a3137e0bd8d6388 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Mon, 14 Aug 2023 19:19:52 +0200 Subject: [PATCH 05/10] Task #169 Remove ToDos --- .../model/extension/cefx/migrator/Migrator1v1Test.java | 6 +----- .../virsat/model/extension/cefx/migrator/Migrator1v1.java | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java index 5ffbeb0b..8b9459c2 100644 --- a/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java +++ b/de.dlr.sc.virsat.model.extension.cefx.test/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1Test.java @@ -39,12 +39,8 @@ public void testMigrator1v1() { Repository repository = DVLMFactory.eINSTANCE.createRepository(); repository.getActiveConcepts().add(conceptMigrateFromRepository); - - //TODO: Setup test instances - + testMigrator1v1.migrate(conceptMigrateFrom, conceptMigrateFromRepository, conceptMigrateTo); - - //TODO: Check for correct migration } } diff --git a/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java b/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java index 171f1cd8..de0b1979 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java +++ b/de.dlr.sc.virsat.model.extension.cefx/src/de/dlr/sc/virsat/model/extension/cefx/migrator/Migrator1v1.java @@ -29,7 +29,6 @@ public class Migrator1v1 extends AMigrator1v1 implements IMigrator { @Override public void migrate(Concept concept, IMigrator previousMigrator) { - //TODO: Implement custom concept migration for version 1.1 super.migrate(concept, previousMigrator); } } From e0e3492f039d7dd8e9b86f09d5e13c668524b33b Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Tue, 15 Aug 2023 09:57:59 +0200 Subject: [PATCH 06/10] Task #169 Improve naming of EquipmentPowerParameters --- .../modes/ModeVectorEvaluatorTest.java | 8 +- .../concept/concept.concept | 18 +-- .../concept/concept.xmi | 30 ++-- .../concept/concept_v1_1.xmi | 30 ++-- .../cefx/model/AEquipmentPowerParameters.java | 130 +++++++++--------- 5 files changed, 108 insertions(+), 108 deletions(-) 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; } // ***************************************************************** From af0463322f947dec63f0158cfc4c6751021f3762 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Tue, 15 Aug 2023 14:01:37 +0200 Subject: [PATCH 07/10] Task #169 Change PowerUnitActive to PowerUnitIsActive --- .../concept/concept.concept | 4 +-- .../concept/concept.xmi | 4 +-- .../concept/concept_v1_1.xmi | 4 +-- .../cefx/model/AEquipmentPowerParameters.java | 26 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) 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 c5de3695..dbb3f362 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -135,7 +135,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - 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 powerUnitIsActive 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 PowerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; @@ -148,7 +148,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx 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; + Ref: PowerAvgWithMargin = (PowerUnitAvgWithMargin + summary{PowerAvgWithMargin, 1}) * powerUnitIsActive; } 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 e4338819..559fb1b8 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -280,11 +280,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 caed67eb..1901e348 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 @@ -280,11 +280,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 716f9d10..9a9fcc79 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 @@ -54,7 +54,7 @@ public String getFullQualifiedCategoryName() { } // property name constants - public static final String PROPERTY_POWERUNITACTIVE = "powerUnitActive"; + public static final String PROPERTY_POWERUNITISACTIVE = "powerUnitIsActive"; public static final String PROPERTY_POWERDUTYCYCLE = "powerDutyCycle"; public static final String PROPERTY_POWERUNITON = "PowerUnitOn"; public static final String PROPERTY_POWERUNITSTBY = "PowerUnitStby"; @@ -84,26 +84,26 @@ public AEquipmentPowerParameters(CategoryAssignment categoryAssignement) { // ***************************************************************** - // * Attribute: powerUnitActive + // * Attribute: powerUnitIsActive // ***************************************************************** - private BeanPropertyComposed powerUnitActive = new BeanPropertyComposed<>(); + private BeanPropertyComposed powerUnitIsActive = new BeanPropertyComposed<>(); - private void safeAccessPowerUnitActive() { - if (powerUnitActive.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("powerUnitActive"); - powerUnitActive.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitIsActive() { + if (powerUnitIsActive.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("powerUnitIsActive"); + powerUnitIsActive.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerUnitActive() { - safeAccessPowerUnitActive(); - return powerUnitActive.getValue(); + public Parameter getPowerUnitIsActive() { + safeAccessPowerUnitIsActive(); + return powerUnitIsActive.getValue(); } - public BeanPropertyComposed getPowerUnitActiveBean() { - safeAccessPowerUnitActive(); - return powerUnitActive; + public BeanPropertyComposed getPowerUnitIsActiveBean() { + safeAccessPowerUnitIsActive(); + return powerUnitIsActive; } // ***************************************************************** From 4aae9d66f7237ada33d43c3a796fd9f0921c2594 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Tue, 15 Aug 2023 16:33:27 +0200 Subject: [PATCH 08/10] Task #169 Flip `PowerUnitIsActive` to `PowerUnitIsInactive` --- .../concept/concept.concept | 4 +- .../concept/concept.xmi | 111 +++++++++--------- .../concept/concept_v1_1.xmi | 111 +++++++++--------- .../cefx/model/AEquipmentPowerParameters.java | 26 ++-- 4 files changed, 131 insertions(+), 121 deletions(-) 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 dbb3f362..c470aa5c 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -135,7 +135,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - Type powerUnitIsActive 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 powerUnitIsInactive 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 PowerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; @@ -148,7 +148,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx 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}) * powerUnitIsActive; + Ref: PowerAvgWithMargin = (PowerUnitAvgWithMargin + summary{PowerAvgWithMargin, 1}) * ( 1 - powerUnitIsInactive); } 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 559fb1b8..cc8fcffe 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -3,11 +3,11 @@ - - - + + + - + @@ -18,27 +18,27 @@ - + - + - - - - + + + + - + - - - - + + + + @@ -84,13 +84,13 @@ - + - - - - + + + + @@ -127,12 +127,12 @@ - + - - - + + + @@ -164,12 +164,12 @@ - + - - - + + + @@ -183,21 +183,21 @@ - + - - - - + + + + - + - - - - + + + + @@ -223,13 +223,13 @@ - + - - - - + + + + @@ -280,11 +280,16 @@ - + + + + + + - + @@ -292,23 +297,23 @@ - + - - - - + + + + - + - + @@ -318,6 +323,6 @@ - + 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 1901e348..887eef55 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 @@ -3,11 +3,11 @@ - - - + + + - + @@ -18,27 +18,27 @@ - + - + - - - - + + + + - + - - - - + + + + @@ -84,13 +84,13 @@ - + - - - - + + + + @@ -127,12 +127,12 @@ - + - - - + + + @@ -164,12 +164,12 @@ - + - - - + + + @@ -183,21 +183,21 @@ - + - - - - + + + + - + - - - - + + + + @@ -223,13 +223,13 @@ - + - - - - + + + + @@ -280,11 +280,16 @@ - + + + + + + - + @@ -292,23 +297,23 @@ - + - - - - + + + + - + - + @@ -318,6 +323,6 @@ - + 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 9a9fcc79..195e2393 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 @@ -54,7 +54,7 @@ public String getFullQualifiedCategoryName() { } // property name constants - public static final String PROPERTY_POWERUNITISACTIVE = "powerUnitIsActive"; + public static final String PROPERTY_POWERUNITISINACTIVE = "powerUnitIsInactive"; public static final String PROPERTY_POWERDUTYCYCLE = "powerDutyCycle"; public static final String PROPERTY_POWERUNITON = "PowerUnitOn"; public static final String PROPERTY_POWERUNITSTBY = "PowerUnitStby"; @@ -84,26 +84,26 @@ public AEquipmentPowerParameters(CategoryAssignment categoryAssignement) { // ***************************************************************** - // * Attribute: powerUnitIsActive + // * Attribute: powerUnitIsInactive // ***************************************************************** - private BeanPropertyComposed powerUnitIsActive = new BeanPropertyComposed<>(); + private BeanPropertyComposed powerUnitIsInactive = new BeanPropertyComposed<>(); - private void safeAccessPowerUnitIsActive() { - if (powerUnitIsActive.getTypeInstance() == null) { - ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("powerUnitIsActive"); - powerUnitIsActive.setTypeInstance(propertyInstance); + private void safeAccessPowerUnitIsInactive() { + if (powerUnitIsInactive.getTypeInstance() == null) { + ComposedPropertyInstance propertyInstance = (ComposedPropertyInstance) helper.getPropertyInstance("powerUnitIsInactive"); + powerUnitIsInactive.setTypeInstance(propertyInstance); } } @XmlElement(nillable = true) - public Parameter getPowerUnitIsActive() { - safeAccessPowerUnitIsActive(); - return powerUnitIsActive.getValue(); + public Parameter getPowerUnitIsInactive() { + safeAccessPowerUnitIsInactive(); + return powerUnitIsInactive.getValue(); } - public BeanPropertyComposed getPowerUnitIsActiveBean() { - safeAccessPowerUnitIsActive(); - return powerUnitIsActive; + public BeanPropertyComposed getPowerUnitIsInactiveBean() { + safeAccessPowerUnitIsInactive(); + return powerUnitIsInactive; } // ***************************************************************** From 096dce75120d07cdcf6c592a15dabf9a430a3881 Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Wed, 16 Aug 2023 10:55:10 +0200 Subject: [PATCH 09/10] Task #169 Fix outdated description of `powerUnitIsInactive` --- de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept | 2 +- de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi | 2 +- de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 c470aa5c..ac92eb99 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -135,7 +135,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - Type powerUnitIsInactive 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 powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is not active in the given mode, 0 in case it is active."; Type powerDutyCycle of Category Parameter quantityKind "Dimensionless" unit "Percent"; Type PowerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; 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 cc8fcffe..741c5478 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -289,7 +289,7 @@ - + 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 887eef55..5ea6b569 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 @@ -289,7 +289,7 @@ - + From 9271893320a9e97c3d615e0580c2b76607ea21ae Mon Sep 17 00:00:00 2001 From: dellerDLR Date: Wed, 16 Aug 2023 11:04:43 +0200 Subject: [PATCH 10/10] Task #169 Improve description of `powerUnitIsInactive` --- de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept | 2 +- de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi | 2 +- de.dlr.sc.virsat.model.extension.cefx/concept/concept_v1_1.xmi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 ac92eb99..6a3c99fc 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept @@ -135,7 +135,7 @@ Concept de.dlr.sc.virsat.model.extension.cefx Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization]; Cardinality 1; - Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is not active in the given mode, 0 in case it is active."; + Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is inactive in the given mode, meaning it is totally off."; Type powerDutyCycle of Category Parameter quantityKind "Dimensionless" unit "Percent"; Type PowerUnitOn of Category Parameter quantityKind "Power" unit "Watt"; 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 741c5478..69e23c39 100644 --- a/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi +++ b/de.dlr.sc.virsat.model.extension.cefx/concept/concept.xmi @@ -289,7 +289,7 @@ - + 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 5ea6b569..28ae8dc5 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 @@ -289,7 +289,7 @@ - +