public class JSONPBReader extends JSONReader<IPBSolver>
[['min',[[1,1],[20,2],[80,3]]],[-1,-2,-3],[[1,-2,3],'>',2],[4,-3,6],[[[1,1],[2,2],[4,3],[8,4]],'<=',6]
represents an optimization problem with an objective function, min: x1 + 20
x2, four constraints with two clauses, a cardinality constraint and the
pseudo boolean constraint 1 x1 + 2 x2 + 4 x3 + 8 x4 <= 6.Modifier and Type | Field and Description |
---|---|
static String |
OBJECTIVE_FUNCTION |
static Pattern |
OBJECTIVE_FUNCTION_PATTERN |
static String |
PB |
static Pattern |
PSEUDO_PATTERN |
static String |
WCLAUSE |
static Pattern |
WCLAUSE_PATTERN |
static String |
WLITERAL |
static Pattern |
WLITERAL_PATTERN |
CARD, CLAUSE, constraint, formula, solver
Constructor and Description |
---|
JSONPBReader(IPBSolver solver) |
Modifier and Type | Method and Description |
---|---|
protected String |
constraintRegexp() |
protected void |
handleNotHandled(String constraint) |
decode, decode, getLiterals, handleCard, parseInstance, parseString
isVerbose, parseInstance, parseInstance, setVerbosity
public static final String WLITERAL
public static final String WCLAUSE
public static final String PB
public static final String OBJECTIVE_FUNCTION
public static final Pattern PSEUDO_PATTERN
public static final Pattern WCLAUSE_PATTERN
public static final Pattern WLITERAL_PATTERN
public static final Pattern OBJECTIVE_FUNCTION_PATTERN
public JSONPBReader(IPBSolver solver)
protected void handleNotHandled(String constraint) throws ParseFormatException, ContradictionException
handleNotHandled
in class JSONReader<IPBSolver>
ParseFormatException
ContradictionException
protected String constraintRegexp()
constraintRegexp
in class JSONReader<IPBSolver>
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.