POST | /optimizer/ftm | ||
---|---|---|---|
POST | /optimizer/common |
import Foundation
import ServiceStack
public class CommonOptimizerRequest : CommonOptimizerPortalRequestBase
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class CommonOptimizerPortalRequestBase : Codable
{
public var projectId:String
public var isBatchSimulation:Bool
public var force:Bool
public var disableEBSSpot:Bool
public var isServerless:Bool
public var apiActionId:String
public var nodeId:Int
public var parallelProject:Int
public var parallelYears:Int
public var ensureExlusive:Int
required public init(){}
}
public class CommonOptimizerResponse : Codable
{
public var status:ApiResponseStatus
public var message:String
public var apiActionId:String
public var detail:String
public var items:[BatteryProjectForOptimizer] = []
required public init(){}
}
public enum ApiResponseStatus : Int, Codable
{
case Undefined = 0
case Success = 1
case Pending = 10
case Failed = 100
}
public class BatteryProjectForOptimizer : Codable
{
public var projectId:String
public var version:String
public var baseId:String
public var altId:Int
public var simulationType:BatterySimulationType
public var projectGroup:BatteryProjectGroup
public var projectAction:BatteryProjectAction
public var iso:DataProvider
public var name:String
public var baseNodeId:Int
public var orgNodeId:Int
public var baseZoneId:Int
public var dataSource:BatteryDataSoruce
public var baseMarket:PriceMarketType
public var priceGranularity:TimeGranularity
public var startDate:Date
public var endDate:Date
public var batteryCapacity:Double
public var interconnectionLimit:Double
public var namepaletCapacity:Double
// @Ignore()
public var chargeDischargeLimit:Double
// @Ignore()
public var baseCapacityRate:Double
// @Ignore()
public var capacityRate:Double
public var chargeEfficiency:Double
public var disChargeEfficiency:Double
public var paraciticLossesOperation:Double
public var paraciticLossesResting:Double
public var hvacLosses:Double
public var acCablingLosses:Double
public var transformatorLosses:Double
public var thermalLosses:Double
public var otherLosses:Double
public var useEnergy:BooleanValue
public var useCapacity:BooleanValue
public var capacityBasis:CapacityMethod
public var capacityPayment:Double
public var netCapacityFactor:Double
public var useAncillary:BooleanValue
public var productionDataSource:BatteryProductionDataSource
public var powerPlantType:PowerPlantType
public var solarAcCapacity:Double
public var solarDcCapacity:Double
public var windAcCapacity:Double
// @Ignore()
public var solarCapacityRate:Double
// @Ignore()
public var windCapacityRate:Double
public var status:Int
public var simulationStatus:Int
public var lastSimulationDate:Date
public var dataStartDate:Date
public var dataEndDate:Date
public var solarId:Int
public var windId:Int
public var lmpFileId:Int
public var productionFileId:Int
public var loadFileId:Int
public var capacityFileId:Int
public var nodeAltId:Int
public var nodeRefId:Int
public var useRegup:Double
public var useRegdown:Double
public var useSpinning:Double
public var useNonSpinning:Double
public var solarDegredation:Double
public var batteryDegredation:Double
public var augmentation:Double
public var augmentationFrequency:Double
public var energyIncrement:Double
public var ancillaryIncrement:Double
public var enableGridArbitrage:Int
public var incrementReferanceYear:Int
public var representativeYear:Int
public var useFutureData:Int
public var maxDailyCycle:Double
public var minDailyProfitPerMw:Double
public var ancillaryFileId:Int
public var maxChargingPriceCap:Double
public var maxDischargingPriceCap:Double
public var maxAncillaryPriceCap:Double
public var revenueStackingMode:RevenueStackingMode
public var optimizationQuality:Int
public var useInternalSolver:Bool
required public init(){}
}
public enum BatterySimulationType : Int, Codable
{
case Undefined = 0
case SingleRun = 1
case BatchSimulation = 2
case BatchSub = 21
case Siting = 100
}
public enum BatteryProjectGroup : String, Codable
{
case Undefined
case StandAlone
case FTM
case BTM
}
public enum BatteryProjectAction : String, Codable
{
case Undefined
case Arbitrage
case PeakShaving
case Smooting
case Firming
}
public enum DataProvider : Int, Codable
{
case Undefined = 0
case SPP = 1
case ERCOT = 2
case MISO = 3
case CAISO = 4
case PJM = 5
case ISONE = 6
case NYISO = 7
case NW = 8
case SW = 9
case SE = 10
case AESO = 11
case IESO = 12
case CENACE = 20
case NONISO = 99
case EIA = 100
case PNM = 150
case NREL = 200
case NOAA = 210
case ENTSOE = 1000
case EPIAS = 1010
case SELF = 10000
}
public enum BatteryDataSoruce : String, Codable
{
case Undefined
case Merchant
case Future
case TOD
}
public enum PriceMarketType : Int, Codable
{
case Undefined = 0
case Realtime = 1
case DayAhead = 10
case DART = 101
}
public enum TimeGranularity : Int, Codable
{
case Undefined = 0
case hourly = 1
case daily = 2
case weekly = 3
case monthy = 4
case yearly = 5
case fivemin = 10
case tenmin = 11
case fifteenmin = 12
case halfhour = 13
case quarterly = 14
case twohours = 21
case threehours = 22
case fourhours = 24
case sixhours = 26
case eighthours = 28
case twelvehours = 32
case irregular = 100
}
public enum BooleanValue : String, Codable
{
case Undefined
case Yes
case No
case Custom
}
public enum CapacityMethod : String, Codable
{
case Undefined
case Annual
case Tod
case Schedule
}
public enum BatteryProductionDataSource : String, Codable
{
case Undefined
case SetClosest
case UploadedFile
}
public enum PowerPlantType : String, Codable
{
case Undefined
case Solar
case Wind
case Hybrid
}
public enum RevenueStackingMode : String, Codable
{
case SolveWithoutAncillary
case SolveWithAncillary
}
Swift CommonOptimizerRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /optimizer/ftm HTTP/1.1
Host: dev-optimization.power.dev
Accept: application/json
Content-Type: application/json
Content-Length: length
{"projectId":"00000000000000000000000000000000","isBatchSimulation":false,"force":false,"disableEBSSpot":false,"isServerless":false,"apiActionId":"00000000000000000000000000000000","nodeId":0,"parallelProject":0,"parallelYears":0,"ensureExlusive":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"status":"Undefined","message":"String","apiActionId":"00000000000000000000000000000000","detail":"String"}