Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Integer Variables #20

Open
james-bryce opened this issue Aug 4, 2019 · 3 comments
Open

Integer Variables #20

james-bryce opened this issue Aug 4, 2019 · 3 comments

Comments

@james-bryce
Copy link

Hello,

Is it possible to force variable values to be integers?

For example, I want the value to be either 0 or 1 (nothing in between).

Thanks!

@IjzerenHein
Copy link
Owner

Hi. No that's not possible. Why would you want this btw?

@mreinstein
Copy link

There are lotos of cases where this could be potentially useful. You're computing layout and want whole integer values for pixel coordinates, etc. Why is it impossible?

@joshpoll
Copy link

Linear programming with integer constraints is known as (mixed) integer linear programming (MILP or ILP). While linear programming problems can be solved in polynomial time, ILP is NP-complete. ILP solvers are based on linear programming solvers, but with significant added complexity. I think it's out of the scope of Kiwi (and other Cassowary solvers) to handle ILP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants