17.20. test_solver

Test functions of solver.py.

17.20.1. Module Contents

17.20.1.1. Functions

test_solver_list() → None

Expect that at least the GLPK solver is found.

test_interface_str() → None

Test the string representation of solver interfaces.

test_solver_name() → None

Test that the default LP solver name is GLPK.

test_choose_solver(model: Model) → Optional[su.SolverNotFound]

Test that solver switching is working.

test_linear_reaction_coefficients(model: Model) → None

Test that linear coefficients are identifiable in objective.

test_fail_non_linear_reaction_coefficients(model: Model) → None

Test failure of non-linear coefficient identification in reaction.

test_add_remove(model: Model) → None

Test addition and removal of variables and constraints.

test_add_remove_in_context(model: Model) → None

Test addition and removal of variables and constraints within context.

test_absolute_expression(model: Model) → None

Test addition of an absolute expression.

test_fix_objective_as_constraint(solver: str, model: Model) → None

Test fixing present objective as a constraint.

test_fix_objective_as_constraint_minimize(model: Model, solver: str) → None

Test fixing present objective as a constraint but as a minimization.

test_add_lp_feasibility(model: Model, solver: str) → None

Test functionality to ensure LP feasibility.

test_add_lexicographic_constraints(model: Model, solver: str) → None

Test addition of lexicographic constraints.

test_time_limit(large_model: Model) → None

Test time limit while optimizing a model.

test_specialized_solver_warning(solver, caplog)

Test the warning for specialized solvers.

test_solver.stable_optlang = ['glpk', 'cplex', 'gurobi'][source]
test_solver.optlang_solvers[source]
test_solver.test_solver_list() → None[source]

Expect that at least the GLPK solver is found.

test_solver.test_interface_str() → None[source]

Test the string representation of solver interfaces.

test_solver.test_solver_name() → None[source]

Test that the default LP solver name is GLPK.

test_solver.test_choose_solver(model: Model) → Optional[su.SolverNotFound][source]

Test that solver switching is working.

test_solver.test_linear_reaction_coefficients(model: Model) → None[source]

Test that linear coefficients are identifiable in objective.

test_solver.test_fail_non_linear_reaction_coefficients(model: Model) → None[source]

Test failure of non-linear coefficient identification in reaction.

test_solver.test_add_remove(model: Model) → None[source]

Test addition and removal of variables and constraints.

test_solver.test_add_remove_in_context(model: Model) → None[source]

Test addition and removal of variables and constraints within context.

test_solver.test_absolute_expression(model: Model) → None[source]

Test addition of an absolute expression.

test_solver.test_fix_objective_as_constraint(solver: str, model: Model) → None[source]

Test fixing present objective as a constraint.

test_solver.test_fix_objective_as_constraint_minimize(model: Model, solver: str) → None[source]

Test fixing present objective as a constraint but as a minimization.

test_solver.test_add_lp_feasibility(model: Model, solver: str) → None[source]

Test functionality to ensure LP feasibility.

test_solver.test_add_lexicographic_constraints(model: Model, solver: str) → None[source]

Test addition of lexicographic constraints.

test_solver.test_time_limit(large_model: Model) → None[source]

Test time limit while optimizing a model.

test_solver.test_specialized_solver_warning(solver, caplog)[source]

Test the warning for specialized solvers.