Errors

exception BendersError(message=None, **kwargs)[source]

Bases: Exception

Base class for exceptions in benderslib.

code = None
description = 'A generic error in the BendersLib library.'
exception BendersSolverError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the solver.

code = 1000
description = 'An error occurred during the Benders decomposition algorithm.'
exception BendersBackendError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the backend solver.

code = 2000
description = 'An error occurred in the backend solver.'
exception BendersNotImplementedError(message=None, **kwargs)[source]

Bases: BendersBackendError, NotImplementedError

Exception raised for unimplemented features or when the underlying solver does not support the functionality.

This can be caused by:

  • Using a Constraint Programming (CP) solver for master problems.

  • Using CP solver for subproblems in dual-based Benders methods.

  • The underlying solvers lacking certain features required by BendersLib.

code = 2001
description = 'This is not yet implemented in BendersLib.'
exception BendersMasterError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the master problem.

code = 3000
description = 'An error occurred in the master problem.'
exception UnexpectedMasterStatusError(message=None, **kwargs)[source]

Bases: BendersMasterError

Exception raised when the master problem solver returns an unexpected status.

code = 3001
description = 'The master problem solver returned an unexpected status.'
exception MismatchedProbabilityError(message=None, **kwargs)[source]

Bases: BendersMasterError

Exception raised when the number of estimator variables does not match the number of scenarios.

code = 3002
description = 'The number of estimator variables does not match the number of scenarios.'
exception BendersSubError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the subproblem.

code = 4000
description = 'An error occurred in the subproblem.'
exception UnexpectedSubStatusError(message=None, **kwargs)[source]

Bases: BendersSubError

Exception raised when the subproblem solver returns an unexpected status.

code = 4001
description = 'The subproblem solver returned an unexpected status.'
exception BendersCutError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the cut generation.

code = 5000
description = 'An error occurred during cut generation.'
exception UnsupportedCutError(message=None, **kwargs)[source]

Bases: BendersCutError

Exception raised when an unsupported cut type is used.

code = 5001
description = 'The specified cut type is not supported.'
exception BendersCallbackError(message=None, **kwargs)[source]

Bases: BendersError

Exception raised for errors in the callback functions.

code = 6000
description = 'An error occurred in a callback function.'