public class OPBReader2007 extends OPBReader2006
| Modifier and Type | Field and Description |
|---|---|
protected int |
nbNewSymbols
contains the number of new symbols generated to linearize products
|
coeffs, d, hasObjFunc, hasVariablesExplanation, lits, nbConstr, nbConstraintsRead, nbVars, operator, solver| Constructor and Description |
|---|
OPBReader2007(IPBSolver solver) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkId(StringBuffer s) |
String |
decode(int[] model)
Produce a model using the reader format.
|
void |
decode(int[] model,
PrintWriter out)
Produce a model using the reader format on a provided printwriter.
|
protected boolean |
isGoodFirstCharacter(char c) |
protected void |
literalInAProduct(String var,
IVecInt lits)
callback called when we read a term of a constraint
|
protected void |
negateLiteralInAProduct(String var,
IVecInt lits)
callback called when we read a term of a constraint
|
protected void |
readMetaData()
read the first comment line to get the number of variables and the number
of constraints in the file calls metaData with the data that was read
|
protected void |
readTerm(StringBuffer coeff,
StringBuffer var)
read a term into coeff and var
|
protected int |
translateVarToId(String var) |
beginConstraint, beginObjective, constraintRelOp, constraintRightTerm, endConstraint, endObjective, eof, eol, get, getCoeffs, getListOfVariables, getObjectiveFunction, getVars, isGoodFollowingCharacter, metaData, parse, parseInstance, parseInstance, parseInstance, putback, readConstraint, readIdentifier, readInteger, readObjective, readVariablesExplanation, readWord, skipSpacesisVerbose, parseInstance, setVerbosityprotected int nbNewSymbols
public OPBReader2007(IPBSolver solver)
solver - protected boolean isGoodFirstCharacter(char c)
isGoodFirstCharacter in class OPBReader2005protected void checkId(StringBuffer s) throws ParseFormatException
checkId in class OPBReader2005ParseFormatExceptionprotected void readTerm(StringBuffer coeff, StringBuffer var) throws IOException, ParseFormatException
OPBReader2006readTerm in class OPBReader2006coeff - the coefficient of the variablevar - the indentifier we readIOExceptionParseFormatExceptionprotected void literalInAProduct(String var, IVecInt lits) throws ParseFormatException
var - the identifier of the variablelits - a set of literals in DIMACS format in which var once
translated will be added.ParseFormatExceptionprotected void negateLiteralInAProduct(String var, IVecInt lits)
var - the identifier of the variablelits - a set of literals in DIMACS format in which var once
translated will be added.protected void readMetaData()
throws IOException,
ParseFormatException
readMetaData in class OPBReader2005IOExceptionParseExceptionParseFormatExceptionprotected int translateVarToId(String var) throws ParseFormatException
translateVarToId in class OPBReader2005ParseFormatExceptionpublic String decode(int[] model)
Readerdecode in class OPBReader2005model - a model using the Dimacs format.public void decode(int[] model,
PrintWriter out)
Readerdecode in class OPBReader2005model - a model using the Dimacs format.out - the place where to display the modelCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.