Power.Dev Optimization Services

<back to all web services

TODOptimizerRequest

The following routes are available for this service:
POST/optimizer/tod
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class TODOptimizerRequest extends TodOptimizerRequestBase
    {
        
    }

    public static class TodOptimizerRequestBase
    {
        public UUID projectId = null;
        public BigDecimal chargeDischargeLimit = null;
        public BigDecimal batteryCapacity = null;
        public BigDecimal chargeEfficiency = null;
        public BigDecimal dischargeEfficiency = null;
        public BigDecimal paraciticLossesOperation = null;
        public BigDecimal paraciticLossesResting = null;
        public BigDecimal hvacLosses = null;
        public BigDecimal acCablingLosses = null;
        public BigDecimal transformatorLosses = null;
        public BigDecimal thermalLosses = null;
        public BigDecimal unavailabilityLoss = null;
        public BigDecimal otherLosses = null;
        public Boolean enableCapacity = null;
        public ArrayList<AnnualRateItem> energySchedule = null;
        public ArrayList<AnnualRateItem> capacitySchedule = null;
        public ArrayList<YoyFactorOptimizarItem> yoyFactors = null;
        public ArrayList<TodOptimizerRequestItem> data = null;
        public UUID apiActionId = null;
        
        public UUID getProjectId() { return projectId; }
        public TodOptimizerRequestBase setProjectId(UUID value) { this.projectId = value; return this; }
        public BigDecimal getChargeDischargeLimit() { return chargeDischargeLimit; }
        public TodOptimizerRequestBase setChargeDischargeLimit(BigDecimal value) { this.chargeDischargeLimit = value; return this; }
        public BigDecimal getBatteryCapacity() { return batteryCapacity; }
        public TodOptimizerRequestBase setBatteryCapacity(BigDecimal value) { this.batteryCapacity = value; return this; }
        public BigDecimal getChargeEfficiency() { return chargeEfficiency; }
        public TodOptimizerRequestBase setChargeEfficiency(BigDecimal value) { this.chargeEfficiency = value; return this; }
        public BigDecimal getDischargeEfficiency() { return dischargeEfficiency; }
        public TodOptimizerRequestBase setDischargeEfficiency(BigDecimal value) { this.dischargeEfficiency = value; return this; }
        public BigDecimal getParaciticLossesOperation() { return paraciticLossesOperation; }
        public TodOptimizerRequestBase setParaciticLossesOperation(BigDecimal value) { this.paraciticLossesOperation = value; return this; }
        public BigDecimal getParaciticLossesResting() { return paraciticLossesResting; }
        public TodOptimizerRequestBase setParaciticLossesResting(BigDecimal value) { this.paraciticLossesResting = value; return this; }
        public BigDecimal getHvacLosses() { return hvacLosses; }
        public TodOptimizerRequestBase setHvacLosses(BigDecimal value) { this.hvacLosses = value; return this; }
        public BigDecimal getAcCablingLosses() { return acCablingLosses; }
        public TodOptimizerRequestBase setAcCablingLosses(BigDecimal value) { this.acCablingLosses = value; return this; }
        public BigDecimal getTransformatorLosses() { return transformatorLosses; }
        public TodOptimizerRequestBase setTransformatorLosses(BigDecimal value) { this.transformatorLosses = value; return this; }
        public BigDecimal getThermalLosses() { return thermalLosses; }
        public TodOptimizerRequestBase setThermalLosses(BigDecimal value) { this.thermalLosses = value; return this; }
        public BigDecimal getUnavailabilityLoss() { return unavailabilityLoss; }
        public TodOptimizerRequestBase setUnavailabilityLoss(BigDecimal value) { this.unavailabilityLoss = value; return this; }
        public BigDecimal getOtherLosses() { return otherLosses; }
        public TodOptimizerRequestBase setOtherLosses(BigDecimal value) { this.otherLosses = value; return this; }
        public Boolean isEnableCapacity() { return enableCapacity; }
        public TodOptimizerRequestBase setEnableCapacity(Boolean value) { this.enableCapacity = value; return this; }
        public ArrayList<AnnualRateItem> getEnergySchedule() { return energySchedule; }
        public TodOptimizerRequestBase setEnergySchedule(ArrayList<AnnualRateItem> value) { this.energySchedule = value; return this; }
        public ArrayList<AnnualRateItem> getCapacitySchedule() { return capacitySchedule; }
        public TodOptimizerRequestBase setCapacitySchedule(ArrayList<AnnualRateItem> value) { this.capacitySchedule = value; return this; }
        public ArrayList<YoyFactorOptimizarItem> getYoyFactors() { return yoyFactors; }
        public TodOptimizerRequestBase setYoyFactors(ArrayList<YoyFactorOptimizarItem> value) { this.yoyFactors = value; return this; }
        public ArrayList<TodOptimizerRequestItem> getData() { return data; }
        public TodOptimizerRequestBase setData(ArrayList<TodOptimizerRequestItem> value) { this.data = value; return this; }
        public UUID getApiActionId() { return apiActionId; }
        public TodOptimizerRequestBase setApiActionId(UUID value) { this.apiActionId = value; return this; }
    }

    public static class AnnualRateItem
    {
        public Integer year = null;
        public BigDecimal value = null;
        
        public Integer getYear() { return year; }
        public AnnualRateItem setYear(Integer value) { this.year = value; return this; }
        public BigDecimal getValue() { return value; }
        public AnnualRateItem setValue(BigDecimal value) { this.value = value; return this; }
    }

    public static class YoyFactorOptimizarItem
    {
        public Integer year = null;
        public BigDecimal factor = null;
        
        public Integer getYear() { return year; }
        public YoyFactorOptimizarItem setYear(Integer value) { this.year = value; return this; }
        public BigDecimal getFactor() { return factor; }
        public YoyFactorOptimizarItem setFactor(BigDecimal value) { this.factor = value; return this; }
    }

    public static class TodOptimizerRequestItem
    {
        public Integer year = null;
        public Integer month = null;
        public Integer hour = null;
        public Integer weekDay = null;
        public BigDecimal energyPrice = null;
        public BigDecimal capacityPrice = null;
        
        public Integer getYear() { return year; }
        public TodOptimizerRequestItem setYear(Integer value) { this.year = value; return this; }
        public Integer getMonth() { return month; }
        public TodOptimizerRequestItem setMonth(Integer value) { this.month = value; return this; }
        public Integer getHour() { return hour; }
        public TodOptimizerRequestItem setHour(Integer value) { this.hour = value; return this; }
        public Integer getWeekDay() { return weekDay; }
        public TodOptimizerRequestItem setWeekDay(Integer value) { this.weekDay = value; return this; }
        public BigDecimal getEnergyPrice() { return energyPrice; }
        public TodOptimizerRequestItem setEnergyPrice(BigDecimal value) { this.energyPrice = value; return this; }
        public BigDecimal getCapacityPrice() { return capacityPrice; }
        public TodOptimizerRequestItem setCapacityPrice(BigDecimal value) { this.capacityPrice = value; return this; }
    }

    public static class TodOptimizerResponse
    {
        public ApiResponseStatus status = null;
        public String message = null;
        public UUID apiActionId = null;
        public ArrayList<TodOptimizerResponseItem> testItems = null;
        
        public ApiResponseStatus getStatus() { return status; }
        public TodOptimizerResponse setStatus(ApiResponseStatus value) { this.status = value; return this; }
        public String getMessage() { return message; }
        public TodOptimizerResponse setMessage(String value) { this.message = value; return this; }
        public UUID getApiActionId() { return apiActionId; }
        public TodOptimizerResponse setApiActionId(UUID value) { this.apiActionId = value; return this; }
        public ArrayList<TodOptimizerResponseItem> getTestItems() { return testItems; }
        public TodOptimizerResponse setTestItems(ArrayList<TodOptimizerResponseItem> value) { this.testItems = value; return this; }
    }

    public static enum ApiResponseStatus
    {
        Undefined(0),
        Success(1),
        Pending(10),
        Failed(100);

        private final int value;
        ApiResponseStatus(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class TodOptimizerResponseItem extends TodOptimizerRequestItem
    {
        public BigDecimal chargeState = null;
        public BigDecimal charging = null;
        public BigDecimal loss = null;
        public BigDecimal chargeRate = null;
        
        public BigDecimal getChargeState() { return chargeState; }
        public TodOptimizerResponseItem setChargeState(BigDecimal value) { this.chargeState = value; return this; }
        public BigDecimal getCharging() { return charging; }
        public TodOptimizerResponseItem setCharging(BigDecimal value) { this.charging = value; return this; }
        public BigDecimal getLoss() { return loss; }
        public TodOptimizerResponseItem setLoss(BigDecimal value) { this.loss = value; return this; }
        public BigDecimal getChargeRate() { return chargeRate; }
        public TodOptimizerResponseItem setChargeRate(BigDecimal value) { this.chargeRate = value; return this; }
    }

}

Java TODOptimizerRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /optimizer/tod HTTP/1.1 
Host: dev-optimization.power.dev 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"projectId":"00000000000000000000000000000000","chargeDischargeLimit":0,"batteryCapacity":0,"chargeEfficiency":0,"dischargeEfficiency":0,"paraciticLossesOperation":0,"paraciticLossesResting":0,"hvacLosses":0,"acCablingLosses":0,"transformatorLosses":0,"thermalLosses":0,"unavailabilityLoss":0,"otherLosses":0,"enableCapacity":false,"apiActionId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"status":"Undefined","message":"String","apiActionId":"00000000000000000000000000000000","testItems":[{"chargeState":0,"charging":0,"loss":0,"chargeRate":0,"year":0,"month":0,"hour":0,"weekDay":0,"energyPrice":0,"capacityPrice":0}]}