|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.econcs.jopt.solver.mip.MIP
edu.harvard.econcs.jopt.solver.mip.MIPWrapper
public class MIPWrapper
This wrapper goes even further in simplicity than the other MIP classes and might help you get started with your MIP programming. See ExampleSimpleWrapper.java for an example.
Field Summary |
---|
Fields inherited from class edu.harvard.econcs.jopt.solver.mip.MIP |
---|
MAX_VALUE |
Constructor Summary | |
---|---|
MIPWrapper()
|
Method Summary | |
---|---|
Constraint |
beginNewEQConstraint(double constant)
Creates a new Less Equals constraint |
Constraint |
beginNewGEQConstraint(double constant)
Creates a new Less Than or Equals constraint |
Constraint |
beginNewLEQConstraint(double constant)
Creates a new Less Than or Equals constraint This example makes a constraint "-2y <= 3" (assumes earlier call like:MIPWrapper mip = makeNewMaxMIP(), and a Variable y) Constraint c = beginNewLEQConstraint(3); c.addTerm(y, -2); mip.endConstraint(c); * @param constant is the value that is on the right hand side of the equation. |
void |
endConstraint(Constraint constraint)
Call this when you are done building up a constraint. |
Variable |
makeNewBooleanVar(java.lang.String name)
Makes a new indicator (boolean) variable that can range from 0 to 1 |
Variable |
makeNewDoubleVar(java.lang.String name)
Makes a new double variable that can range from -inf to inf |
Variable |
makeNewIntegerVar(java.lang.String name)
Makes a new Integer variable that can range from -inf to inf |
static MIPWrapper |
makeNewMaxMIP()
Create a new MIP that is has a MAXimization as it's objective function. |
static MIPWrapper |
makeNewMinMIP()
Create a new MIP that is has a MINimization as it's objective function. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MIPWrapper()
Method Detail |
---|
public static MIPWrapper makeNewMaxMIP()
public static MIPWrapper makeNewMinMIP()
public Variable makeNewDoubleVar(java.lang.String name)
public Variable makeNewIntegerVar(java.lang.String name)
public Variable makeNewBooleanVar(java.lang.String name)
public void endConstraint(Constraint constraint)
public Constraint beginNewLEQConstraint(double constant)
public Constraint beginNewGEQConstraint(double constant)
beginNewLEQConstraint
public Constraint beginNewEQConstraint(double constant)
beginNewLEQConstraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |