Skip to content

pumpkin does not support exponentiation or modulo division #795

@OrestisLomis

Description

@OrestisLomis

Currently the following models give a NotImplementedError:

`
model = cp.Model()

vars = cp.intvar(0,10,shape=2)

model += ((vars[0] % 4) == vars[1])

model.solve(solver="pumpkin")
`

`
model = cp.Model()

vars = cp.intvar(0,10,shape=2)

model += ((vars[0] % 4) == vars[1])

model.solve(solver="pumpkin")
`

This is because we do not linearize constraints for pumpkin, but exponentiation or modulo division are also not natively supported in pumpkin.
I'm making a PR that linearizes the constraints and in the future this can maybe use the native constraints in pumpkin

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