Package io.openems.edge.ess.power.api
Class Constraint
- java.lang.Object
-
- io.openems.edge.ess.power.api.Constraint
-
public class Constraint extends java.lang.Object
Creates a constraint with following settings:.- Relationship (EQ, GEQ, LEQ) as given in constructor
- Value as given in constructor
- Setting each coefficient, i.e.
y = 1*p1 + 0*q1 * + 1*p2 + 0*q1 +...
-
-
Constructor Summary
Constructors Constructor Description Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship)
Creates an initially disabled Constraint.Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship, double value)
Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship, java.util.Optional<java.lang.Double> value)
Constraint(java.lang.String description, java.util.List<LinearCoefficient> coefficients, Relationship relationship, double value)
Constraint(java.lang.String description, java.util.List<LinearCoefficient> coefficients, Relationship relationship, java.util.Optional<java.lang.Double> value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable()
Disable thisConstraint
.LinearCoefficient[]
getCoefficients()
java.lang.String
getDescription()
Relationship
getRelationship()
java.util.Optional<java.lang.Double>
getValue()
void
setValue(double value)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Constraint
public Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship, double value)
-
Constraint
public Constraint(java.lang.String description, java.util.List<LinearCoefficient> coefficients, Relationship relationship, double value)
-
Constraint
public Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship)
Creates an initially disabled Constraint.- Parameters:
description
- the descriptioncoefficients
- array ofLinearCoefficient
srelationship
- theRelationship
-
Constraint
public Constraint(java.lang.String description, LinearCoefficient[] coefficients, Relationship relationship, java.util.Optional<java.lang.Double> value)
-
Constraint
public Constraint(java.lang.String description, java.util.List<LinearCoefficient> coefficients, Relationship relationship, java.util.Optional<java.lang.Double> value)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
-
getCoefficients
public LinearCoefficient[] getCoefficients()
-
getRelationship
public Relationship getRelationship()
-
getValue
public java.util.Optional<java.lang.Double> getValue()
-
setValue
public void setValue(double value)
-
disable
public void disable()
Disable thisConstraint
.
-
-