milp_ex1

milp_ex1()

milp_ex1() - Example of mixed-integer linear program (MILP) optimization.

Example of using MP-Opt-Model to build and solve an optimization model, in this case, a mixed-integer, linear programming (MILP) problem.

Multi-Plant Production and Distribution Example Problem

A company operates two production plants and needs to satisfy customer demand for two products, Y and Z.

  • Plants can be opened or closed.

  • Each plant incurs a fixed cost if it is used.

  • Each plant has a capacity limit (maximum total units it can ship).

  • Products must be shipped from plants to customers.

  • Products are produced as needed for shipping, with no extra inventory.

  • Delivery costs depend on the plant, customer, and product and include production and shipping.

  • All customer demand must be fully satisfied (no shortages allowed).

  • Shipping from a plant is only allowed if that plant is open.

Goals

The goal is to decide:

  • Which plants to open.

  • How much of each product to ship from each open plant to each customer.

To minimize total cost:

  • Sum of plant fixed costs (if used)

  • Plus delivery costs for all products shipped