Class RatingValue
java.lang.Object
energy.trolie.client.model.common.RatingValue
Representation of a rating value, given the various units that are possible under the TROLIE specification.
In most cases, users may be able to assume the units used for ratings in a particular exchange. For example, ISO New England, SPP and MISO all normalize ratings to MVA. However, if this is not the case, the rating units are introspectable. Clients may wish to write defensive code as appropriate to the actual units of a given exchange.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RatingValue
fromAmps
(float amps) Construct from an amps valuestatic RatingValue
fromMva
(float mva) Construct from an MVA valuestatic RatingValue
fromMwAndPf
(float mw, float pf) Construct from a megawatt and power factor ratio combinationgetAMPS()
Gets the rating in ampsgetMVA()
Gets the rating in MVAGets the rating in a MW and PF pairgetUnits()
Determines the units of this rating valuestatic RatingValue
ofMappedJson
(Map<String, Float> values) Construct from raw Json
-
Method Details
-
ofMappedJson
Construct from raw Json- Parameters:
values
- map representing a JSON map as defined in the TROLIE specification- Returns:
- new instance
-
fromMva
Construct from an MVA value- Parameters:
mva
- rating value in megavolt amperes- Returns:
- new instance
-
fromAmps
Construct from an amps value- Parameters:
amps
- rating value in amperes- Returns:
- new instance
-
fromMwAndPf
Construct from a megawatt and power factor ratio combination- Parameters:
mw
- rating value in megawattspf
- assumed power factor ratio from 0 to 1- Returns:
- new instance
-
getUnits
Determines the units of this rating value- Returns:
- the units used to represent this particular rating value. Will return null if the units are unknown to the SDK.
-
getMVA
Gets the rating in MVA- Returns:
- returns the rating in MVA if that is the units. Otherwise, returns null.
-
getAMPS
Gets the rating in amps- Returns:
- returns the rating in amps if that is the units. Otherwise, returns null.
-
getMWAndPF
Gets the rating in a MW and PF pair- Returns:
- returns the rating in MW and PF pair if that is the units. Otherwise, returns null.
-