PWL
- java.lang.Object
-
- com.dashoptimization.objects.PWL
-
-
Nested Class Summary
Modifier and Type Class Description static class
PWL.Definition
A piecewise linear function constraint.
-
Method Summary
Modifier and Type Method Description int
compareTo(PWL other)
boolean
equals(java.lang.Object other)
PwlBreakpoint[]
getBreakpoints()
Get the breakpoints for this piecewise linear constraint.int
getIndex()
Get the index that this object has in the underlying model.int
getIndexForProb(XpressProblem xprob)
Get the index stored in this object but raise an exception if the problem that created this object is notprob
.Variable
getInput()
Get the input for this piecewise linear constraint.java.lang.String
getName()
Get the name of this object.XpressProblem
getProblem()
Get the problem to which this element belongs.Variable
getResultant()
Get the resultant for this piecewise linear constraint.int
hashCode()
PWL
setName(java.lang.String newName)
Set the name of this PWL.void
updateIndex(int delta)
-
-
-
Method Detail
-
getIndex
public int getIndex()
Get the index that this object has in the underlying model. Attention: this is a very advanced function. Use it only if you know exactly what you are doing.Used in these examples:
- GlobalObjectiveParametrics
- GlobalRHSParametrics
-
updateIndex
public void updateIndex(int delta)
- Specified by:
-
updateIndex
in interfaceIndex
- Parameters:
-
delta
- The value to add to the index. - Since:
- 43.00
-
getIndexForProb
public int getIndexForProb(XpressProblem xprob)
Get the index stored in this object but raise an exception if the problem that created this object is notprob
.- Specified by:
-
getIndexForProb
in interfaceIndex
- Parameters:
-
xprob
- The problem for which the index is queried. If this object does not belong toprob
then an execption is raised. - Returns:
-
The low-level index for this object in
prob
. - Since:
- 43.00
-
getProblem
public XpressProblem getProblem()
Get the problem to which this element belongs.- Specified by:
-
getProblem
in interfaceIndex
- Returns:
-
The problem to which this element belongs. This will be
null
if the element was deleted. - Since:
- 43.00
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
-
equals
in classjava.lang.Object
- Parameters:
-
other
- - Returns:
- Since:
- 43.00
-
compareTo
public final int compareTo(PWL other)
- Specified by:
-
compareTo
in interfacejava.lang.Comparable<PWL>
- Parameters:
-
other
- - Returns:
- Since:
- 43.00
-
hashCode
public final int hashCode()
- Overrides:
-
hashCode
in classjava.lang.Object
-
getInput
public Variable getInput()
Get the input for this piecewise linear constraint. Queries thecom.dashoptimization.objects.XpressProblem
instance to which this pwl belongs and returns the input obtained from that instance.- Returns:
- This pwl's input
- Since:
- 43.00
-
getResultant
public Variable getResultant()
Get the resultant for this piecewise linear constraint. Queries thecom.dashoptimization.objects.XpressProblem
instance to which this pwl belongs and returns the resultant obtained from that instance.- Returns:
- This pwl's resultant.
- Since:
- 43.00
-
getBreakpoints
public PwlBreakpoint[] getBreakpoints()
Get the breakpoints for this piecewise linear constraint. Queries thecom.dashoptimization.objects.XpressProblem
instance to which this pwl belongs and returns the breakpoints obtained from that instance.- Returns:
- This pwl's breakpoints.
- Since:
- 43.00
-
getName
public java.lang.String getName()
Get the name of this object. Queries the problem instance that owns this object and returns the name from that instance.
-
setName
public PWL setName(java.lang.String newName)
Set the name of this PWL. Sets the name of this PWL in the problem instance that owns the object.- Parameters:
-
newName
- The name to be set. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
-
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.