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

feature/193 making the parameter naming consistent. #217

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
*/
public class DLRCEFStudyCommandHelper {

public static final String POWER_PARAMETERS = "powerParameters";
public static final String MASS_PARAMETERS = "massParameters";
public static final String SYSTEM_PARAMETERS = "systemParameters";
public static final String EQUIPMENT_MASS_PARAMETERS = "EquipmentMassParameters";
franzTobiasDLR marked this conversation as resolved.
Show resolved Hide resolved
public static final String TEMPERATURE_PARAMETERS = "temperatureParameters";
public static final String SYSTEM = "System";
public static final String SUB_SYSTEM = "subSystem";
public static final String EQUIPMENT = "equipment";

/**
* private Constructor
*/
Expand All @@ -65,7 +74,7 @@ public static Concept getCefConcept(VirSatTransactionalEditingDomain domain) {
*/
public static System createSystemBean(Concept concept) {
System system = new System(concept);
system.setName("System");
system.setName(SYSTEM);
return system;
}

Expand All @@ -75,7 +84,7 @@ public static System createSystemBean(Concept concept) {
*/
public static SubSystem createSubSystemBean(Concept concept) {
SubSystem subSystem = new SubSystem(concept);
subSystem.setName("subSystem");
subSystem.setName(SUB_SYSTEM);
return subSystem;
}

Expand All @@ -85,37 +94,37 @@ public static SubSystem createSubSystemBean(Concept concept) {
*/
public static Equipment createEquipmentBean(Concept concept) {
Equipment equipment = new Equipment(concept);
equipment.setName("equipment");
equipment.setName(EQUIPMENT);
return equipment;
}

//CHECKSTYLE:OFF
public static void addSystemParameters(Concept concept, System system) {
//default unit in concept is percent
SystemParameters systemParameters = new SystemParameters(concept);
systemParameters.setName("systemParameters");
systemParameters.setName(SYSTEM_PARAMETERS);
systemParameters.setSystemMargin(20);
system.add(systemParameters);

SystemMassParameters systemMassParameters = new SystemMassParameters(concept);
systemMassParameters.setName("massParameters");
systemMassParameters.setName(MASS_PARAMETERS);
systemMassParameters.getMassAdapter().setDefaultValue(100);
systemMassParameters.getMassLaunchMax().setDefaultValue(850);
systemMassParameters.getMassPropellant().setDefaultValue(35);
system.add(systemMassParameters);

SystemPowerParameters systemPowerParameters = new SystemPowerParameters(concept);
systemPowerParameters.setName("powerParameters");
systemPowerParameters.setName(POWER_PARAMETERS);
system.add(systemPowerParameters);
}

public static void addSubSystemParameters(Concept concept, SubSystem subSystem) {
SubSystemMassParameters subSystemMassParameters = new SubSystemMassParameters(concept);
subSystemMassParameters.setName("massParameters");
subSystemMassParameters.setName(MASS_PARAMETERS);
subSystem.add(subSystemMassParameters);

SubSystemPowerParameters subSystemPowerParameters = new SubSystemPowerParameters(concept);
subSystemPowerParameters.setName("powerParameters");
subSystemPowerParameters.setName(POWER_PARAMETERS);
subSystem.add(subSystemPowerParameters);
}

Expand All @@ -126,16 +135,16 @@ public static void addEquipmentParameters(Concept concept, Equipment equipment)
equipment.add(equipmentParams);

EquipmentMassParameters equipmentMassParameters = new EquipmentMassParameters(concept);
equipmentMassParameters.setName("EquipmentMassParameters");
equipmentMassParameters.setName(EQUIPMENT_MASS_PARAMETERS);
equipmentMassParameters.getMassPerUnit().setDefaultValue(10);
equipment.add(equipmentMassParameters);

EquipmentPowerParameters powerParameters = new EquipmentPowerParameters(concept);
powerParameters.setName("powerParameters");
powerParameters.setName(POWER_PARAMETERS);
equipment.add(powerParameters);

EquipmentTemperatureParameters temperatureParameters = new EquipmentTemperatureParameters(concept);
temperatureParameters.setName("temperatureParameters");
temperatureParameters.setName(TEMPERATURE_PARAMETERS);
temperatureParameters.getTemperatureNoOpsMax().setDefaultValue(30);
temperatureParameters.getTemperatureNoOpsMin().setDefaultValue(5);
temperatureParameters.getTemperatureOpsMax().setDefaultValue(60);
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.

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

1 change: 1 addition & 0 deletions known_authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ JAmmermann-DLR
christoph-pietsch-DLR
dellerDLR
pchrszon-dlr
DimitriDiantos
Loading