Introductory BCL Examples
=========================

This directory contains a selection of, mostly small, examples 
demonstrating how to use different Xpress-BCL functions.

The BCL example files (xb*.cxx) are contained directly in this
directory. The corresponding Mosel (*.mos) files as well as any 
possibly required input data files are contained in the corresponding 
sub-directories of the Data subdirectory of the BCL Examples directory.

The following list is ordered according to the size and difficulty
of the examples, progressing from very easy problems to more complex 
examples.

chess
-----
  Manufacturing of chess boards.
xbchess.cxx:  
* tiny LP-problem
* composing constraints term by term
* solving the problem

workshop
--------
  Workshop planning problem.
xbworks.cxx:
* small LP-problem 
* composing constraints term by term
* solving the problem
* printing variables
xbworkrng.cxx:
* changing the number-printing format
* retrieving ranging information for variables and constraints

contract
--------
  Contract allocation problem.
xbcontr.cxx:
* small MIP-problem 
* defining semi-continuous variables
* retrieving the problem status and printing the solution

chgprobs
--------
  A series of 3 very small problems.
xbexpl.cxx: 
* defining several models
* changes to the problem definition after matrix generation
* warnings by BCL

setops
------
  Working with (index) sets
xbsetops.cxx: 
* creating the union and intersection of index sets

burglar
-------
  The 'Burglar Bill' knapsack model.
xbburg.cxx:
* standard formulation
xbburgi.cxx:
* indexing an array of variables by an index set
xbburgl.cxx:
* defining indicator constraints

coco
----
  The Coco productional planning problem taken from the mp-model
  User Guide.  A sequence of model versions show how the model
  was developed, to (a) use more sophisticated modeling features
  and (b) to extend the model, taking it from a simple linear model
  to one with fixed prices and logical decisions.
xbcoco1.cxx:
* initial formulation, data, variables and constraints fixed
xbcoco2.cxx:
* use parameters, data tables and subscripted variables
* read data tables in from text data files
xbcoco3.cxx:
* like xbcoco2.cxx, but several time periods
xbcoco.cxx:
* complete problem, data defined in the model definition

delivery
--------
  A simple supply and demand network model.
xbdelvr.cxx:
* simple LP problem
* data input from file

purchase
--------
  A model for optimal purchasing with price-breaks.
xbpurch.cxx:
* complex MIP model 
* data input from file
* using SOS-2

portfolio
---------
  Portfolio model: Quadratic Mixed Integer Programming example.
xbportf.cxx:   
* Quadratic Programming with discrete variables

catenary
--------
  A QCQP model to determine the shape of a hanging chain.
xbcatena.cxx:
* QCQP model (linear objective, convex quadratic constraints)  

-----------------------------------------------------------------------

Additional examples are located in the directories "AdvExpl" (more advanced examples) and "UGExpl" (examples from the Xpress-BCL User Guide and Reference Manual).
