Interface IPProblem
-
- All Superinterfaces:
ConstrainedOptimProblem
,OptimProblem
- All Known Subinterfaces:
ILPProblem
- All Known Implementing Classes:
BruteForceIPProblem
,ILPProblemImpl1
,IPProblemImpl1
,PureILPProblem
public interface IPProblem extends ConstrainedOptimProblem
An Integer Programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers. \[ \min_x f(x) \textrm{ s.t.,} \\ h_i(x) = 0 \\ g_i(x) \leq 0 \] Some {xi} are integers.- See Also:
- Wikipedia: Integer programming
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
epsilon()
Get the threshold to check whether a variable is an integer.int[]
getIntegerIndices()
Get the indices of the integral variables.int[]
getNonIntegralIndices(double[] x)
Check which elements in x do not satisfy the integral constraints.-
Methods inherited from interface dev.nm.solver.multivariate.constrained.problem.ConstrainedOptimProblem
getEqualityConstraints, getLessThanConstraints
-
Methods inherited from interface dev.nm.solver.problem.OptimProblem
dimension, f
-
-
-
-
Method Detail
-
getIntegerIndices
int[] getIntegerIndices()
Get the indices of the integral variables.- Returns:
- the integral variable indices
-
getNonIntegralIndices
int[] getNonIntegralIndices(double[] x)
Check which elements in x do not satisfy the integral constraints. The indices count from 1.- Parameters:
x
- an argument to the objective function- Returns:
- the set of indices of values in x that do not satisfy the integral constraints.
An
int[]
of length 0 indicates that all integral variables in x are integers.
-
epsilon
double epsilon()
Get the threshold to check whether a variable is an integer.- Returns:
- the precision parameter: when a number |x| ≤ ε, it is considered 0
-
-