|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfuzzydl.milp.MILPHelper
public class MILPHelper
Manager of a MILP problem, storing the inequations and calling an external MILP semantics.
| Field Summary | |
|---|---|
static Bound |
BINARY_VARIABLE
Gets a bound for a binary variable. |
static Bound |
FREE_VARIABLE
Gets a bound for an unrestricted real variable. |
static boolean |
oneMpsFile
Indicates whether to reuse always the same MPS file or to create a new file every time. |
static boolean |
PRINT_LABELS
Indicates whether we want to show the membership degrees to linguistic labels or not. |
static boolean |
PRINT_VARIABLES
Indicates whether we want to show the value of the variables or not. |
ShowVariablesHelper |
showVars
|
static Bound |
UP_BOUND_BY_ONE
Gets an upper bound equal to 1. |
| Constructor Summary | |
|---|---|
MILPHelper()
Default constructor |
|
| Method Summary | |
|---|---|
void |
addNewConstraint(Expression expr,
int constraintType)
Add a new inequality of the form: expr constraintType 0. |
void |
addNewConstraint(Expression expr,
int constraintType,
Degree degree)
Add a new inequality of the form: expr constraintType degree. |
void |
addStringFeature(java.lang.String role)
Adds a string feature. |
void |
addStringValue(java.lang.String value,
int intValue)
Relates the value of a string feature with an integer value. |
MILPHelper |
clone()
|
Variable |
getNewVariable(Bound bound)
Gets a new variable with the indicated bound. |
Variable |
getVariable(java.lang.String varName)
Gets a variable with the given name, creating a new one of type UP_BOUND_BY_ONE if it did not exist. |
Variable |
getVariable(java.lang.String varName,
Bound bound)
Gets a variable with the indicated bound. |
static Bound |
INT_VARIABLE(int k1)
Gets an integer bound with value k1. |
Solution |
optimize(Expression objective)
It optimizes an expression. |
void |
printInstanceOfLabels(java.lang.String fName,
java.lang.String indName,
double value)
Shows the membership degrees to some linguistic labels. |
void |
setObjective(Expression objective)
States the objective to be MILP problem. |
static void |
useOneMpsFile(boolean oneFile)
Indicates whether the semantics uses always the same MPS file or not. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean oneMpsFile
public static final Bound UP_BOUND_BY_ONE
public static final Bound BINARY_VARIABLE
public static final Bound FREE_VARIABLE
public static boolean PRINT_VARIABLES
public static boolean PRINT_LABELS
public ShowVariablesHelper showVars
| Constructor Detail |
|---|
public MILPHelper()
| Method Detail |
|---|
public static final Bound INT_VARIABLE(int k1)
k1 - Value of the bound.
public static void useOneMpsFile(boolean oneFile)
oneFile - True if the semantics uses always the same MPS file.public MILPHelper clone()
clone in class java.lang.Object
public Solution optimize(Expression objective)
throws FuzzyOntologyException
objective - Expression to be optimized.
FuzzyOntologyException
public void printInstanceOfLabels(java.lang.String fName,
java.lang.String indName,
double value)
fName - Name of the feature.indName - Name of the individual.value - Value of the feature for the given individual.public Variable getNewVariable(Bound bound)
bound - A bound for the variable.
public Variable getVariable(java.lang.String varName,
Bound bound)
bound - A bound for the variable.
public Variable getVariable(java.lang.String varName)
varName - Name of the variable.
public void addNewConstraint(Expression expr,
int constraintType)
expr - An expression in the left side of the inequality.constraintType - Type of the constraint (EQ, GR, LE).
public void addNewConstraint(Expression expr,
int constraintType,
Degree degree)
expr - An expression in the left side of the inequality.constraintType - Type of the constraint (EQ, GR, LE).degree - A degree in the left side of the inequality.public void setObjective(Expression objective)
objective - An objective expression to be optimized.public void addStringFeature(java.lang.String role)
role - A string feature.
public void addStringValue(java.lang.String value,
int intValue)
value - Value of a string feature.intValue - Corresponding integer value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||