/********************************************************
Xpress-BCL C++ Example Problems
===============================
file xbworks.cxx
````````````````
Workshop planning example.
(c) 2008 Fair Isaac Corporation
author: S.Heipcke, Jan. 2000, rev. Mar. 2011
********************************************************/
#include
#include "xprb_cpp.h"
using namespace std;
using namespace ::dashoptimization;
#define NProd 2 /* Number of products */
#define NShop 3 /* Number of workshops */
#define WMAX 40 /* Maximum weekly working time */
/****DATA****/
int DUR[][NShop] = {{5, 9, 7}, /* Duration of product p on shop s */
{10, 2, 5}};
int RES[] = {10, 8}; /* Man hours per unit */
int PRICE[] = {108, 84}; /* Selling price per unit */
/***********************************************************************/
int main(int argc, char **argv)
{
int p,s;
XPRBexpr l;
XPRBvar x[NProd]; /* Amount of product p */
XPRBprob pb("Workshop"); /* Initialize a new problem in BCL */
/****VARIABLES****/
for(p=0;p |
/********************************************************
Xpress-BCL C++ Example Problems
===============================
file xbworkrng.cxx
``````````````````
Workshop planning example.
Test ranges and number printing format.
(c) 2008 Fair Isaac Corporation
author: S.Heipcke, 2003, rev. Mar. 2011
********************************************************/
#include
#include "xprb_cpp.h"
using namespace std;
using namespace ::dashoptimization;
#define NProd 2 /* Number of products */
#define NShop 3 /* Number of workshops */
#define WMAX 40 /* Maximum weekly working time */
/****DATA****/
int DUR[][NShop] = {{5, 9, 7}, /* Duration of product p on shop s */
{10, 2, 5}};
int RES[] = {10, 8}; /* Man hours per unit */
int PRICE[] = {108, 84}; /* Selling price per unit */
/***********************************************************************/
int main(int argc, char **argv)
{
int p,s;
XPRBexpr l;
XPRBvar x[NProd]; /* Amount of product p */
XPRBprob pb("Workshop"); /* Initialize a new problem in BCL */
XPRBctr c[NShop];
/****VARIABLES****/
for(p=0;p |