Documente Academic
Documente Profesional
Documente Cultură
Web-Based Production-Planning-
Optimization Tools
Young M. Lee E. Jack Chen
IBM T.J. Watson Research Center, PO Box 218, Route 134, Yorktown Heights, New York 10598
BASF Corporation, 3000 Continental Drive North, Mount Olive, New Jersey 07828
ymlee@us.ibm.com chenej@basf-corp.com
This paper was refereed.
with special optimizing engines and other data inter- to change the objective functions and constraints of op-
face utilities. Many of the optimization models used timization models using a Web browser and to run
within BASF have been standalone applications and optimizations and view the results in HTML pages.
have lacked standard interfaces with other enterprise Users do not need to use FTP or TELNET protocols. In
applications, such as data-warehouse (DW) or our framework, the input and output presentations are
enterprise-resources-planning (ERP) systems. There- dynamically generated from a JSP (Java Server Page)
fore, it has been difcult to deploy such optimization that resides on a Web server. The Web is a client-server
tools to multiple users and to maintain the tools. Also, application; the client is a local computer and the
communicating optimization results among users has server is a remote host (computer). We use the term
not been easy. client to refer to local computers in a client-server ap-
With the optimization tools on the Web, virtually plication. The input data are taken from the clients and
anyone within the allowed community on the Internet passed to the application (optimization) server, where
or Intranet can access complex optimization tools with- an optimization model is executed remotely. Typically,
out any special hardware or software. It is now easy the server is a powerful, high-end computer. After the
to make optimization technology available to many optimization is complete, the results are passed from
people. The optimization engine can reside on only the server back to the client computers in the form of
one powerful server with enough computing resources a standard HTML document, which users can view on
(or in rare cases, a few servers). Moreover, a network the browser. The client computer could be any com-
of computers can serve as a parallel and distributed puter with a Web browser and Internet access.
processing server environment for solving computa- Todays enterprise systems can capture a vast amount
tionally intensive problems. Communicating the opti- of transaction data, but they lack the analytical tools
mization results among the users, especially among they need to examine the data and to help managers
business managers, engineers, and production plan- make optimal decisions (Fan et al. 2000). The concept of
ners, is easy, because the optimization results are a Web-based optimization tool is not new. Fourer and
stored in a centralized server and can be accessed by Goux (2001), Bhargava and Krishnan (1998), and
and presented to the users through a exible and pow- Bhargava et al. (1997) describe a variety of such tools
erful medium. Furthermore, maintaining a Web-based and systems that are available today. Several Web
optimization tool is much easier than maintaining tra- sites, such as www.sas.com, www.statware.com,
ditional optimization tools installed separately on each www.optamaze.com, www.mcs.anl.gov/neos, and
users computer. One can modify or enhance a Web- riot.ieor.berkeley.edu/riot provide capabilities for
based optimization tool on one server, and all the users Web-based optimization. One can also nd a number
can access the change immediately. Moreover, the Hy- of such online optimization tools at www.informs.org/
per Text Markup Language (HTML) page is a exible resources/computer_programs. We designed, imple-
medium that facilitates presentation of the optimiza- mented, and used an interactive Web-based optimiza-
tion results, for example, using graphic presentation of tion tool. Our framework can be generalized and is easy
input data and optimization results encourages in- to implement. We used it to solve a practical optimi-
sights, resulting in improved productivity. Optimiza- zation (MILP) problem, a production-planning optimi-
tion is particularly well suited to Internet innovations. zation for a chemical manufacturing plant.
Both the Optimization Technology Center of Argonne
National Laboratory and Northwestern Universitys
Network-Enabled Optimization System (NEOS) pro-
A Production-Planning Optimization
ject (Fourer and Goux 2001) have the mission of pro- for a Chemical Manufacturing Plant
viding optimization as an Internet resource. We deployed an optimization model of a production-
We have exploited the Web infrastructure to build planning problem (Lee and Selikson 2000) on the In-
integrated applications and to execute optimization tranet for one of BASFs chemical manufacturing
components remotely on the Web. They permit users plants. The plant has multiple production lines and
Interfaces
16 Vol. 32, No. 6, NovemberDecember 2002
LEE AND CHEN
BASF
produces hundreds of millions of pounds of chemicals use the Internet to share information with their sup-
per year. Each production line is a continuous process pliers and customers. They can use the Internet to col-
that operates 24 hours a day, 365 days a year except lect customer feedback for production planning. For
during maintenance when production is interrupted example, they can update the customer-order infor-
for a few days. The plant produces multiple product mation and demand almost in real time.
grades with different physical properties. When the
plant switches from one product to another in a pro-
System Architecture for Web-Based
duction line, the line will produce an off-grade product
for a few days until the process reaches a steady state
Optimization
and meets specications. BASF sells off-grade prod- Java technology has revolutionized computer use, and
ucts at much lower prices than products meeting spec- applications are increasingly developed in Java and
ications, so it wants to minimize the number of prod- Web-enabled. However, most optimization modeling
uct changeovers. Furthermore, it operates the plant at and optimization packages, such as ILOG OPL (Opti-
full capacity; therefore, it must have a well-planned mization Programming Language) and XPRESS-MP
product-changeover schedule to maintain overall pro- (by Dash Associates), are based on C and other tradi-
duction levels. Each production line can produce only tional programming languages. Thus, it was impossi-
certain product grades and has a minimum and max- ble to call those optimization subroutines from Java
imum production rate. The permanent storage tanks directly until recently. Fortunately, Java provides the
Java Native Interface (JNI), which allows Java to inter-
for the nished products have limited space, and tem-
face with other popular programming languages, such
porary storage space is costly. Each production line has
as C or C, Visual Basic, and Fortran, which can be
a minimum length for production campaigns during
interfaced with most optimization packages. We de-
which product changeovers are not permitted. The
veloped a framework for calling optimization subrou-
goal in planning production is to compute a produc-
tines from Java via JNI with Web browsers. Web
tion plan that minimizes the inventory-holding costs
browsers make it easy for novices to use many opera-
and product-changeover costs while satisfying all the
tions research tools.
customer demands for nished goods and the other
We deployed one production-planning-
process constraints.
optimization model using a three-tiered architecture
An enterprise system is intended to help companies
(Figure 1). The rst tier on the client side processes the
make intelligent business decisions by integrating all input data and presents the output data. The second
types of business information. To do that, a system tier is the Web server, which manages the server-side
should be able to coordinate activities across the or- processing and communicates with third-tier servers,
ganization and provide decision tools for decision such as the database server and the application server.
makers (Fan et al. 2000). Information generated in all The JSP and Java programs, the database system, and
of the business processes can be stored, integrated, and the optimization engine can all run on one server.
analyzed. Most companies have data-repository sys- However, for security and performance reasons, it is
tems, such as DW and ERP systems, which contain the better to run them in separate servers, for example, on
input data needed for the optimization, such as the a Web server, a database server, and an application
demand forecast, the inventory, and production ca- (optimization) server. Users can use a Web browser in
pacity. The optimization model can be set up to access the client computer to edit input data, invoke execu-
those data already available in the database system. tion of the optimization, and receive results via ordi-
The output results of the optimization model can also nary Web pages. The main implementations and pro-
be stored in these database systems and can be avail- cessing tasks are carried out on the server side. This
able for other enterprise applications. Consequently, framework provides the exibility of a programming
optimization applications can be integrated with other language in a production environment, and develop-
enterprise applications. Furthermore, companies can ers can customize connections among models, data
Interfaces
Vol. 32, No. 6, NovemberDecember 2002 17
LEE AND CHEN
BASF
Interfaces
18 Vol. 32, No. 6, NovemberDecember 2002
LEE AND CHEN
BASF
optimization model. For example, the XPRESS- optimization subroutine library) (Dash Associates
Connect interfaces enable the optimization model to 2000). The interface C function can be built as a dy-
connect to a range of popular spreadsheets and data- namic linking library (.dll) in the Microsoft Windows
bases such as MS (MicroSoft) Excel, MS Access, and environment or as a shared object (.so) le in the UNIX
other ODBC (open database connectivity) data sources environment. The JNI is able to interface with those
(Dash Associates 2000). If solvers do not have the op- libraries.
tion to interface with spreadsheets and databases di- In a typical implementation of a C function
rectly, one can write a Java servlet to retrieve data from (Java_Xpress_optimize) that can be invoked by JNI,
databases, translate data into solver-specic formats, the name of the optimization model is passed in as
and write them to data les. It is also possible to re- a parameter. The C function calls the XPRESS-MP
trieve or update data from multiple databases using modeler and optimizer, processes the results, and
different access methods and protocols as long as they passes the objective function value back to the call-
are available on the network. ing procedure. The XPRESS-MP model( ) function
Once the user has updated the input data, the JSP call generates a matrix le that the XPRESS-MP pack-
program calls a servlet that runs a JNI (Java Native age uses to execute the optimization. The input data
Interface) with a C-based program, which in turn runs of the optimization model are read in during this
the optimization engine with an optimization model. process. The optimization model provides the nec-
The C-based program will initiate a command instruct- essary instructions internally regarding the interface
ing the optimization model to read in data from data with data sets or databases. The DISKDATA com-
les specied in the model and to bind the data with mand and XPRESS-Connect interfaces sections in the
predened variables before it initiates the optimization
XPRESS-MP user guide and reference manual con-
command. In XPRESS-MP, this is accomplished by
tain details (Dash Associates 2000).
the model(sProblem,GENERATE,0,&nModelError)
The C function Java_Xpress_optimize is completely
statement. Thus, the model and data are completely
independent from the content of the optimization
independent. On the other hand, different solvers may
model. Thus, this architecture is generalized and is not
have different model syntaxes; therefore, the model
specic to the production model using XPRESS-MP.
and solver are not completely independent. When the
The name of the optimization model is passed to the
optimization is completed, the results are updated to
C function through the parameter sProblem. Thus,
the output les. A JSP program then dynamically dis-
the C function can be used to execute any optimization
plays the selected output report tables to the users
browser as HTML pages. The user can select any tables model. The C function can also be modied to interface
and view the optimization results. When the user se- with other solver engines and model formats. Addi-
lects the output le of interest from the drop-down tional parameters can be added to provide solver
menu, for example, production schedule, a JSP gener- information.
ates and displays an HTML page with those data. A
downstream application uses the optimization results
to generate daily production schedules, hourly raw
Benets and Impact
material feed rates, and production reports, such as The production-planning model we implemented has
Gantt charts. 1,452 variables (308 binary variables) and 1,113 equa-
In the Web-based optimization framework for BASF, tions. The optimization usually takes a few seconds on
we used XPRESS-MP as the modeling and optimiza- a Sun/Solaris workstation, running Netscape Enter-
tion engine. However, the framework will work with prise Server. The response time depends on other fac-
other optimization packages as long as they have C- tors as well, such as the state of the application server
based optimization library. We developed a generic C and the load of network trafc. Before we imple-
function that interfaces with the XPRESS-MP optimi- mented the model, analysts took several days to plan
zation package through XMSL (the XPRESS-MP mod- a production schedule. The short response time of the
eler subroutine library) and XOSL (the XPRESS-MP integrated model has allowed the production plant to
Interfaces
Vol. 32, No. 6, NovemberDecember 2002 19
LEE AND CHEN
BASF
adjust its production schedule quickly to accommo- result is that lots of small computers work simulta-
date any sudden market changes. The quality of pro- neously on different parts of the analysis and contribute
duction planning has also improved. The planning to the effort of analyzing monstrous amounts of data. In
model has helped the production planners to reduce solving an MILP problem, for example, a main server
inventory and to improve BASFs use of production can generate suboptimization problems through the
and storage capacity. In addition, business managers branch-and-bound method, and several computers
in different locations are now able to view the results within the network can optimize the subproblems in par-
and make intelligent business decisions quickly. Since allel while the main server orchestrates the overall opti-
we implemented the Web-based architecture, mainte- mization strategy. Commercial optimization software,
nance and technical support of the model have become such as XPRESS-MP, can support such parallel-
much easier. We modify and enhance the tool in only processing architecture. Therefore, the marriage between
one server, and all the users can access the change im- Web-based optimization and parallel and distributed
mediately. Using the framework, we developed an- processing seems natural. We are planning to implement
other production-planning-optimization model for an- parallel and distributed computation in our Web-based
other BASF manufacturing plant at a different site with optimization framework in the near future.
minimal expense by sharing resources, such as the op- The Web-based optimization infrastructure we de-
timization engine, server, and data-interface utility. veloped is a generic framework that can be applied to
The availability of powerful operations research soft- a variety of optimization applications. The JNI inter-
face between the Java class and the C-Interface pro-
ware on the Internet or Intranet and the effectiveness
gram is generic and can be customized easily for other
of using mathematical models to solve practical prob-
Web-based computational applications. For instance,
lems will encourage managers on the production oor
the framework can be used for integrating discrete-
to reevaluate their legacy approaches with mathemat-
event and continuous-process simulation engines on
ical solutions.
the Internet. Luo et al. (2000) and Guru et al. (2000)
One of the benets of integrating the optimization
described their frameworks for such applications. At
engine with the Web is that we can easily implement
BASF, we plan to use this framework to deliver a va-
parallel and distributed processing capability into the
riety of optimization applications, such as optimiza-
infrastructure. So far, application of parallel processing
tion problems for production planning, scheduling,
has been limited. Until recently, parallel computers
distribution, transportation, and formulation on the
could be found only in research laboratories or large Web, thus spreading the optimization technology to
universities. Furthermore, system software to support wider corporate communities.
large-scale distributed processing remains scarce (Luo Once an operations research tool becomes available
et al. 2000). On the other hand, an inherent character- through the Intranet or Internet, it can be further in-
istic of the Web is its distributed processing nature. The tegrated with other enterprise applications. For ex-
Internet can emulate the parallel processing architec- ample, the input parameters of an optimization model
ture of expensive parallel hardware, while the Internet can be updated in databases regularly through some
protocol unies diverse networking technologies and other enterprise applications. End users of the opti-
administrative domains. A network of several com- mization tool do not need to modify the input data
puters within the Intranet or Internet can collaborate themselves. Moreover, the optimization results can be
to solve complex optimization problems, effectively stored in databases for other applications.
utilizing computers that may be unused otherwise.
University of California, Berkelys SETI (search for ex-
traterrestrial intelligence) project (and the SETI@home Conclusions
screen saver) enables idle home computers to get a The Internet provides inexpensive and ubiquitous
chunk of data from SETI data over the Internet, ana- communication and data access while operations re-
lyze that data, and report the results back to SETI. The search can support strategic and tactical decision making
Interfaces
20 Vol. 32, No. 6, NovemberDecember 2002
LEE AND CHEN
BASF
with the data (Sodhi 2001). The Web has experienced Zij insufcient storage space of product i in time
tremendous growth since its introduction. To exploit j (slack),
its ubiquitous nature, it is important to make applica- dijk production status of product i, in time j, in line
tions Internet accessible. We developed a generic com- k, dijk {0, 1}, and
putation framework for Web-based optimization using X1ijk, X1ijk product changeover (1 in, 1
server-side Java programming, and we developed and out), X1ijk, X1ijk {0, 1}.
deployed a practical production-planning- The constraints are
optimization model using the architecture. The Java- l
based technology allows distributed processing, uni- Ii,j1
k1
Pijk Iij Uij Zij
versal portability (and platform independence),
modularity, and accessibility, thus presenting the [demand]ij 0 i, j, (1)
chance for a commercial breakthrough and industrial n
success of distributed optimization tools. The Web is Pijk [max prod rate]k 0 j, k, (2)
becoming a popular platform for information, services, i1
Production-Planning-Optimization
j1 i1
{[SC]i [IC]i} Zij
Model l m n
Interfaces
Vol. 32, No. 6, NovemberDecember 2002 21
LEE AND CHEN
BASF
BOOL APIENTRY DllMain(HANDLE hModule, public native double Optimize (String sProblem);
DWORD dwReason, void** lpReserved) { static {
return TRUE; try {
} System.loadLibrary(XpressOpt);
}
void error(const char *mess) {
catch (UnsatisfiedLinkError e) {
fprintf(stderr, Error: %s\n, mess);
System.out.println (e);
}
System.exit(1);
JNIEXPORT jdouble JNICALL } /* try and catch */
Java_Xpress_optimize(JNIEnv * jEnv, jobject jthis, } /* static */
jstring jMsg) { } /* XPRESS */
Interfaces
22 Vol. 32, No. 6, NovemberDecember 2002
LEE AND CHEN
BASF
Xpress.h Header File any Web page; for example, the hyperlink statement
A HREFopt.jsp?lenamepoly.mod Opti-
The C header le Xpress.h, is generated automatically
mize/A will execute the optimization model
with the javah jni Xpress command. The Xpress.h,
poly.mod.
xpressm.h and xpresso.h from the XPRESS-MP pack-
age header les must be included in the le containing %@ page import opt.XpressBean %
the C function. These header les provide the neces- jsp:useBean idxpressopt classopt.XpressBean
sary linkage between Java and C, C and XPRESS-MP. scopesession/
jsp:setProperty namexpressopt property*/
/* DO NOT EDIT THIS FILEit is machine generated
*/ html
#include jni.h headtitleOptimization/title/head
/* Header for class Xpress */ %
String modelfile
#ifndef _Included_Xpress request.getParameter(filename);
#define _Included_Xpress int len modelfile.length();
#ifdef __cplusplus modelfile modelfile.substring(0,len-4);
extern C { %
#endif
/* Production Scheduling Optimization Page. br
* Class: Xpress br
* Method: optimize pThe optimized value is % xpres-
* Signature: (Ljava/lang/String;)Ljava/lang/ sopt.opt(modelfile) %.p
String; /body
*/ /html
JNIEXPORT jdouble JNICALL Java_Xpress_optimize
(JNIEnv *, jobject, jstring); Online References
INFORMS Resources www.informs.org/Resources/
#ifdef __cplusplus
Computer_Programs
}
#endif Java developer.java.sun.com/developer/onlineTraining
#endif Neos Server for Optimization www.mcs.anl.gov/neos
PaperSuite 2.0 www.optamaze.com
Remote Interactive Optimization Testbed riot.ieor.Berkeley.edu/
JavaBean riot
SAS Institute www.sas.com/solutions/supplychain/demos/
A generic JavaBean instantiates the JNI dened in the index.html
Xpress class and invokes the function Optimize() to Servlet java.sun.com/products/servlet/2.1/
optimize the model dened in the parameter Statit tool set www.statware.com
sProblem:
References
package opt; Bhargava, H. K., R. Krishnan. 1998. The World Wide Web: Oppor-
import Xpress; tunities for operations research and management science. J.
Comput. 10(4) 359383.
public class XpressBean {
Xpress app new Xpress(); , , R. Mueller. 1997. Decision support on demand: Emerging
public double opt (String sProblem) { electronic markets for decision technologies. Decision Support
return app.Optimize(sProblem); Systems 19(3) 193214.
} Cohen, M., C. B. Kelly, A. L. Medaglia. 2001. Decision support with
} /* XPRESSBean */ Web-enabled software. Interfaces 31(2) 109129.
Dash Associates Limited. 2000. XPRESS-MP User Guide and Reference
Manual. Dash Associates Limited, Northants, U.K.
Java Server Page Eckel, B. 1998. Thinking in Java. Prentice-Hall, Englewood Cliffs, NJ.
Fan, M., J. Stallaert, A. B. Whinston. 2000. The adoption and design
The optimization JSP (opt.jsp) uses the JavaBean
methodologies of component-based enterprise systems. Eur. J.
XpressBean to execute the optimization model de- Inform. Systems 9 2535.
ned in the parameter lename. The JSP le Fourer, R., P. Goux. 2001. Optimization as an Internet resource. In-
opt.jsp can be activated by a hyperlink or a form in terfaces 31(2) 130150.
Interfaces
Vol. 32, No. 6, NovemberDecember 2002 23
LEE AND CHEN
BASF
Guru, A., P. Savory, R. Williams. 2000. A Web-based interface for based simulation optimization. Proc. 2000 Winter Simulation
storing and executing simulation models. Proc. 2000 Winter Conf., Orlando, FL, December 2000. IEEE Press, New York, 1785
Simulation Conf., Orlando, FL, December 2000. IEEE Press, New 1793.
York, 18101814. Paxson, V., S. Floyd. 1997. Why we dont know how to simulate the
Krieger, J. H. 1997. Integration hits software tools. Chem. Engrg. News Internet. Proc. 1997 Winter Simulation Conf., Orlando, FL, Decem-
75(40) 2632. ber 1997. IEEE Press, New York, 10371044.
Lee, Y. M., P. L. Selikson. 2000. Optimization of production planning. Pekowsky, L. 2000. JavaServer Pages. Addison-Wesley, New York.
Technical report, BASF Corporation, Mount Olive, NJ. Sodhi, M. S. 2001. A match made in heaven. OR/MS Today 28(1) 30
Luo, Y. C., C. H. Chen, E. Yucesan, I. Lee. 2000. Distributed Web- 33.
Interfaces
24 Vol. 32, No. 6, NovemberDecember 2002