Skip to content

Commit

Permalink
Add memap GUI project
Browse files Browse the repository at this point in the history
  • Loading branch information
Saitel Daniela Agudelo Sanabria committed Aug 27, 2019
1 parent 5a032fe commit af1a77b
Show file tree
Hide file tree
Showing 164 changed files with 10,281 additions and 0 deletions.
86 changes: 86 additions & 0 deletions projects/memapGui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>fortiss</groupId>
<artifactId>memapGui</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>gui</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jgoodies/jgoodies-forms -->
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>jgoodies-forms</artifactId>
<version>1.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.knowm.xchart/xchart -->
<dependency>
<groupId>org.knowm.xchart</groupId>
<artifactId>xchart</artifactId>
<version>3.5.4</version>
</dependency>

<dependency>
<groupId>org.fortiss</groupId>
<artifactId>gridarchitect</artifactId>
<version>0.1</version>
</dependency>

<!--
<dependency>
<groupId>org.fortiss</groupId>
<artifactId>memapLinProgDenisThesis</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency> -->

<dependency>
<groupId>fortiss</groupId>
<artifactId>memapBasis</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>jgoodies-common</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
113 changes: 113 additions & 0 deletions projects/memapGui/src/main/java/fortiss/components/Building.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
package fortiss.components;

import java.util.ArrayList;

/**
* Building is the class for representing Energy Management Systems (EMS).
*/
public class Building {
private String name;
private int port;
private boolean ldHeating;
private int heatTransportLength;
private ArrayList<Demand> demand_list;
private ArrayList<Coupler> coupler_list;
private ArrayList<Controllable> controllable_list;
private ArrayList<Volatile> volatile_list;
private ArrayList<Storage> storage_list;

/**
* Constructor for class Building
*
* @param name an alphanumeric string
* @param port an integer between 1024 and 49151, or 0
* @param ldHeating long distance heating supply
* @param heatTransportLength length of long distance transport
*
* TODO Create input option for length and losses through GUI Task#94
*/
public Building(String name, int port, boolean ldHeating, int heatTransportLength) {
this.setName(name);
this.setPort(port);
this.setLdHeating(ldHeating);
this.setHeatTransportLength(heatTransportLength);
this.demand_list = new ArrayList<Demand>();
this.coupler_list = new ArrayList<Coupler>();
this.controllable_list = new ArrayList<Controllable>();
this.volatile_list = new ArrayList<Volatile>();
this.storage_list = new ArrayList<Storage>();
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public int getPort() {
return port;
}

public void setPort(int port) {
this.port = port;
}

public boolean isLdHeating() {
return ldHeating;
}

public void setLdHeating(boolean heating) {
this.ldHeating = heating;
}

public int getHeatTransportLength() {
return heatTransportLength;
}

public void setHeatTransportLength(int heatTransport) {
this.heatTransportLength = heatTransport;
}

public void addDemand(Demand demand) {
demand_list.add(demand);
}

public ArrayList<Demand> getDemand() {
return demand_list;
}

public ArrayList<Storage> getStorage() {
return storage_list;
}

public ArrayList<Volatile> getVolatile() {
return volatile_list;
}

public ArrayList<Controllable> getControllable() {
return controllable_list;
}

public ArrayList<Coupler> getCoupler() {
return coupler_list;
}

public void addCoupler(Coupler coupler) {
coupler_list.add(coupler);
}

public void addContProduction(Controllable cont_production) {
controllable_list.add(cont_production);
}

public void addVolProduction(Volatile vol_production) {
volatile_list.add(vol_production);
}

public void addStorage(Storage storage) {
storage_list.add(storage);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package fortiss.components;

/**
* Controllable is the class for representing controllable Producer objects.
* Example: Gas Boiler
*/
public class Controllable {
private String name;
private String networkType; // Values: Heat or Electricity
private double power;
private double efficiency;
private double cost;
private double coEmission;

/**
* Constructor for class Controllable
*
* @param name an alphanumeric string
* @param networkType a string: Heat or Electricity
* @param power a positive double
* @param efficiency a positive double
* @param cost a positive double
* @param coEmission CO2 Emissions measured in [g/kWh]
*/
public Controllable(String name, String networkType, double power, double efficiency, double cost,
double coEmission) {
this.setName(name);
this.setNetworkType(networkType);
this.setPower(power);
this.setEfficiency(efficiency);
this.setCost(cost);
this.setCOEmission(coEmission);
}

public String getName() {
return name;
}

public void setName(String producerId) {
this.name = producerId;
}

public String getNetworkType() {
return networkType;
}

public void setNetworkType(String networkType) {
this.networkType = networkType;
}

public double getPower() {
return power;
}

public void setPower(double power) {
this.power = power;
}

public double getEfficiency() {
return efficiency;
}

public void setEfficiency(double efficiency) {
this.efficiency = efficiency;
}

public double getCost() {
return cost;
}

public void setCost(double cost) {
this.cost = cost;
}

public double getCOEmission() {
return coEmission;
}

public void setCOEmission(double coEmission) {
this.coEmission = coEmission;
}

}
106 changes: 106 additions & 0 deletions projects/memapGui/src/main/java/fortiss/components/Coupler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package fortiss.components;

/**
* Coupler is the class for representing Coupler objects. Example: CHP, HeatPump
*/
public class Coupler {
private String name;
private String networkTypeP; // Primary, Values: Heat or Electricity
private String networkTypeS; // Secondary, Values: Heat or Electricity
private double power;
private double efficiencyPrimary;
private double efficiencySecondary;
private double cost;
private double coEmission;

/**
* Constructor for class Coupler
*
* @param name an alphanumeric string
* @param networkTypeP primary network type. A string: Heat or
* Electricity
* @param networkTypeS secondary network type. A string: Heat or
* Electricity
* @param power a positive double
* @param efficiencyPrimary primary network efficiency. A positive double
* @param efficiencySecondary secondary network efficiency. A negative double
* @param cost cost
* @param coEmission CO2 Emissions measured in [g/kWh]
*/
public Coupler(String name, String networkTypeP, String networkTypeS, double power, double efficiencyPrimary,
double efficiencySecondary, double cost, double coEmission) {
this.setName(name);
this.setNetworkTypeP(networkTypeP);
this.setNetworkTypeS(networkTypeS);
this.setPower(power);
this.setEfficiencyPrimary(efficiencyPrimary);
this.setEfficiencySecondary(efficiencySecondary);
this.setCost(cost);
this.setCOEmission(coEmission);
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getNetworkTypeP() {
return networkTypeP;
}

public void setNetworkTypeP(String networkTypeP) {
this.networkTypeP = networkTypeP;
}

public String getNetworkTypeS() {
return networkTypeS;
}

public void setNetworkTypeS(String networkTypeS) {
this.networkTypeS = networkTypeS;
}

public double getPower() {
return power;
}

public void setPower(double power) {
this.power = power;
}

public double getEfficiencyPrimary() {
return efficiencyPrimary;
}

public void setEfficiencyPrimary(double efficiencyNetworkP) {
this.efficiencyPrimary = efficiencyNetworkP;
}

public double getEfficiencySecondary() {
return efficiencySecondary;
}

public void setEfficiencySecondary(double efficiencyNetworkS) {
this.efficiencySecondary = efficiencyNetworkS;
}

public double getCost() {
return cost;
}

public void setCost(double cost) {
this.cost = cost;
}

public double getCOEmission() {
return coEmission;
}

public void setCOEmission(double coEmission) {
this.coEmission = coEmission;
}

}
Loading

0 comments on commit af1a77b

Please sign in to comment.