Main > Reference Manual > Unit tests > TestLPSolver1

This test shows how the linear programming solver is used to solve a capacity allocation problem in an optimal way.

The problem input consists of:

  • A set of time buckets.
  • A set of demands, each with a due bucket, a quantity and a priority.
  • A set of resources, each with an available capacity per time bucket.
  • A set of loads, i.e. demands requiring some time on one or more resources.

The problem is subject to the following constraints:

  • For each time bucket and each resource:
    sum of capacity used by each demand <= capacity available in the resource bucket
  • For each demand:
    sum of planned quantities in different buckets <= requested demand quantity

The LP problem solves for a hierarchy of goals.

  • Minimize the shortness of demand of priorities 1, 2 and 3
  • Minimize the lateness of demand of priorities 1, 2 and 3
  • Minimize the early use of capacity (ie use capacity before the due date)