Initializing help system before first use

Price breaks

All items discount: when buying a certain number of items we get discounts on all items that we buy if the quantity we buy lies in certain price bands.

Intro/pricebreakai

less than B1 COST1 each
≥ B1 and < B2 COST2 each
≥ B2 and < B3 COST3 each

  • Define binary variables bi (i=1,2,3), where bi is 1 if we pay a unit cost of COSTi.
  • Real decision variables xi represent the number of items bought at price COSTi.
  • The quantity bought is given by x= ∑ixi , with a total price of iCOSTi·xi
  • MIP formulation :

    i bi = 1
    x1 ≤ B1· b1
    Bi-1· bi ≤ xi ≤ Bi· bi for i=2,3

    where the variables bi are either defined as binaries, or they form a Special Ordered Set of type 1 (SOS1), where the order is given by the values of the breakpoints Bi.

Incremental pricebreaks: when buying a certain number of items we get discounts incrementally. The unit cost for items between 0 and B1 is C1, items between B1 and B2 cost C2 each, etc.

Intro/pricebrinc2

Formulation with Special Ordered Sets of type 2 (SOS2):

  • Associate real valued decision variables wi (i=0,1,2,3) with the quantity break points B0 = 0, B1, B2 and B3.
  • Cost break points CBPi (=total cost of buying quantity Bi):

    CBP0=0
    CBPi = CBPi-1+Ci· (Bi-Bi-1) for i=1,2,3

  • Constraint formulation:

    iwi=1
    TotalCost = ∑i CBPi· wi
    x = ∑i Bi· wi

    where the wi form a SOS2 with reference row coefficients given by the coefficients in the definition of the total amount x.
    For a solution to be valid, at most two of the wi can be non-zero, and if there are two non-zero they must be contiguous, thus defining one of the line segments.
  • Implementation with Mosel (is_sos2 cannot be used here due to the 0-valued coefficient of w0):
    Defx := x = sum(i in 1..3) B(i)*w(i)
    makesos2(My_Set, union(i in 0..3) {w(i)}, Defx)

Formulation using binaries:

  • Define binary variables bi (i=1,2,3), where bi is 1 if we have bought any items at a unit cost of COSTi.
  • Real decision variables xi (i=1,..3) for the number of items bought at price COSTi.
  • Total amount bought: x = i xi
  • Constraint formulation:

    (Bi-Bi-1)\cdot bi+1 ≤ xi ≤ (Bi-Bi-1)\cdot bi for i=1,2
    x3 ≤ (B3-B2)\cdot b3
    b1 ≥ b2 ≥ b3