• This function is used to calculate the dual bound of an optimization problem, which can either be a maximization or minimization problem.

    Parameters

    • dualBound: string | number

      The dual bound of the problem. This value can be a number or a string. If it's a string, it can represent a number, 'NA', 'nan', 'inf', '+inf', '-inf', '-nan', or an empty string.

    • direction: string

      The optimization direction, which can either be 'max' for maximization problems or 'min' for minimization problems.

    Returns number | string

    • Returns a numerical value based on the input dualBound. If the dual bound is an empty string, 'na', 'nan', or '-nan', it returns Infinity for 'max' direction and -Infinity for 'min' direction. If the dual bound is 'inf' or '+inf', it returns Infinity, and for '-inf', it returns -Infinity. Otherwise, it converts the dual bound into a number.

    Export

Generated using TypeDoc