ommx.testing#

Submodules#

Classes#

DataType

Numeric type used to generate the matrix and solution of a test LP.

SingleFeasibleLPGenerator

Package Contents#

class DataType(*args, **kwds)#

Numeric type used to generate the matrix and solution of a test LP.

FLOAT#
INT#
class SingleFeasibleLPGenerator(n: int, data_type: DataType)#
get_v1_instance() → Instance#

Get an instance of a linear programming problem with a unique solution.

Examples:
>>> from ommx.testing import DataType, SingleFeasibleLPGenerator
>>> generator = SingleFeasibleLPGenerator(3, DataType.INT)
>>> ommx_instance = generator.get_v1_instance()
get_v1_state() → State#

Get the solution state of the generated instance.

Examples:
>>> from ommx.testing import DataType, SingleFeasibleLPGenerator
>>> generator = SingleFeasibleLPGenerator(3, DataType.INT)
>>> ommx_state = generator.get_v1_state()
FLOAT_LOWER_BOUND = -100.0#
FLOAT_UPPER_BOUND = 100.0#
INT_LOWER_BOUND = -100#
INT_UPPER_BOUND = 100#