AndreyBychkov / QBee

Quadratization of differential equations
MIT License
7 stars 2 forks source link

Dominating monomials in 1D case #8

Closed AndreyBychkov closed 1 year ago

AndreyBychkov commented 1 year ago

In one-dimensional examples like x' = a * x^5 the following exception is raised: AttributeError: 'BranchAndBound' object has no attribute 'dominating_monomials'

This probably happens because of lines 375-385:

        if len(list(poly_system.vars)[0]) > 1:
            points = list()
            for i, eq in poly_system.rhs.items():
                for m in eq:
                    new_m = list(m)
                    new_m[i] = new_m[i] if new_m[i] > 0 else 0
                    points.append(tuple(new_m))
            self.dominating_monomials = set()
            for m in points + list(poly_system.vars):
                if not dominated(m, self.dominating_monomials):
                    self.dominating_monomials.add(m)

This functionality was correct before, so I need to investigate and resolve it. A temporary workaround is to set the calc_upper_bound parameter of functions polyynomialize_and_quadratize and quadratize to False in 1D cases.

pogudingleb commented 1 year ago

What are these dominating monomials?