jInfer

cz.cuni.mff.ksi.jinfer.iss.heuristics.construction.glpk
Class GlpkInputGenerator

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.iss.heuristics.construction.glpk.GlpkInputGenerator

public final class GlpkInputGenerator
extends Object

Utility class for conversion from AMModel to GLPK MathProg plaintext format.


Method Summary
static String generateGlpkInput(AMModel model, double alpha, double beta)
           
static String generateGlpkInput(AMModel model, double alpha, double beta, List<AttributeMappingId> incumbentAMs, long k)
          Generates a GLPK MathProg representation of the ID set optimization for the provided model, in this variant specifically for Local Branching heuristic.
static String generateGlpkInput(AMModel model, List<AttributeMappingId> fixed, double alpha, double beta)
          Generates a GLPK MathProg representation of the ID set optimization for the provided model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateGlpkInput

public static String generateGlpkInput(AMModel model,
                                       double alpha,
                                       double beta,
                                       List<AttributeMappingId> incumbentAMs,
                                       long k)
                                throws IOException,
                                       InterruptedException
Generates a GLPK MathProg representation of the ID set optimization for the provided model, in this variant specifically for Local Branching heuristic.

Please see generateGlpkInput(AMModel, List, double, double) for general info.

This variant will add one more constraint to ensure the Hamming distance from the incumbent solution in the form:
SUMI (1 - ami) + SUMJ amj <= k
where I is the set of AMs in the incumbent solution, J is the set of remaining AMs in the model.

Parameters:
model - Model from which the problem formulation should be generated.
alpha - Weight of the attribute mapping support in its total weight.
beta - Weight of the attribute mapping coverage in its total weight.
incumbentAMs - List of AMs contained in the currently incumbent solution.
k - Maximal Hamming distance from the specified incumbent solution.
Returns:
String representation of the problem formulation in MathProg language, that can be directly passed to GLPK Solver.
Throws:
IOException
InterruptedException
See Also:
LocalBranching

generateGlpkInput

public static String generateGlpkInput(AMModel model,
                                       double alpha,
                                       double beta)
                                throws IOException,
                                       InterruptedException
Throws:
IOException
InterruptedException
See Also:
generateGlpkInput(cz.cuni.mff.ksi.jinfer.iss.objects.AMModel, java.util.List, double, double)

generateGlpkInput

public static String generateGlpkInput(AMModel model,
                                       List<AttributeMappingId> fixed,
                                       double alpha,
                                       double beta)
                                throws IOException,
                                       InterruptedException
Generates a GLPK MathProg representation of the ID set optimization for the provided model. In this representation, we need to provide variables, constraints and the objective function.

Parameters:
model - Model from which the problem formulation should be generated.
alpha - Weight of the attribute mapping support in its total weight.
beta - Weight of the attribute mapping coverage in its total weight.
fixed - List of attribute mappings that should be present in the solution (their value is fixed to 1).
Returns:
String representation of the problem formulation in MathProg language, that can be directly passed to GLPK Solver.
Throws:
IOException
InterruptedException

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011