FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Purchasing with price breaks

Description
There are three suppliers of a good, and they have quoted various prices for various quantities of product. We want to buy at least total cost, yet not buy too much from any one supplier. Each supplier offers decreasing prices for increased lot size, in the form of incremental discounts. We wish to buy 600 items in total.
  • complex MIP model
  • data input from file, including parameters for dimensioning
  • splitting the declaration section to read first the parameters that are used to declare the data arrays
  • using SOS-2
Further explanation of this example: 'Xpress teaching material', Section 2.4 'SOS-2: Purchasing with price breaks'; 'Applications of optimization with Xpress-MP', Section 3.4.5 'Special Ordered Sets of type 2'

purchasegr.zip[download all files]

Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
purchase_graph.mos[download]
purchase_pwl.mos[download]
purchase_pwl_graph.mos[download]

Data Files





purchase.dat

! Data file for 'purchase.mos'

B:  [0 100 200 1000
     0 50  250 2000
     0 100 300 4000]

COST: [9.2 9   7
       9   8.5 8.3
       11  8.5 7.5]

MAXPERC: [40 35 40]
REQ: 600

Back to examples browserPrevious exampleNext example