简体   繁体   中英

Solving rational number Linear Programming problem in Python

I have an LP with integer constraints that I want to solve in exact arithmetic, using Python. In fact, I only need a feasible point.

Edit: "Exact arithmetic" here means rational numbers, of unbounded enumerator and denominator.

Previous attempts:

Speed is only a moderate issue. My larger instances have about 500 variables with box-constraints and 40 equalities, but the numbers involved might be large.

Maybe I am missing the point but any Linear Programming task where you want rational number solution is in fact an Integer Programming problem where you find LCD (Least Common Denominator) for all of the fractional variables and agree the numerators which you later use as integers. So, it seems like the problem only needs reformulation and you can get the exact solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM