Power.Dev Optimization Services

<back to all web services

SolverModelStandaloneRequest

The following routes are available for this service:
POST/solver-model/standalone
import 'package:servicestack/servicestack.dart';

class SolverModelStandaloneRequest implements IConvertible
{
    double? batteryCapacity;
    double? nameplateCapacity;
    double? chargingEfficiency;
    double? dischargingEfficiency;
    double? minProfitPerMw;
    double? maxDailCycle;
    double? restingLossRate;
    double? operationLossRate;
    List<double>? prices;

    SolverModelStandaloneRequest({this.batteryCapacity,this.nameplateCapacity,this.chargingEfficiency,this.dischargingEfficiency,this.minProfitPerMw,this.maxDailCycle,this.restingLossRate,this.operationLossRate,this.prices});
    SolverModelStandaloneRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        batteryCapacity = JsonConverters.toDouble(json['batteryCapacity']);
        nameplateCapacity = JsonConverters.toDouble(json['nameplateCapacity']);
        chargingEfficiency = JsonConverters.toDouble(json['chargingEfficiency']);
        dischargingEfficiency = JsonConverters.toDouble(json['dischargingEfficiency']);
        minProfitPerMw = JsonConverters.toDouble(json['minProfitPerMw']);
        maxDailCycle = JsonConverters.toDouble(json['maxDailCycle']);
        restingLossRate = JsonConverters.toDouble(json['restingLossRate']);
        operationLossRate = JsonConverters.toDouble(json['operationLossRate']);
        prices = JsonConverters.fromJson(json['prices'],'List<double>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'batteryCapacity': batteryCapacity,
        'nameplateCapacity': nameplateCapacity,
        'chargingEfficiency': chargingEfficiency,
        'dischargingEfficiency': dischargingEfficiency,
        'minProfitPerMw': minProfitPerMw,
        'maxDailCycle': maxDailCycle,
        'restingLossRate': restingLossRate,
        'operationLossRate': operationLossRate,
        'prices': JsonConverters.toJson(prices,'List<double>',context!)
    };

    getTypeName() => "SolverModelStandaloneRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev_optimization.power.dev', types: <String, TypeInfo> {
    'SolverModelStandaloneRequest': TypeInfo(TypeOf.Class, create:() => SolverModelStandaloneRequest()),
});

Dart SolverModelStandaloneRequest DTOs

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

HTTP + JSV

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

POST /solver-model/standalone HTTP/1.1 
Host: dev-optimization.power.dev 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	batteryCapacity: 0,
	nameplateCapacity: 0,
	chargingEfficiency: 0,
	dischargingEfficiency: 0,
	minProfitPerMw: 0,
	maxDailCycle: 0,
	restingLossRate: 0,
	operationLossRate: 0
}