XPRBrelation
- java.lang.Object
-
- com.dashoptimization.XPRBexpr
-
- com.dashoptimization.XPRBrelation
-
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- XPRBlinRel
public class XPRBrelation extends XPRBexpr
This class represents a relation in BCL.
-
-
Constructor Summary
Constructor and Description XPRBrelation(XPRBexpr l)
XPRBrelation(XPRBexpr l, int type)
Create a linear relation.XPRBrelation(XPRBvar v)
-
Method Summary
Modifier and Type Method and Description void
print()
Print out a (linear or quadratic) relation.java.lang.String
toString()
Provide a string representation of a relation.-
Methods inherited from class com.dashoptimization.XPRBexpr
add, add, add, add, add, add, add, add, addTerm, addTerm, addTerm, addTerm, addTerm, addTerm, assign, clone, delTerm, delTerm, eql, eql, eql, gEql, gEql, gEql, getSol, getStatus, lEql, lEql, lEql, mul, mul, mul, mul, mul, mul, neg, neg, reset, setTerm, setTerm, setTerm, setTerm, setTerm, sqr, sqr
-
-
-
-
Constructor Detail
-
XPRBrelation
public XPRBrelation(XPRBexpr l, int type)
Create a linear relation.XPRBprob expl2; XPRBvar x1; XPRBexpr l1; XPRBrelation lr; expl2 = new XPRBprob("example2"); x1 = expl2.newVar("abc3", XPRB.UI, 1, 100); l1 = new XPRBexpr(3.7, x1); lr = new XPRBrelation(l1, XPRB.G);
- Parameters:
-
l
- linear expression of typeXPRBexpr
-
type
- type of the relation. Possible values:XPRB.L
<= (inequality)XPRB.G
>= (inequality)XPRB.E
= (equation)XPRB.N
non-binding
-
XPRBrelation
public XPRBrelation(XPRBexpr l)
- See Also:
-
XPRBrelation(l, XPRB.N)
-
XPRBrelation
public XPRBrelation(XPRBvar v)
- See Also:
-
XPRBrelation(v, XPRB.N)
-
-
Method Detail
-
print
public void print()
Print out a (linear or quadratic) relation.XPRBprob expl2; XPRBvar x1; XPRBexpr l1; XPRBrelation lr; expl2 = new XPRBprob("example2"); x1 = expl2.newVar("abc3", XPRB.UI, 1, 100); l1 = new XPRBexpr(3.7, x1); lr = new XPRBrelation(l1, XPRB.G); lr.print();
-
toString
public java.lang.String toString()
Provide a string representation of a relation.XPRBprob expl2; XPRBvar x1; XPRBexpr l1; XPRBrelation lr; expl2 = new XPRBprob("example2"); x1 = expl2.newVar("abc3", XPRB.UI, 1, 100); l1 = new XPRBexpr(3.7, x1); lr = new XPRBrelation(l1, XPRB.G); System.out.println(lr.toString());
-
-
© 2001-2019 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.