Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of unused and naming improvements of existing paramters #180

Merged
merged 11 commits into from
Aug 21, 2023
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ PhilMFischer <[email protected]> Philipp M. Fischer <philipp.fischer@dlr.
TjorveKujathDLR <[email protected]> Tjorve Kujath <[email protected]>

dellerDLR <[email protected]> Eller, Dennis <[email protected]>
dellerDLR <[email protected]> elle_de <[email protected]>

pchrszon-dlr <[email protected]> Chrszon, Philipp <[email protected]>
6 changes: 3 additions & 3 deletions de.dlr.sc.virsat.cef.target/virsat_cef_development.target
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="2.26.0.v20220228-0901"/>
<unit id="org.eclipse.gef.feature.group" version="3.11.0.201606061308"/>
<unit id="org.eclipse.egit.feature.group" version="6.1.0.202203080745-r"/>
<repository location="http://download.eclipse.org/releases/2022-03"/>
<repository location="https://download.eclipse.org/releases/2022-03"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.team.svn.feature.group" version="4.8.0.v20220904-1901"/>
Expand All @@ -87,14 +87,14 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.sphinx.core.feature.group" version="0.11.0.201706140911"/>
<unit id="org.eclipse.sphinx.emf.serialization.feature.group" version="0.11.0.201706140911"/>
<repository location="http://download.eclipse.org/sphinx/releases/0.11.x"/>
<repository location="https://download.eclipse.org/sphinx/releases/0.11.x"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rmf.reqif10.feature.feature.group" version="0.13.0.201509161042"/>
<unit id="org.eclipse.rmf.reqif10.pror.feature.feature.group" version="0.13.0.201509161042"/>
<unit id="org.eclipse.rmf.reqif10.thirdparty.feature.feature.group" version="0.13.0.201509161042"/>
<unit id="org.eclipse.rmf.reqif10.sdk.feature.feature.group" version="0.13.0.201509161042"/>
<repository location="http://download.eclipse.org/rmf/updates/releases"/>
<repository location="https://download.eclipse.org/rmf/updates/releases"/>
</location>
</locations>
<environment>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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<Equation> equations = container.getEquationSection().getEquations();
Expand All @@ -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);
Expand All @@ -211,16 +211,16 @@ 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<Equation> equations = container.getEquationSection().getEquations();

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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*******************************************************************************
* 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);

testMigrator1v1.migrate(conceptMigrateFrom, conceptMigrateFromRepository, conceptMigrateTo);
}

}
30 changes: 15 additions & 15 deletions de.dlr.sc.virsat.model.extension.cefx/concept/concept.concept
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -123,32 +123,32 @@ 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 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 = 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 {
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 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 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}) * ( 1 - powerUnitIsInactive);
}

Category EquipmentTemperatureParameters {
Expand Down
Loading
Loading