Skip to content

Commit

Permalink
Merge pull request #2 from IngStefan/IngStefan-patch-1
Browse files Browse the repository at this point in the history
Bugfixes and minor changes
  • Loading branch information
IngStefan authored Jun 27, 2021
2 parents 91da9c2 + 6d03416 commit d8c5ad2
Show file tree
Hide file tree
Showing 19 changed files with 4,293 additions and 281 deletions.
8 changes: 4 additions & 4 deletions JADE_VPP/src/main/java/mas/JADE_VPP/ContainerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ private void init(){
jade.core.Runtime runtime = jade.core.Runtime.instance();
//runtime.setCloseVM(true);

////***** for MAIN CONTAINER (VPP) ************
//************ For creation as Main Container (VPP) ************
//Creates a profile for the start of the Main Container (for VPP Agent)
Profile p = new jade.core.ProfileImpl();
p.setParameter(jade.core.Profile.CONTAINER_NAME, "VPP");
p.setParameter(jade.core.Profile.MAIN_HOST, "localhost");
p.setParameter(jade.core.Profile.GUI, "true"); //starts the JADE user interface
p.setParameter(jade.core.Profile.GUI, "true"); //enables JADE UI
containerController = runtime.createMainContainer(p);


////***** for Agent CONTAINER (TU) ************
//************ For creation as Agent Container (TU) ************
//Alternative profile to join a Main Container (for TU-Agents)
// Profile p = new jade.core.ProfileImpl();
// p.setParameter(jade.core.Profile.CONTAINER_NAME, "TU_Company3");
// p.setParameter(jade.core.Profile.MAIN_HOST, "192.168.152.233"); // IP of the Main Host the TUs should connect to
// p.setParameter(jade.core.Profile.MAIN_HOST, "192.168.152.233"); // IP-Address of MainContainer
// containerController = runtime.createAgentContainer(p);

}
Expand Down
47 changes: 46 additions & 1 deletion JADE_VPP/src/main/java/mas/JADE_VPP/ProducingRest_TU.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public String operationCancelFail(


//**************************** INTERFACE TO NODE-RED (TU) *******************************

//************************ TU Control **************************

@RequestMapping (method=RequestMethod.PUT, value = "/tu-agent/control_newSetpointFailed")
Expand Down Expand Up @@ -164,6 +163,52 @@ public InterfacePayloadBalancing newBalancingRefuse(@RequestParam(name = "tuName
return payload;
}

@RequestMapping (method=RequestMethod.PUT, value = "/tu-agent/balancing_informInstant")
public InterfacePayloadBalancing newBalancingInformInstant(
@RequestParam(name = "tuName") String _tuName,
@RequestParam(name = "feedIn") int _feedIn,
@RequestParam(name = "operatingPoint") int _operatingPoint,
@RequestParam(name = "leadingOperatingPoint") int _leadingOperatingPoint,
@RequestParam(name = "currentValueFR") int _currentValueFR,
@RequestParam(name = "assignedPool") int _assignedPool,
@RequestParam(name = "status") int _status,
@RequestParam(name = "frequency") int _frequency,
@RequestParam(name = "aFRRsetpoint") int _aFRRsetpoint,
@RequestParam(name = "aFRRsetpointEcho") int _aFRRsetpointEcho,
@RequestParam(name = "setpointFR") int _setpointFR,
@RequestParam(name = "aFRRGradientPOS") int _aFRRGradientPOS,
@RequestParam(name = "aFRRGradientNEG") int _aFRRGradientNEG,
@RequestParam(name = "capacityPOS") int _capacityPOS,
@RequestParam(name = "capacityNEG") int _capacityNEG,
@RequestParam(name = "holdingCapacityPOS") int _holdingCapacityPOS,
@RequestParam(name = "holdingCapacityNEG") int _holdingCapacityNEG,
@RequestParam(name = "controlBandPOS") int _controlBandPOS,
@RequestParam(name = "controlBandNEG") int _controlBandNEG) {
InterfacePayloadBalancing payload = new InterfacePayloadBalancing(_tuName);
TuVariables.balancingTuName = _tuName;
TuVariables.feedIn = _feedIn; //Einspeisung
TuVariables.operatingPoint = _operatingPoint; //Arbeitspunkt
TuVariables.leadingOperatingPoint = _leadingOperatingPoint; //vorauseilender Arbeitspunkt
TuVariables.currentValueFR = _currentValueFR; //Regelleistungsistwert
TuVariables.assignedPool = _assignedPool; //Poolzuordnung
TuVariables.status = _status; //Status (Meldung)
TuVariables.frequency = _frequency; //Frequenz
TuVariables.aFRRsetpoint = _aFRRsetpoint; //aFRR-Soll (ÜNB -> POOL)
TuVariables.aFRRsetpointEcho = _aFRRsetpointEcho; //aFRR-Soll-Echo (Pool -> ÜNB)
TuVariables.setpointFR = _setpointFR; //Regelleistungs-Soll
TuVariables.aFRRGradientPOS = _aFRRGradientPOS; //aFRR-Gradient POS
TuVariables.aFRRGradientNEG = _aFRRGradientNEG; //aFRR-Gradient NEG
TuVariables.capacityPOS = _capacityPOS; //Arbeitsvermögen POS (bei begrenztem Energiespeicher)
TuVariables.capacityNEG = _capacityNEG; //Arbeitsvermögen NEG (bei begrenzten Energiespeicher)
TuVariables.holdingCapacityPOS = _holdingCapacityPOS; //Aktuelle Vorhalteleistung POS
TuVariables.holdingCapacityNEG = _holdingCapacityNEG; //Aktuelle Vorhalteleistung NEG
TuVariables.controlBandPOS = _controlBandPOS; //Regelband POS
TuVariables.controlBandNEG = _controlBandNEG; //Regelband NEG
TuVariables.balancingInformInstantTrigger = true;
return payload;
}


@RequestMapping (method=RequestMethod.PUT, value = "/tu-agent/balancing_inform")
public InterfacePayloadBalancing newBalancingInform(
@RequestParam(name = "tuName") String _tuName,
Expand Down
1 change: 1 addition & 0 deletions JADE_VPP/src/main/java/mas/JADE_VPP/ProducingRest_VPP.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@RestController
public class ProducingRest_VPP {

//**************************** INTERFACE TO NODE-RED (VPP) *******************************
//********************** Scheduling **********************

@RequestMapping (method=RequestMethod.PUT, value = "/vpp-agent/scheduling_request")
Expand Down
Loading

0 comments on commit d8c5ad2

Please sign in to comment.