| /********************************************************/
/*  Xpress-BCL C# Example Problems                      */
/*  ==============================                      */
/*                                                      */
/*  file xbworks.cs                                     */
/*  ```````````````                                     */
/*  Example for the use of Xpress-BCL                   */
/*  (Workshop planning example from XPRESS-MP tutorial) */
/*                                                      */
/*  (c) 2008 Fair Isaac Corporation                     */
/*      authors: S.Heipcke, D.Brett.                    */
/********************************************************/
using System;
using System.Text;
using System.IO;
using BCL;
namespace Examples
{
    public class TestWorkshop
    {
        const int NProd = 2;                  /* Number of products */
        const int NShop = 3;                  /* Number of workshops */
        const int WMAX = 40;                  /* Maximum weekly working time */ 
        /****DATA****/
        int[,] DUR =  {{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 */
        /***********************************************************************/
        public static void Main()
        {
            XPRB.init();
            int p,s;
            XPRBexpr l = new XPRBexpr();
            XPRBvar[] x = new XPRBvar[NProd];               /* Amount of product p */
            XPRBprob pb = new XPRBprob("Workshop");        /* Initialize a new problem in BCL */
            TestWorkshop TestInstance = new TestWorkshop();
            /****VARIABLES****/
            for(p=0;p | 
| /********************************************************
  Xpress-BCL C# Example Problems
  ==============================
  file xbworkrng.cs
  `````````````````
  Workshop planning example.
  Test ranges and number printing format.
  (c) 2008 Fair Isaac Corporation
      authors: S.Heipcke, D.Brett.
********************************************************/
using System;
using System.Text;
using System.IO;
using BCL;
namespace Examples
{
    public class TestWorkshopRange
    {
        const int NProd = 2;                 /* Number of products */
        const int NShop = 3;                 /* Number of workshops */
        const int WMAX = 40;                 /* Maximum weekly working time */
        /****DATA****/
        int[,] DUR =  {{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 */
        /********************************************************************/
        public static void Main()
        {
            XPRB.init();
            int p,s;
            XPRBexpr l;
            
            /* Amount of product p */
            XPRBvar[] x = new XPRBvar[NProd];               
            
            /* Initialize a new problem in BCL */
            XPRBprob pb = new XPRBprob("Workshop");        
            
            XPRBctr[] c = new XPRBctr[NShop];
            TestWorkshopRange TestInstance = new TestWorkshopRange();
            /****VARIABLES****/
            for(p=0;p |