Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Power operator is_kind_of does not work on positive integers #95

Description

@Wout4

the power operator seems to think that an integer to the power of another (positive) integer is not a kind of integer.
This leads to an error when doing something like the following:

from docplex.cp.model import *
mdl = CpoModel()
x = integer_var_list(3, 1, 10, "X")
mdl.add(( x[0] ** x[1]) // x[2])

Because the division only accepts integer expressions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions