Class OpbParser

Namespace
LogicalOptimizer
Assembly
LogicalOptimizer.Formats.dll

Streaming parser for the OPB (pseudo-Boolean) format: comment lines (including the #variable= N #constraint= M header), an optional linear objective min: +c1 x1 -c2 x2 ... ;, and linear constraints +c1 x1 -c2 x2 ... OP b ; with OP one of >=, <=, =. Variables are written x<n> and may be negated as ~x<n>; a statement may span several lines up to its terminating ;. Reads line by line and never materializes the whole input; budget/variable overruns raise ComputationBudgetExceededException and other malformation raises FormatParseException.

public static class OpbParser
Inheritance
OpbParser
Inherited Members

Methods

Parse(TextReader, ResourceBudget?, CancellationToken)

public static PseudoBooleanProblem Parse(TextReader reader, ResourceBudget? budget = null, CancellationToken cancellationToken = default)

Parameters

reader TextReader
budget ResourceBudget
cancellationToken CancellationToken

Returns

PseudoBooleanProblem