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) |
void |
decode(int[] model,
PrintWriter out) |
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, skipSpaces
isVerbose, parseInstance, setVerbosity
protected int nbNewSymbols
public OPBReader2007(IPBSolver solver)
solver
- protected boolean isGoodFirstCharacter(char c)
isGoodFirstCharacter
in class OPBReader2005
protected void checkId(StringBuffer s) throws ParseFormatException
checkId
in class OPBReader2005
ParseFormatException
protected void readTerm(StringBuffer coeff, StringBuffer var) throws IOException, ParseFormatException
OPBReader2006
readTerm
in class OPBReader2006
coeff
- the coefficient of the variablevar
- the indentifier we readIOException
ParseFormatException
protected 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.ParseFormatException
protected 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 OPBReader2005
IOException
ParseException
ParseFormatException
protected int translateVarToId(String var) throws ParseFormatException
translateVarToId
in class OPBReader2005
ParseFormatException
public String decode(int[] model)
decode
in class OPBReader2005
public void decode(int[] model, PrintWriter out)
decode
in class OPBReader2005
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.