public class MpsGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static int[] |
colLengths |
static int[] |
colStarts |
static String |
OBJ |
static String |
OBJ_ID |
| Constructor and Description |
|---|
MpsGenerator(Problem problem,
int objectiveDirection,
javax.constraints.impl.AbstractConstrainedVariable objectiveVar,
File file) |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(double d)
Returns a formatted string representation of the passed double value,
|
static String |
format(double d,
String fmt)
Returns a formatted string representation of the passed double value,
|
void |
generate()
Creates a .mps format representation of this linear problem and places it
within the passed file parameter of the constructor.
|
static String |
getRealFormat()
Sets the output format for displaying decimal values.
|
int |
getRowCount() |
void |
incrementRowCount() |
boolean |
isIntegerVariablesOnly() |
void |
setIntegerVariablesOnly(boolean integerVariablesOnly) |
static void |
setRealFormat(String fmt)
Sets the output format for displaying decimal values.
|
public static final String OBJ
public static final String OBJ_ID
public static final int[] colStarts
public static final int[] colLengths
public int getRowCount()
public void incrementRowCount()
public boolean isIntegerVariablesOnly()
public void setIntegerVariablesOnly(boolean integerVariablesOnly)
public void generate()
public static String format(double d, String fmt)
d - the double to formatfmt - the desired formattingpublic static String format(double d)
d - the double to formatpublic static void setRealFormat(String fmt)
fmt - the new formatpublic static String getRealFormat()
Copyright © 2024. All rights reserved.