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 java.lang.String |
OBJECTIVE_FUNCTION |
static java.util.regex.Pattern |
OBJECTIVE_FUNCTION_PATTERN |
static java.lang.String |
PB |
static java.util.regex.Pattern |
PSEUDO_PATTERN |
static java.lang.String |
WCLAUSE |
static java.util.regex.Pattern |
WCLAUSE_PATTERN |
static java.lang.String |
WLITERAL |
static java.util.regex.Pattern |
WLITERAL_PATTERN |
CARD, CLAUSE, constraint, formula, solver| Constructor and Description |
|---|
JSONPBReader(IPBSolver solver) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
constraintRegexp() |
protected void |
handleNotHandled(java.lang.String constraint) |
decode, decode, getLiterals, handleCard, parseInstance, parseStringisVerbose, parseInstance, parseInstance, setVerbositypublic static final java.lang.String WLITERAL
public static final java.lang.String WCLAUSE
public static final java.lang.String PB
public static final java.lang.String OBJECTIVE_FUNCTION
public static final java.util.regex.Pattern PSEUDO_PATTERN
public static final java.util.regex.Pattern WCLAUSE_PATTERN
public static final java.util.regex.Pattern WLITERAL_PATTERN
public static final java.util.regex.Pattern OBJECTIVE_FUNCTION_PATTERN
public JSONPBReader(IPBSolver solver)
protected void handleNotHandled(java.lang.String constraint)
throws ParseFormatException,
ContradictionException
handleNotHandled in class JSONReader<IPBSolver>ParseFormatExceptionContradictionExceptionprotected java.lang.String constraintRegexp()
constraintRegexp in class JSONReader<IPBSolver>