Javascript Menu by Deluxe-Menu.com
[Home]
[Client Area]
English Japanese

Xpress-BCL

Xpress-BCL is an object-oriented library for building Mathematical Programming problems within an application. It uses a step-by-step approach, with functions to add a variable, and add a constraint, which you the developer call within your program, gradually building up the complete problem.


#include <iostream>
#include "xprb_cpp.h"

using namespace ::std;
using namespace ::dashoptimization;

int main(int argc, char **argv)
{
 XPRBvar xs, xl;       // Decision variables
 XPRBprob p("Chess");  // Initialize a new problem

// Define the decision variables 
 xs = p.newVar("xs");
 xl = p.newVar("xl");

// Define and set the objective function
 p.setObj(p.newCtr("Profit", 5*xs + 20*xl));

// Define the constraint 3*xs + 2*xl <= 160
 p.newCtr("Lathe", 3*xs + 2*xl <= 160);

// Define the constraint xs + 3*xl <= 200
 p.newCtr("Boxwood", xs + 3*xl <= 200);

 p.maxim("");          // Solve the LP-problem

 cout<<"Solution:"<<p.getObjVal()<<endl;
 cout<<"Make "<<xs.getSol()<<"small sets"<<endl;
 cout<<"Make "<<xl.getSol()<<"large sets"<<endl;

 return 0;
}

Once the complete problem is defined, it is solved using the Xpress-Optimizer. Further BCL functions enable you to access and analyze the solution directly within your application.

The BCL library has C, C++, Java, C#, and VB interfaces.

 Click here to download a BCL presentation

 

 

Related Topics
Product Overview
Evaluate Xpress-MP
Ordering Xpress-MP
White papers
BCL examples
[Home] [Contact] [Client Area] [Search] [Sitemap] [Links] [Printer Friendly]
  © 2008 Fair Isaac Corporation. All rights reserved.