Catalano.Math.Optimization
Class MixedIntegerLinearProgramming
- java.lang.Object
-
- Catalano.Math.Optimization.MixedIntegerLinearProgramming
-
public class MixedIntegerLinearProgramming extends java.lang.ObjectMixed Integer Linear Programming. Branch and Bound method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classMixedIntegerLinearProgramming.ObjectiveObjective of the function.
-
Field Summary
Fields Modifier and Type Field and Description static intINFEASIBLEThe solution is infeasible.static intOPTIMALThe solution exists.static intUNBOUNDEDThe solution is unbounded.
-
Constructor Summary
Constructors Constructor and Description MixedIntegerLinearProgramming(MixedIntegerLinearProgramming.Objective objective)Initialize a new instance of the MixedIntegerLinearProgramming class.MixedIntegerLinearProgramming(MixedIntegerLinearProgramming.Objective objective, double tol)Initialize a new instance of the MixedIntegerLinearProgramming class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getCoefficients()Get the coefficients.doublegetSolution()Get the solution.voidsetType(int[] type)Set type.intSolve(double[] function, java.util.List<Constraint> constraint)Solve the problem.
-
-
-
Field Detail
-
INFEASIBLE
public static final int INFEASIBLE
The solution is infeasible.- See Also:
- Constant Field Values
-
OPTIMAL
public static final int OPTIMAL
The solution exists.- See Also:
- Constant Field Values
-
UNBOUNDED
public static final int UNBOUNDED
The solution is unbounded.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MixedIntegerLinearProgramming
public MixedIntegerLinearProgramming(MixedIntegerLinearProgramming.Objective objective)
Initialize a new instance of the MixedIntegerLinearProgramming class.- Parameters:
objective- Objective.
-
MixedIntegerLinearProgramming
public MixedIntegerLinearProgramming(MixedIntegerLinearProgramming.Objective objective, double tol)
Initialize a new instance of the MixedIntegerLinearProgramming class.- Parameters:
objective- Objective.tol- Tolerance for round the integer.
-
-
Method Detail
-
setType
public void setType(int[] type)
Set type. 1 means integer, 0 means double.- Parameters:
type- Type.
-
getCoefficients
public double[] getCoefficients()
Get the coefficients.- Returns:
- Coefficients.
-
getSolution
public double getSolution()
Get the solution.- Returns:
- Solution.
-
Solve
public int Solve(double[] function, java.util.List<Constraint> constraint)Solve the problem.- Parameters:
function- Function.constraint- List of constraints.- Returns:
- Status of the MILP.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG