diff --git a/Zero_engine.alpx b/Zero_engine.alpx
index 52b47f00..827943f0 100644
--- a/Zero_engine.alpx
+++ b/Zero_engine.alpx
@@ -1125,7 +1125,6 @@
1752681631114
- 1752677832758
1752681639768
diff --git a/_alp/Agents/EnergyModel/EmbeddedObjects.xml b/_alp/Agents/EnergyModel/EmbeddedObjects.xml
index 589a0797..e3879f08 100644
--- a/_alp/Agents/EnergyModel/EmbeddedObjects.xml
+++ b/_alp/Agents/EnergyModel/EmbeddedObjects.xml
@@ -206,7 +206,7 @@
-
+
@@ -223,9 +223,6 @@
-
-
-
true
@@ -967,7 +964,7 @@
-
+
@@ -990,9 +987,6 @@
-
-
-
@@ -1011,9 +1005,6 @@
-
-
-
@@ -1153,7 +1144,7 @@
-
+
@@ -1173,9 +1164,6 @@
-
-
-
true
@@ -1291,7 +1279,7 @@
-
+
@@ -1311,9 +1299,6 @@
-
-
-
true
@@ -1429,7 +1414,7 @@
-
+
@@ -1488,9 +1473,6 @@
-
-
-
@@ -1506,9 +1488,6 @@
-
-
-
true
@@ -1624,7 +1603,7 @@
-
+
@@ -1641,9 +1620,6 @@
-
-
-
true
@@ -1759,7 +1735,7 @@
-
+
@@ -1779,9 +1755,6 @@
-
-
-
true
@@ -2236,7 +2209,7 @@
-
+
@@ -2286,9 +2259,6 @@
-
-
-
true
@@ -2405,7 +2375,7 @@
-
+
@@ -2458,9 +2428,6 @@
-
-
-
true
diff --git a/_alp/Agents/GCDistrictHeating/AOC.GCDistrictHeating.xml b/_alp/Agents/GCDistrictHeating/AOC.GCDistrictHeating.xml
index 1e710fa8..a9a5f172 100644
--- a/_alp/Agents/GCDistrictHeating/AOC.GCDistrictHeating.xml
+++ b/_alp/Agents/GCDistrictHeating/AOC.GCDistrictHeating.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCEnergyConversion/AOC.GCEnergyConversion.xml b/_alp/Agents/GCEnergyConversion/AOC.GCEnergyConversion.xml
index c8bb354a..872ecc2f 100644
--- a/_alp/Agents/GCEnergyConversion/AOC.GCEnergyConversion.xml
+++ b/_alp/Agents/GCEnergyConversion/AOC.GCEnergyConversion.xml
@@ -68,7 +68,7 @@
-
+
@@ -85,9 +85,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCEnergyProduction/AOC.GCEnergyProduction.xml b/_alp/Agents/GCEnergyProduction/AOC.GCEnergyProduction.xml
index 544fbdfb..826b149f 100644
--- a/_alp/Agents/GCEnergyProduction/AOC.GCEnergyProduction.xml
+++ b/_alp/Agents/GCEnergyProduction/AOC.GCEnergyProduction.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCGridBattery/AOC.GCGridBattery.xml b/_alp/Agents/GCGridBattery/AOC.GCGridBattery.xml
index 43f36c37..d6f2f45d 100644
--- a/_alp/Agents/GCGridBattery/AOC.GCGridBattery.xml
+++ b/_alp/Agents/GCGridBattery/AOC.GCGridBattery.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCHouse/AOC.GCHouse.xml b/_alp/Agents/GCHouse/AOC.GCHouse.xml
index a46ac2da..ed81c7d7 100644
--- a/_alp/Agents/GCHouse/AOC.GCHouse.xml
+++ b/_alp/Agents/GCHouse/AOC.GCHouse.xml
@@ -70,7 +70,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCIndustry/AOC.GCIndustry.xml b/_alp/Agents/GCIndustry/AOC.GCIndustry.xml
index 7deb1fb3..67649c00 100644
--- a/_alp/Agents/GCIndustry/AOC.GCIndustry.xml
+++ b/_alp/Agents/GCIndustry/AOC.GCIndustry.xml
@@ -68,7 +68,7 @@
-
+
@@ -85,9 +85,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCNeighborhood/AOC.GCNeighborhood.xml b/_alp/Agents/GCNeighborhood/AOC.GCNeighborhood.xml
index caad126c..63a7e821 100644
--- a/_alp/Agents/GCNeighborhood/AOC.GCNeighborhood.xml
+++ b/_alp/Agents/GCNeighborhood/AOC.GCNeighborhood.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCPublicCharger/AOC.GCPublicCharger.xml b/_alp/Agents/GCPublicCharger/AOC.GCPublicCharger.xml
index e2f01783..03d06c37 100644
--- a/_alp/Agents/GCPublicCharger/AOC.GCPublicCharger.xml
+++ b/_alp/Agents/GCPublicCharger/AOC.GCPublicCharger.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GCUtility/AOC.GCUtility.xml b/_alp/Agents/GCUtility/AOC.GCUtility.xml
index 7b9d9474..edd036c3 100644
--- a/_alp/Agents/GCUtility/AOC.GCUtility.xml
+++ b/_alp/Agents/GCUtility/AOC.GCUtility.xml
@@ -67,7 +67,7 @@
-
+
@@ -84,9 +84,6 @@
-
-
-
false
diff --git a/_alp/Agents/GridConnection/Code/Functions.java b/_alp/Agents/GridConnection/Code/Functions.java
index 2c628392..0a91a5f1 100644
--- a/_alp/Agents/GridConnection/Code/Functions.java
+++ b/_alp/Agents/GridConnection/Code/Functions.java
@@ -430,7 +430,7 @@ else if (productionAsset.energyAssetType == OL_EnergyAssetType.PHOTOTHERMAL){
f_connectToParents();
if ( p_parentNodeElectric == null ) {
- traceln("GC: %s with id %s and name %s", this, p_gridConnectionID, p_name);
+ traceln("GC: %s with id %s", this, p_gridConnectionID);
traceln("GN id %s", p_parentNodeElectricID);
throw new RuntimeException("Exception: GridConnection not connected to GridNodeElectric!");
}
diff --git a/_alp/Agents/GridConnection/Variables.xml b/_alp/Agents/GridConnection/Variables.xml
index 016e84a0..01eafe85 100644
--- a/_alp/Agents/GridConnection/Variables.xml
+++ b/_alp/Agents/GridConnection/Variables.xml
@@ -1113,7 +1113,8 @@
1722429053561
-
+
+ true
50
80
-
- 1757330831065
-
- true
- 50
- 100
-
- false
- true
- true
-
-
- NONE
- false
-
- 1757330831063
- TEXT_BOX
- 0
- 100
- NO_DELIMETER
-
-
-
1659962626903
diff --git a/_alp/Classes/Class.J_Address.java b/_alp/Classes/Class.J_Address.java
index 18227f55..97b189b2 100644
--- a/_alp/Classes/Class.J_Address.java
+++ b/_alp/Classes/Class.J_Address.java
@@ -15,10 +15,10 @@
)
@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id")
-public class J_Address implements Serializable {
+public class J_Address{
private String streetName;
- private int houseNumber;
+ private Integer houseNumber;
private String houseLetter;
private String houseAddition;
private String postalcode;
@@ -30,6 +30,16 @@ public class J_Address implements Serializable {
public J_Address() {
}
+ public J_Address(String streetName, Integer houseNumber, String houseLetter, String houseAddition, String postalcode, String city) {
+ setStreetName(streetName);
+ setHouseNumber(houseNumber);
+ setHouseLetter(houseLetter);
+ setHouseAddition(houseAddition);
+ setPostalcode(postalcode);
+ setCity(city);
+ }
+
+ //Get formated address
public String getAddress() {
StringBuilder sb = new StringBuilder();
@@ -40,16 +50,18 @@ public String getAddress() {
sb.append("Onbekend adres");
return sb.toString();
}
- sb.append(" ");
- sb.append(this.houseNumber);
- if ( this.houseLetter != null ) {
+ if(this.houseNumber != null) {
sb.append(" ");
- sb.append(this.houseLetter);
- }
- if ( this.houseAddition != null ) {
- sb.append(" ");
- sb.append(this.houseAddition);
- }
+ sb.append(this.houseNumber);
+ if ( this.houseLetter != null ) {
+ sb.append(" ");
+ sb.append(this.houseLetter);
+ }
+ if ( this.houseAddition != null ) {
+ sb.append(" ");
+ sb.append(this.houseAddition);
+ }
+ }
if ( this.postalcode != null || this.city != null) {
sb.append(",");
}
@@ -66,54 +78,97 @@ public String getAddress() {
}
+ //Setters
public void setStreetName( String streetName ) {
- this.streetName = streetName;
+ if (isNotEmptyString(streetName)) {
+ this.streetName = getFormattedName(streetName);
+ }
+ else {
+ this.streetName = null;
+ }
}
- public void setHouseNumber( int houseNumber ) {
- this.houseNumber = houseNumber;
+ public void setHouseNumber( Integer houseNumber ) {
+ this.houseNumber = houseNumber;
}
public void setHouseLetter( String houseLetter ) {
- this.houseLetter = houseLetter;
+ if(isNotEmptyString(houseLetter)) {
+ this.houseLetter = houseLetter;
+ }
+ else {
+ this.houseLetter = null;
+ }
}
public void setHouseAddition( String houseAddition ) {
- this.houseAddition = houseAddition;
+ if(isNotEmptyString(houseAddition)) {
+ this.houseAddition = houseAddition;
+ }
+ else {
+ this.houseAddition = null;
+ }
}
public void setPostalcode( String postalcode ) {
- this.postalcode = postalcode;
+ if(isNotEmptyString(postalcode)) {
+ this.postalcode = postalcode.toUpperCase().replaceAll("\\s","");
+ }
+ else {
+ this.postalcode = null;
+ }
}
public void setCity( String city ) {
- this.city = city;
+ if(isNotEmptyString(city)) {
+ this.city = getFormattedName(city);
+ }
+ else {
+ this.city = null;
+ }
}
+
+ //Getters
public String getStreetName() {
return this.streetName;
}
- public int getHouseNumber() {
- return this.houseNumber;
+ public Integer getHouseNumber() {
+ return this.houseNumber;
}
public String getHouseLetter() {
- return this.houseLetter;
+ return this.houseLetter;
}
public String getHouseAddition() {
- return this.houseAddition;
+ return this.houseAddition;
}
public String getPostalcode() {
- return this.postalcode;
+ return this.postalcode;
}
public String getCity() {
- return this.city;
+ return this.city;
}
+
+
+ //Support function for (Street/City) names to remove double white spaces and make every thing lower space, except the first letter of every word
+ private String getFormattedName(String name) {
+ String[] words = name.trim().toLowerCase().split("\\s+");
+ StringBuilder sb = new StringBuilder();
+
+ for (String word : words) {
+ sb.append(Character.toUpperCase(word.charAt(0)))
+ .append(word.substring(1))
+ .append(" ");
+ }
+
+ return sb.toString().trim();
+ }
+
+ //Check used to see if address (String) item is filled in/usefull
+ private boolean isNotEmptyString(String str) {
+ // Return true if str is not null, empty and doesnt only contain spaces
+ return str != null && !str.trim().isEmpty();
+ }
+
+
@Override
public String toString() {
return "J_Address(" + getAddress() + ")";
}
-
-
- /**
- * This number is here for model snapshot storing purpose
- * It needs to be changed when this class gets changed
- */
- private static final long serialVersionUID = 1L;
-
}
\ No newline at end of file