How to solve a system of inequalities?

前端 未结 4 1320
闹比i
闹比i 2021-02-10 09:22

I\'ve reduced my problem (table layout algorithm) to the following problem:

Imagine I have N variables X1, X2, ..., XN. I also have some

4条回答
  •  [愿得一人]
    2021-02-10 10:03

    What you have there is a pretty basic Linear Programming problem. You want to maximize the equation X_1 + ... + X_n subject to

    X_1 >= 2
    X_2 + X_3 >= 13
    etc.
    

    There are numerous algorithms to solve this type of problem. The most well known is the Simplex algorithm which will solve your equation (with certain caveats) quite efficiently in the average case, although there exist LP problems for which the Simplex algorithm will require exponentially many steps to solve (in the problem size).

    Various implementations of LP solvers exist. For example LP_Solve should satisfy most of your requirements

提交回复
热议问题