IBM ILOG ODM Enterprise and Data Integration - Amazon S3

radiographerfictionData Management

Oct 31, 2013 (3 years and 9 months ago)

333 views


ibm.com/redbooks
Draft Document for Review May 15, 2011 10:30 pm REDP-4740-00
Redpaper
IBM ILOG ODM
Enterprise and Data
Integration
Amtul Aziz
Joseph J Lee
Ioannis Gamvros
Martin Shell
Shelley L Crayon
Vasfi Gucer
Presents an integration guide for ODM
Enterprise with IBM InfoSphere and Cognos BI
Showcases the ODM Enterprise
Supply Demand optimization scenario
Covers ODM Enterprise
integration best practices
Front cover
IBM ILOG ODM Enterprise and Data Integration
June 2011
International Technical Support Organization
Draft Document for Review May 15, 2011 10:30 pm
4740edno.fm
REDP-4740-00
4740edno.fm
Draft Document for Review May 15, 2011 10:30 pm
© Copyright International Business Machines Corporation 2011. All rights reserved.
Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.
First Edition (June 2011)
This edition applies to IBM ILOG ODM Enterprise Version V3.4.0.2, IBM Cognos Business
Intelligence V10.0, IBM WebSphere Application Server V7.0 and IBM InfoSphere Warehouse
V9.7.
This document created or updated on May 15, 2011.
Note: Before using this information and the product it supports, read the information in
“Notices” on page vii.
© Copyright IBM Corp. 2011. All rights reserved.
iii
Draft Document for Review May 15, 2011 10:30 pm
4740TOC.fm
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .viii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix
The team who wrote this paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix
Now you can become a published author, too! . . . . . . . . . . . . . . . . . . . . . . . . .xi
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
Stay connected to IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Chapter 1. Introduction to the optimization scenario . . . . . . . . . . . . . . . . . 1
1.1 Scenario introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Business value of the scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Brief introduction to the products used in the scenario. . . . . . . . . . . . . . . . 4
1.3.1 IBM ILOG ODM Enterprise. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 IBM Cognos Business Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 WebSphere Application Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.4 IBM InfoSphere Warehouse and IBM InfoSphere Warehouse Cubing
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Development process of the IBM ILOG ODM Enterprise application . . . . . 6
1.4.1 Roles in the development process . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.2 High level description of the development process. . . . . . . . . . . . . . . 7
1.5 Description of the environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 2. Implementing the staging database . . . . . . . . . . . . . . . . . . . . . 11
2.1 Introduction and data flow diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Corporate database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1 CORP data model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Staging database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.1 Analyzing the data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.2 Defining the schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.3 ETL for ODME_STG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.4 ODME_STG data model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.5 ODME_SCENARIO data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Reporting database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.1 ODME_DIM dimensional model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.2 ETL for ODME_DIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise
solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4740TOC.fm
Draft Document for Review May 15, 2011 10:30 pm
iv
IBM ILOG ODM Enterprise and Data Integration
3.1 Initial development and the application data model . . . . . . . . . . . . . . . . . 25
3.1.1 Initial development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.1.2 Defining the input schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.1.3 Defining the output schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2 Creating the user interface to the solution. . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3 Adding optimization to the solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4 Data exporting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.4.1 Data exporting schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.4.2 Creating and configuring the Java project. . . . . . . . . . . . . . . . . . . . . 40
3.4.3 Custom exporting code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.4.4 Editing the XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.4.5 Debugging the custom Java code. . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.5 Deploying the ODM Enterprise solution . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.5.1 Configuring the connection to ODM Scenario Repository. . . . . . . . . 46
3.5.2 Configuring the connection to the staging database. . . . . . . . . . . . . 47
3.5.3 Configuring the connection to the optimization server . . . . . . . . . . . 49
3.5.4 Deploying the IBM ILOG ODM Enterprise application . . . . . . . . . . . 49
Chapter 4. IBM ILOG ODM Enterprise Scenario Management . . . . . . . . . 51
4.1 Scenario management: Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.1.1 Creating an initial scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.1.2 Reviewing scenario components . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2 Creating a new scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.2.1 What-If analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.2.2 Goal programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.2.3 Parameterization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.2.4 Incorporation of optional business rules . . . . . . . . . . . . . . . . . . . . . . 59
4.3 Solving and reviewing scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3.1 Scenario creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3.2 Scenario review and comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.4 Scenario collaboration and sharing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.5 Scenario export. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Chapter 5. Presenting IBM ILOG ODM Enterprise scenarios with IBM
InfoSphere Warehouse and IBM Cognos BI. . . . . . . . . . . . . . . 69
5.1 InfoSphere Warehouse cube model and cube . . . . . . . . . . . . . . . . . . . . . 71
5.2 IBM Cognos architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.3 IBM Cognos 10 Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.4 Importing into Framework Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.5 Publishing a Framework Manager package . . . . . . . . . . . . . . . . . . . . . . . 80
5.6 Creating a Cognos report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.7 IBM ILOG ODM Enterprise reporting examples using IBM Cognos BI. . . 87
5.7.1 Monthly Inventory report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Contents
v
Draft Document for Review May 15, 2011 10:30 pm
4740TOC.fm
5.7.2 Optimized Allocation versus Demand Input . . . . . . . . . . . . . . . . . . . 88
5.7.3 Optimized Solution for a Single Month of Production . . . . . . . . . . . . 89
5.7.4 Optimization Scenario Comparison. . . . . . . . . . . . . . . . . . . . . . . . . . 90
Appendix A. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
System requirements for downloading the Web material . . . . . . . . . . . . . . 94
Downloading and extracting the Web material . . . . . . . . . . . . . . . . . . . . . . 94
Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4740TOC.fm
Draft Document for Review May 15, 2011 10:30 pm
vi
IBM ILOG ODM Enterprise and Data Integration
Draft Document for Review May 15, 2011 10:30 pm
4740spec.fm
© Copyright IBM Corp. 2011. All rights reserved.
vii
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
4740spec.fm
Draft Document for Review May 15, 2011 10:30 pm
viii
IBM ILOG ODM Enterprise and Data Integration
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corporation in the United States, other countries, or both. These and other IBM trademarked
terms are marked on their first occurrence in this information with the appropriate symbol (® or ™),
indicating US registered or common law trademarks owned by IBM at the time this information was
published. Such trademarks may also be registered or common law trademarks in other countries. A current
list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
Cognos®
CPLEX®
DB2®
IBM®
ILOG®
InfoSphere™
Maximo®
Redbooks®
Redpaper™
Redbooks (logo) ®
Tivoli®
WebSphere®
The following terms are trademarks of other companies:
ITIL is a registered trademark, and a registered community trademark of the Office of Government
Commerce, and is registered in the U.S. Patent and Trademark Office.
Java, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both.
Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
© Copyright IBM Corp. 2011. All rights reserved.
ix
Draft Document for Review May 15, 2011 10:30 pm
4740pref.fm
Preface
IBM® ILOG® ODM Enterprise is a platform for implementing and deploying
optimization bases planning and scheduling corporate custom solutions.
Developing a realistic plan or schedule that provides the best possible balance
between customer service and revenue goals is hard work. IBM ILOG ODM
Enterprise empowers business to make better decisions through what-if analysis,
scenario management and collaboration.
This IBM Redpaper™ publication showcases the IBM ILOG ODM Enterprise
Supply Demand optimization scenario and within the context of this scenario
highlights the product features and presents best practices for leveraging IBM
Cognos® and InfoSphere™ offerings to extract data and to build the reports with
IBM ILOG ODM Enterprise driving the import and export.
The target audience for this IBM Redpaper is IT specialists and IT architects who
will be implementing IBM ILOG ODM Enterprise solutions, as well as decision
makers such as IT Managers.
The team who wrote this paper
This paper was produced by a team of specialists from around the world working
at the International Technical Support Organization, Raleigh Center.
Amtul Aziz is a BI Technical consultant for STG-ISV enablement group with IBM.
She has In-depth knowledge in requirements gathering, analysis, data modeling,
design, development and implementation of data warehouse and BI applications.
Her main focus area of work in on performance tuning of the ETL process and
SQL optimization. She has 12 years of experience in IT involving leadership and
consulting on
DW and BI
solutions
.
. She holds a master degree in computer
application from Madurai Kamaraj University, India.
Joseph Lee is an IT Specialist for the IBM Integrated Technology Delivery
organization. He serves as an architect integrating IBM systems such as
Maximo® and eESM with customer IT management tools. Since joining IBM 11
years ago he has also done JAVA coding, DB2® DBA support, and eESM
application support for IBM Global Services. Prior to joining IBM Joseph
graduated from the US Naval Academy with a Bachelor of Science Degree in
General Engineering. After serving in the navy he earned a Bachelor of Science
4740pref.fm
Draft Document for Review May 15, 2011 10:30 pm
x
IBM ILOG ODM Enterprise and Data Integration
Degree in Computer Science from the University of North Carolina at Wilmington
and joined IBM.
Ioannis Gamvros is an Optimization Solutions Technical Sales Specialist and
joined IBM in 2009 when IBM acquired ILOG. During his ILOG tenure Yianni was
an optimization consultant and prior to that worked as an independent consultant
on various optimization projects. He received his BSc in Electrical Engineering
from the Aristotle University of Thessalonika in Greece and his PhD in
Operations Research (OR) from the University of Maryland in College Park.
Yianni's consulting work has exposed him to a wide variety of OR problems, in
diverse industries such as shipping, manufacturing, consumer products,
transportation and telecommunications and functional areas like supply chain,
inventory and revenue management and scheduling. His recent work as part of
the optimization sales team frequently involves designing end-to-end
optimization solutions and showcasing the value proposition of IBM optimization
software.
Martin Shell is a Technical Sales Specialist for ILOG Optimization including
Cplex Optimization Studio and ODM Enterprise. Martin joined IBM as part of the
ILOG acquisition two years ago. At ILOG, Martin worked as a consultant and
technical marketing specialist as well as technical account manager, He has also
worked as an analyst, consultant, developer and development manager for
several companies focusing on the application of optimization technology to a
wide range of business application areas. Martin hold a Masters of Science
degree in Operations Research from M.I.T.
Shelley Crayon is an Information Architect with the IBM Business Analytics &
Optimization Practice. His areas of expertise are in Analytics and Enterprise
Information Management. He has more than 10 years of cross industry
experience, where he has architected and developed datawarehousing and
analytical applications. Shelley holds a Masters of Information Systems
Management degree from Carnegie Mellon University and a Bachelor of Science
degree in Computer Science from Morehouse College.
Vasfi Gucer is a Project Leader at the International Technical Support
Organization, Austin Center. He has been with the ITSO since January 1999. He
has more than 15 years of experience in the areas of systems management,
networking hardware, and software on mainframe and distributed platforms. He
has worked on various IBM Tivoli® client projects as a Systems Architect in the
USA. He writes extensively and teaches IBM classes worldwide on Tivoli
software. Vasfi is also an IBM Certified Senior IT Specialist, PMP, and ITIL®
Expert.
Thanks to the following people for their contributions to this project:
Preface
xi
Draft Document for Review May 15, 2011 10:30 pm
4740pref.fm
Tamika Barrow, Stephen Smith, Linda Robinson, Debbie Willmschen
International Technical Support Organization, Raleigh Center
Sandy Emerson, Jan Helleve, Joseph Pohlen, George Sax
IBM USA
Philippe Gregoire, Frederic Lavigne
IBM France
Alain Chabrier
IBM Spain
Now you can become a published author, too!
Here's an opportunity to spotlight your skills, grow your career, and become a
published author—all at the same time! Join an ITSO residency project and help
write a book in your area of expertise, while honing your experience using
leading-edge technologies. Your efforts will help to increase product acceptance
and customer satisfaction, as you expand your network of technical contacts and
relationships. Residencies run from two to six weeks in length, and you can
participate either in person or as a remote resident working from your home
base.
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us!
We want our papers to be as helpful as possible. Send us your comments about
this paper or other IBM Redbooks® publications in one of the following ways:
￿ Use the online Contact us review Redbooks form found at:
ibm.com/redbooks
￿ Send your comments in an email to:
redbooks@us.ibm.com
￿ Mail your comments to:
4740pref.fm
Draft Document for Review May 15, 2011 10:30 pm
xii
IBM ILOG ODM Enterprise and Data Integration
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099
2455 South Road
Poughkeepsie, NY 12601-5400
Stay connected to IBM Redbooks
￿ Find us on Facebook:
http://www.facebook.com/IBMRedbooks
￿ Follow us on Twitter:
http://twitter.com/ibmredbooks
￿ Look for us on LinkedIn:
http://www.linkedin.com/groups?home=&gid=2130806
￿ Explore new Redbooks publications, residencies, and workshops with the
IBM Redbooks weekly newsletter:
https://www.redbooks.ibm.com/Redbooks.nsf/subscribe?OpenForm
￿ Stay current on recent Redbooks publications with RSS Feeds:
http://www.redbooks.ibm.com/rss.html
© Copyright IBM Corp. 2011. All rights reserved.
1
Draft Document for Review May 15, 2011 10:30 pm
4740ch01.fm
Chapter 1.
Introduction to the
optimization scenario
This chapter provides an overview of the use case and software products
employed to demonstrate a typical business solution using IBM ILOG ODM
Enterprise. IBM ILOG ODM Enterprise is a configurable platform for custom
planning and scheduling. The chapter also describes the IBM ILOG ODM
Enterprise development process.
This chapter has the following sections:
￿ 1.1, “Scenario introduction” on page 2
￿ 1.2, “Business value of the scenario” on page 3
￿ 1.3, “Brief introduction to the products used in the scenario” on page 4
￿ 1.4, “Development process of the IBM ILOG ODM Enterprise application” on
page 6
￿ 1.5, “Description of the environment” on page 8
1
4740ch01.fm
Draft Document for Review May 15, 2011 10:30 pm
2
IBM ILOG ODM Enterprise and Data Integration
1.1 Scenario introduction
In this scenario, the ITSO Motor Bike Company will use IBM ILOG ODM
Enterprise to help plan its production goals for the next three months. The
company maintains a corporate database with historical and live data
corresponding to incoming demand and ongoing production. Each night a subset
of the data in the corporate database is copied to an intermediate database. IBM
ILOG ODM Enterprise will access data in the intermediate database, because it
contains a schema better suited for the processing operations and also it avoids
impacting the primary database. It is better to do planning and forecast on a
snapshot of the data than on data that are changing continuously.
Planners for ITSO Motor Bike Company will use ODM Studio to create different
scenarios for production. IBM ILOG ODM Enterprise will perform optimization of
the data during off-peak hours due to make optimal use of time and resources.
Notifications are sent to the planners to check the solution in ODM Studio after
completion of the optimization. The planners use what-if analysis to select the
best scenario for implementation.
The planners will select certain scenarios to be loaded to a scenario database,
where it will be shared with reviewers by way of reports generated by IBM
Cognos Business Intelligence (IBM Cognos BI). After reviewers approve one of
the scenarios, it will be published to another system for implementation.
Figure 1-1 on page 3 illustrates this scenario.
Chapter 1. Introduction to the optimization scenario
3
Draft Document for Review May 15, 2011 10:30 pm
4740ch01.fm
Figure 1-1 IBM ILOG ODM Enterprise use case scenario
1.2 Business value of the scenario
The use case presented for ITSO Motor Bike Company demonstrates some of
the benefits to corporations of using IBM ILOG ODM Enterprise to plan business
operations. For the company in the use case, the optimization exercise provides
planners with tools to make decisions such as:
￿ What products to build
￿ Where to build them
￿ When to build them
￿ How much to allocate to each market
ODM Enterprise Data Integration Scenario
ODM Enterprise optimization
server on WebSphere
Cognos BI
Scheduler
Reporting
database on
InfoSphere
Warehouse
r
e
p
o
r
t
s

g
e
n
e
r
a
t
e
d
d
a
t
a

u
s
e
d

b
y

C
o
g
n
o
s
Ad Hoc
or
Pre-defined
Reporting
Scenario
database on
InfoSphere
Warehouse
Input
database on
InfoSphere
Warehouse
Corporate database
on
InfoSphere
Warehouse
pull data into star
reporting database
extract of
subset of tables
ODM Scenario
Repository database
InfoSphere Warehouse
o
u
t
p
u
t
d
a
t
a

p
u
l
l
e
d

f
o
r

o
p
t
i
m
i
z
a
t
i
o
n

s
c
e
n
a
r
i
o
c
a
l
c
u
l
a
t
i
o
n
s
4740ch01.fm
Draft Document for Review May 15, 2011 10:30 pm
4
IBM ILOG ODM Enterprise and Data Integration
1.3 Brief introduction to the products used in the
scenario
In this section we make an introduction to the products used in this scenario.
1.3.1 IBM ILOG ODM Enterprise
In this sample use case, IBM ILOG ODM Enterprise 3.4.0.2 was used as an
enterprise platform for developing and deploying solutions for business decision
makers. IBM ILOG ODM Enterprise uses advanced mathematical based
optimization tools and engines for efficiency planning and scheduling. Key
features include:
￿ Flexibility, by providing the ability to do what-if analysis, scenario
management, and comparison. This enables planners to make informed
decisions based on trade-offs between alternative solutions and conflicting
business goals.
￿ Enables detailed visualization of data through drill-down menus and graphical
displays.
￿ Built upon optimization technology using the IBM ILOG CPLEX® optimization
engine.
￿ A powerful modelling language called Optimization Programming Language
(OPL).
￿ Planners and schedulers can collaborate by sharing optimization scenarios
through a central repository.
For more information on IBM ILOG ODM Enterprise you can refer to:
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp
Optimization Programming Language: An optimization problem is typically
specified by an objective function and a set of constraints over some decision
variables. A solution to the problem is an assignment of values to the variables
that satisfies the constraints and optimizes the value of the objective function.
The purpose of an OPL statement is thus to express these two components
for the application at hand.
Chapter 1. Introduction to the optimization scenario
5
Draft Document for Review May 15, 2011 10:30 pm
4740ch01.fm
1.3.2 IBM Cognos Business Intelligence
IBM Cognos Business Intelligence V10 was used to deliver key information to the
planners to facilitate their decision making process. All capabilities such as
viewing, creating, and administering dashboards, reports, and analysis are
accessed through web interfaces. IBM Cognos Business Intelligence is built
upon a web-based, SOA architecture that is designed for scalability and
openness.
Refer to 5.2, “IBM Cognos architecture” on page 72 for a discussion of IBM
Cognos BI architecture.
Also you can refer to the following IBM Cognos Business Intelligence V10
Information Center for more information:
http://publib.boulder.ibm.com/infocenter/cbi/v10r1m0/index.jsp
1.3.3 WebSphere Application Server
For this project, IBM WebSphere® Application Server 7.0 is used as the IBM
runtime environment for Java™-based applications. The application server acts
as a middleware between back end systems and clients. It provides a
programming model, an infrastructure framework, and a set of standards for a
consistently designed link between them.
You can locate the IBM WebSphere Application Server documentation
Information Center at:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp
1.3.4 IBM InfoSphere Warehouse and IBM InfoSphere Warehouse
Cubing Services
We use the following IBM InfoSphere components in this scenario:
InfoSphere Warehouse
InfoSphere Warehouse is a suite of components that combines the DB2
database engine with business analytic features. InfoSphere Warehouse
includes a scalable relational database engine, data access capabilities,
business analytics, and user analysis tools. It incorporates core components for
warehouse administration, data mining, OLAP, Inline anayltics and reporting, and
workload management.
4740ch01.fm
Draft Document for Review May 15, 2011 10:30 pm
6
IBM ILOG ODM Enterprise and Data Integration
InfoSphere Warehouse Cubing Services
OLAP is a core component of data warehousing and analytics. It gives users the
ability to interrogate data by intuitively navigating data from summary to detail.
InfoSphere Warehouse Cubing Services, a multidimensional analysis server,
enables OLAP applications access to terabyte volumes of data through industry
standard OLAP connectivity. This warehouse based OLAP capability is a core
pillar of the InfoSphere Warehouse analytics platform.
For detailed information on InfoSphere Warehouse you can refer to the following
Information Center web site:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp
1.4 Development process of the IBM ILOG ODM
Enterprise application
In the following sections, we discuss the development process of the IBM ILOG
ODM Enterprise application. We also cover the roles involved in the IBM ILOG
ODM Enterprise optimization development process.
1.4.1 Roles in the development process
The following roles are involved in the IBM ILOG ODM Enterprise optimization
development process (please refer to Figure 1-2 on page 7):
￿ Business Analyst
￿ Optimization Expert (OR)
￿ Software Developer (IT)
￿ Application QA
Chapter 1. Introduction to the optimization scenario
7
Draft Document for Review May 15, 2011 10:30 pm
4740ch01.fm
Figure 1-2 IBM ILOG ODM Enterprise optimization development process
1.4.2 High level description of the development process
The following steps describe what you need to do to set up the development
process.
1.Define the application data model (separately from optimization). You can do
this from scratch or by reverse engineering an existing database.
What about a DBA?: Since IBM ILOG ODM Enterprise has a data model that
reflects the database, in some cases you might also involve a DBA or an
integration expert, separate from the software developer. This is especially
important when you integrating IBM ILOG ODM Enterprise with other
products, similar to the scenario discussed in this book.
4740ch01.fm
Draft Document for Review May 15, 2011 10:30 pm
8
IBM ILOG ODM Enterprise and Data Integration
2.Build a complete functional application without optimization: create views,
connect to the data, and so on.
3.Add optimization capability. This includes linking to the optimization model
and defining mapping, goals, and requirements.
1.5 Description of the environment
The scenario for the ITSO Motor Bike Company is implemented using an
environment with three servers:
￿ An optimization server running IBM ILOG ODM Enterprise 3.4.0.2.
￿ A data server running IBM InfoSphere Warehouse. This server is used to host
the Corporate Database, ODME_INPUT database, ODME_SCENARIO
database, and the ODME_DIM (reporting) database. Cubing Services is also
used on this server.
￿ An IBM Cognos BI server running IBM Cognos Business Intelligence V10.
Figure 1-3 on page 9 shows the server environment.
Chapter 1. Introduction to the optimization scenario
9
Draft Document for Review May 15, 2011 10:30 pm
4740ch01.fm
Figure 1-3 Scenario environment
4740ch01.fm
Draft Document for Review May 15, 2011 10:30 pm
10
IBM ILOG ODM Enterprise and Data Integration
© Copyright IBM Corp. 2011. All rights reserved.
11
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
Chapter 2.
Implementing the staging
database
This chapter provides you with understanding of the ITSO Motor Bike company
database and designing the data model for staging database (also called
intermediate database) . Staging database schema is designed to suite the
requirement of creating scenarios in ODM Studio. Data will be imported in IBM
ILOG ODM Enterprise using this schema. Also Solution scenario data from IBM
ILOG ODM Enterprise will be exported to staging database. We will also discuss
the design for dimensional modeling for the purpose of generating reports.
This chapter has the following sections:
￿ 2.1, “Introduction and data flow diagram” on page 12
￿ 2.2, “Corporate database” on page 14
￿ 2.3, “Staging database” on page 16
￿ 2.4, “Reporting database” on page 20
2
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
12
IBM ILOG ODM Enterprise and Data Integration
2.1 Introduction and data flow diagram
Figure 2-1 on page 13 shows ITSO Motor Bike company data flow.
Corporate Database (CORP schema) has the ITSO Motor Bike company data.
The staging database consists of the Input database (ODME_STG schema) and
the Scenario database (ODME_SCENARIO schema). Input database is a subset
of the CORP schema and has all the required data for optimizing scenario
calculation in ODM Studio. Data is imported to the ODM Enterprise Scenario
Repository (ODME_INT) from the Input database. We will talk more about ODM
Enterprise Scenario Repository in 3.5.1, “Configuring the connection to ODM
Scenario Repository” on page 46.
Once the solution for the scenario is optimized, scenario data is exported to the
ODME_SCENARIO database. For reporting purposes, the data in the
ODME_SCENARIO is pulled to Reporting database (ODME_DIM) in form of a
star schema.
Chapter 2. Implementing the staging database
13
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
Figure 2-1 Data flow diagram
ODM Enterprise Data Integration Scenario
ODM Enterprise optimization
server on WebSphere
Cognos BI
Scheduler
Reporting
database on
InfoSphere
Warehouse
r
e
p
o
r
t
s

g
e
n
e
r
a
t
e
d
d
a
t
a

u
s
e
d

b
y

C
o
g
n
o
s
Ad Hoc
or
Pre-defined
Reporting
Scenario
database on
InfoSphere
Warehouse
Input
database on
InfoSphere
Warehouse
Corporate database
on
InfoSphere
Warehouse
pull data into star
reporting database
extract of
subset of tables
ODM Scenario
Repository database
InfoSphere Warehouse
o
u
t
p
u
t
d
a
t
a

p
u
l
l
e
d

f
o
r

o
p
t
i
m
i
z
a
t
i
o
n

s
c
e
n
a
r
i
o
c
a
l
c
u
l
a
t
i
o
n
s
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
14
IBM ILOG ODM Enterprise and Data Integration
2.2 Corporate database
ITSO Motor Bike company has a corporate database with historical and live data
corresponding to incoming demand and ongoing production.
Corporate database is a relational database. MOTODB is corporate database
and CORP is corporate schema. Tables are categorized with respect to following
subject areas:
￿ Time Period
Has tables defining the time period as year, quarter, month and calendar.
￿ Customer- Supplier
Has customer/supplier/retailers data.
￿ Product
Has product related data like product type, product price level, product
maturity level, product category and product details.
￿ Region
This has geographical data like region, market/country, city details.
￿ Plant
This has plant details, plant capacity month wise, plant capacity product wise.
￿ Inventory/Demand/Sales
This has transactional tables having stock, marginal profits, demand and
sales data.
￿ Employee
This has employee related tables.
2.2.1 CORP data model
Figure 2-2 on page 15 shows the CORP data model.
Chapter 2. Implementing the staging database
15
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
Figure 2-2 Subset of Corporate ER model
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
16
IBM ILOG ODM Enterprise and Data Integration
2.3 Staging database
The purpose of having thestaging database is to load the data in ODM Studio, so
that planners can create scenarios. Data is extracted from the CORP database
and is loaded into the staging database.
2.3.1 Analyzing the data
ITSO Motor Bike company needs to plan the production for the next months
according to demand, stock and resources, For analyzing incoming demand and
ongoing production, planners needs following data in ODM Studio.
￿ What are different markets where the product is in demand or sold?
￿ What is the monthly demand for the product in the market?
￿ How much initial stock is available for the product?
￿ What is monthly sales figure for a product in the market?
￿ How much is the monthly marginal profits for a product in the market?
￿ What is the monthly plant capacity?
￿ What is the plant capacity product wise?
￿ What is the plant product cost?
2.3.2 Defining the schema
Schema is designed in such a way that the data required by the planners is
available and is imported directly in ODM Studio. ODME_STG is the intermediate
database.
Entities required for the staging database (ODME_STG) are:
￿ YEARS
￿ QUARTERS
￿ MONTHS
￿ REGION
￿ MARKETS
￿ PLANTS
￿ PRODUCT_TYPES
￿ PRODUCT_MATURITIES
￿ PRODUCT_PRICE_LEVELS
Chapter 2. Implementing the staging database
17
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
￿ PRODUCTS
￿ PLANT_MONTH_CAPACITIES
￿ PLANT_PRODUCT_CAPACITIES
￿ PLANT_PRODUCT_COSTS
￿ INITIAL_INVENTORIES
￿ MARGINAL_PROFITS
￿ DEMANDS
￿ SALES
Once the planner creates the solution scenario in ODM Studio, the scenario is
pushed back to the database so that reports can run against it to review the
scenarios. ODME_SCENARIO schema is created to store the scenario data.
2.3.3 ETL for ODME_STG
The following are the characteristics of the ETL process for ODME_STG:
￿ Data is extracted from CORP schema and is loaded to respective tables in
ODM_STG.
￿ It is direct bulk load. No transformation is required.
￿ Load frequency is daily.
2.3.4 ODME_STG data model
Figure 2-3 on page 18 shows the ODME_STG data model.
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
18
IBM ILOG ODM Enterprise and Data Integration
Figure 2-3 Intermediate (ODME_STG) ER model
Chapter 2. Implementing the staging database
19
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
2.3.5 ODME_SCENARIO data model
Figure 2-4 shows the ODME_SCENARIO data model.
Figure 2-4 Intermediate (ODME_SCENARIO) ER model
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
20
IBM ILOG ODM Enterprise and Data Integration
2.4 Reporting database
For generating reports we created and implemented a dimensional model
(ODME_DIM). The following dimensions and facts were identified for this
database:
￿ Dimension
– TIME
– LOCATION
– PRODUCT
– PLANT
￿ Fact
– SCENARIO_FACT
2.4.1 ODME_DIM dimensional model
Figure 2-5 shows the ODME_DIM dimensional model.
Figure 2-5 ODME_DIM dimensional model
Chapter 2. Implementing the staging database
21
Draft Document for Review May 15, 2011 10:30 pm
4740ch02.fm
2.4.2 ETL for ODME_DIM
Data is loaded in dimensions and fact tables as follows:
1.Dimension tables are loaded using CORP Schema
To download these scripts, refer to “ETL_Script_Dimensions.sql” Additional
Material Section of the book.
2.Fact table is loaded using ODME_SCENARIO tables
To download these scripts, refer to Appendix A, “Additional material” on
page 93.
How to download the DDL scripts for the databases: You can download
the DDL scripts for ODME_STG, ODME_SCENARIO and ODME_DIM
schemas using the instructions given in Appendix A, “Additional material” on
page 93.
4740ch02.fm
Draft Document for Review May 15, 2011 10:30 pm
22
IBM ILOG ODM Enterprise and Data Integration
© Copyright IBM Corp. 2011. All rights reserved.
23
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Chapter 3.
Developing and deploying
the IBM ILOG ODM
Enterprise solution
In this chapter we will describe some of the key tasks required to develop and
deploy the IBM ILOG ODM Enterprise solution.
This chapter has the following sections:
￿ 3.1, “Initial development and the application data model” on page 25
￿ 3.2, “Creating the user interface to the solution” on page 34
￿ 3.2, “Creating the user interface to the solution” on page 34
￿ 3.4, “Data exporting” on page 39
￿ 3.5, “Deploying the ODM Enterprise solution” on page 45
In 3.1, “Initial development and the application data model” on page 25, we
briefly describe some initial tasks required to setup the development environment
and then describe how we design the application data model (ADM). Then we
discuss the generation of the user interface for the application in 3.2, “Creating
the user interface to the solution” on page 34. In 3.2, “Creating the user interface
to the solution” on page 34 we show how to connect a mathematical model to the
ODM Enterprise solution. In 3.4, “Data exporting” on page 39 we discuss data
exporting and describes our thinking behind the output schema that we will use
and the development of a custom exporter that will be responsible for populating
3
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
24
IBM ILOG ODM Enterprise and Data Integration
that schema. The last section, 3.5, “Deploying the ODM Enterprise solution” on
page 45, presents the necessary configurations for deployment and the choices
we made for deploying the solution.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
25
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
3.1 Initial development and the application data model
In this section we talk about the initial development and the application data
model in the ODM Enterprise solution.
3.1.1 Initial development
An ODM Enterprise solution has multiple components and each deals with a
specific aspect of the solution. The IBM ILOG ODM Enterprise Developer IDE
that is based on Eclipse allows a development team to create distinct projects for
each of the components in the ODM Enterprise solution. Typically there are four
projects that are needed to develop the full solution:
1.The ODM Enterprise project which contains all the generic ODM Enterprise
deployment settings and ties all projects together. For the solution presented
here we call this project “ITSOMotorBikeCompany”
2.The application data project which allows us to define the application data
model. For the solution presented here the data project is called
“ITSOMotorBikeCompany_data”
3.The OPL project which hosts the mathematical optimization model and its
settings and configurations. For this solution we call the OPL project
“ITSOMotorBikeCompany_opl”
4.The Java project which allows us to develop custom Java calls that hook to
the Application Programming Interfaces (APIs) and implement custom
functionality. For this solution we call the Java project
“ITSOMotorBikeCompany_java”
To read more on the structure of an IBM ILOG ODM Enterprise project go to the
following website (IBM ILOG ODM Enterprise Developer Edition V3.4  IBM
ILOG ODM Enterprise Developer Edition V3.4  ODM Enterprise User Manual
Basic usage  Creating an ODM Enterprise application  The structure of
an ODM Enterprise project):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse199.html
Note: In addition to the link itself, we provide the full path for the IBM ILOG
ODM Enterprise documentation links through this document. The reason for
this is, in the future versions of the product documentation those links might
change. If that happens, knowing the full path to the original link will help you
navigate to the appropriate section in the new product documentation.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
26
IBM ILOG ODM Enterprise and Data Integration
The first step in setting up our development environment is to create the ODM
Enterprise project. We create this project without an OPL project or a Java
project. It is certainly possible to create the OPL project right from the start but for
now we will concentrate on the ODM Enterprise and application data project. We
discuss the OPL project in detail in 3.3, “Adding optimization to the solution” on
page 36. Please follow the instructions on the following website to create the
ODM Enterprise project (IBM ILOG ODM Enterprise Developer Edition V3.4 
IBM ILOG ODM Enterprise Developer Edition V3.4  ODM Enterprise User
Manual Basic usage  Creating an ODM Enterprise application  Creating
an ODM Enterprise project without an OPL project):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse202.html.
This is also the first step in the Datacentric development process we presented in
1.4, “Development process of the IBM ILOG ODM Enterprise application” on
page 6.
3.1.2 Defining the input schema
Once we have created the appropriate Eclipse project we need to create the
ADM that defines the input and output data schema that the solution will use.
We noted earlier in Chapter 1, “Introduction to the optimization scenario” on
page 1, that a key element of an ODM Enterprise solution is the optimization
model that is tied to the application and generates the results that are consumed
by the business users. Typically an optimization expert works on the optimization
model in parallel with the IT experts that work on the rest of the ODM Enterprise
solution.
The optimization expert needs to coordinate with the rest of the IT team on two
key areas. The first one is the input schema definition. All data that is necessary
for the optimization model must be contained in the input data structures. The
second key area is the output data schema which holds all relevant optimization
output so that the ODM Enterprise solution and all systems downstream can take
advantage of the results generated by optimization.
Suggested settings:
￿ Name of the ODM Enterprise project: “ITSOMotorBikeCompany”.
￿ Select the option to “Create a model in a new Data Project”.
￿ Select the default option for naming the data project.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
27
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
In Chapter 2, “Implementing the staging database” on page 11 we described how
the appropriate data for the solution is exported from the corporate database to a
staging database. We use the IBM ILOG Enterprise Developer to import the
schema already defined in that database instead of defining a new one.
The process of importing the ADM from an existing database is documented in
detail in the IBM ILOG ODM Enterprise documentation. Follow the step-by-step
instructions on the following website (IBM ILOG ODM Enterprise Developer
Edition V3.4  IBM ILOG ODM Enterprise Developer Edition V3.4  ODM
Enterprise User Manual Basic usage  Creating an ODM Enterprise
application  Creating the Application Data Model  Creating the ADM by
importing from an existing database):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse218.html.
In this solution we connect to the staging database as show in Figure 3-1.
Figure 3-1 Defining the ODM Enterprise staging database
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
28
IBM ILOG ODM Enterprise and Data Integration
The remaining steps in the Reverse Engineering procedure are practically
identical, except for the name of the database schema (we use ODME_STG).
For this solution we did not alter the imported schema in any way. We believe that
with careful design of the ODM Enterprise staging database that will be the case
in most solutions. However, we are still missing appropriate data structures to
hold the output of the optimization and allow us to export the optimization
solution to other systems.
3.1.3 Defining the output schema
The output schema must capture all necessary information from the optimization
solution. Based on the business problem we described 1.1, “Scenario
introduction” on page 2, the key areas that the optimization solution is helping
our decision process and we want to save as part of the solution are:
￿ the production quantities at the various plants (for each product over the
planning horizon)
￿ the allocation quantities at the various markets (for each product over the
planning horizon)
￿ the executed sales at the various markets (for each product over the planning
horizon)
In addition to the above, it will be helpful to obtain the inventory quantity kept at
each market (for each product) even thought that quantity can be easily
computed from the other three. We now describe how to define the output
schema.
We define the output schema of the ADM using the Data Diagram Editor. Follow
the link to the following website (IBM ILOG ODM Enterprise Developer Edition
V3.4  IBM ILOG ODM Enterprise Developer Edition V3.4  ODM Enterprise
User Manual Basic usage  Creating an ODM Enterprise application 
Creating the Application Data Model  Creating the ADM using the Data
Diagram Editor):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse210.html.
Suggested settings:
￿ The schema that will be used by the ADM of the solution is the one under
Database  Schema. It is therefore necessary to move all the tables from
the imported schema (in this case ODME_STG) to Database  Schema.
￿ Delete all other schemas from the data project.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
29
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
We now provide step-by-step instructions on how to create the table that will hold
the production quantities. We then provide high-level descriptions of the other
three tables. With the step-by-step instructions and the documentation section
mentioned above it will be easy to edit the ADM (Application Data Model) and
add the remaining tables.
Production
Perform the following for the production step of the ODM Enterprise solution:
1.Switch to the Data perspective in Eclipse. Choose Window Open
Perspective  Other  Data from the IDE’s main menus to display this
perspective.
2.In the Data Project Explorer, double-click Data Models  Data Model.dbm
to open its Overview Editor, and to allow you to expand its contents.
3.Open the contents of the Data Models section so that you can see all of its
elements as seen in Figure 3-2.
Figure 3-2 Expanded Data Project Explorer
4.Right-click on the Diagrams folder and select New Blank Diagram.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
30
IBM ILOG ODM Enterprise and Data Integration
5.From the menu select Window Show View Properties and select the
new diagram view. In the properties window rename the view “Production
(Results)”.
6.Double-click on the new Productions (Results) view. The main panel in
Eclipse now shows the Data Diagram Editor as seen in Figure 3-3 on
page 30.
Figure 3-3 Data Diagram Editor
7.Add a new table in the diagram by hovering the mouse over any blank area of
the diagram and clicking the Add Table button as seen in Figure 3-4.
Alternatively, you can also use Add New Table menu selection in the popup
menu.
Figure 3-4 Adding a new table in the Data Diagram Editor
8.Name the table “PRODUCTIONS”.
9.With the PRODUCTIONS table highlighted, go to the Columns tab of the
properties window.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
31
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
10.Click the New button and add a new column named “VALUE” and change its
data type to “INTEGER” as shown in Figure 3-5.
Figure 3-5 Adding the value column
11.In the Data Project Explorer make sure the Schema is expanded and select
MONTHS, PLANTS and PRODUCTS tables at the same time. Drag and drop
all three tables in the Productions (Results) view. See Figure 3-6.
Figure 3-6 Productions and other tables without any relationships
12.Using the step-by-step instructions on the following link (IBM ILOG ODM
Enterprise Developer Edition V3.4  IBM ILOG ODM Enterprise Developer
Edition V3.4  ODM Enterprise User Manual  Basic usage  Creating
an ODM Enterprise application  Creating the Application Data Model 
Creating the ADM using the Data Diagram Editor  Defining primary
key–foreign key relationships)
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?top
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
32
IBM ILOG ODM Enterprise and Data Integration
ic=/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/
_pubskel/ODME_pubskels/startall_ODME34_Eclipse215.html and add an
“Identifying FK relationship” from the PRODUCTS table to the
PRODUCTIONS table.
Make sure to select Create a new child attribute/column when they Key
Migration column comes up and name that new column PRODUCT.
13.Using similar steps add an “Identifying FK relationship” from the PLANTS
table to the PRODUCTIONS table. Name the new column PLANT.
14.Additionally, add an Identifying FK relationship from the MONTHS table to
the PRODUCTIONS table. Name the new column MONTH.
In the end, the production table and the associated connections should look like
Figure 3-7.
Figure 3-7 Productions table definition and related tables
Allocation
We defined the allocation table as seen in Figure 3-8 on page 33.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
33
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Figure 3-8 Allocation table definition and related tables
Inventories
We defined the inventories table as seen in Figure 3-9.
Figure 3-9 Inventories table definition and related tables
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
34
IBM ILOG ODM Enterprise and Data Integration
Executed sales
We defined the executed sales table as seen in Figure 3-10.
Figure 3-10 Executed sales table definition and related tables
3.2 Creating the user interface to the solution
It is very easy to create various views of both the input and output tables in order
to help the users of the solution easily update input data and overview output
data.
Follow the website link to find out how to create input and output views (IBM
ILOG ODM Enterprise Developer Edition V3.4  IBM ILOG ODM Enterprise
Developer Edition V3.4  ODM Enterprise User Manual Basic usage 
Creating an ODM Enterprise application  Generating default views for ADM
tables):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/topic/ilog.odms.
ide.odme.help/Content/Optimization/Documentation/ODME/_pubskel/ODME_pub
skels/startall_ODME34_Eclipse224.html.
The objective here is to create views that will allow the users of IBM ILOG ODM
Enterprise Planner to be able to review and edit all relevant input and output data
in the most convenient way.
For this solution we created and organized the input as seen in Figure 3-11 on
page 35.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
35
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Figure 3-11 Input view names, types and organization
Additionally, we defined the output views as shown in Figure 3-12 on page 35.
Figure 3-12 Output view names, and types
There are multiple other user interface customizations that can be implemented
as part of an ODM Enterprise solution. The user interface for this ODM
Enterprise solution is identical to the interface for the SupplyDemand demo that
is shipped with the distribution. Use the instructions on the following website link
to learn how to open the examples that come with the distribution (IBM ILOG
ODM Enterprise Developer Edition V3.4  IBM ILOG ODM Enterprise
Developer Edition V3.4  Getting Started with the ODM Enterprise IDE
Opening examples and changing perspectives  The ODM Enterprise
examples):
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
36
IBM ILOG ODM Enterprise and Data Integration
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse31.html
Once the New Example window comes up, select the Sorted by Complexity
tab and scroll down to the Demo section and select Supply Demand as in
Figure 3-13.
Figure 3-13 Next example dialogue window
3.3 Adding optimization to the solution
In this section we discuss the generation of the OPL project we mentioned in
3.1.1, “Initial development” on page 25.
The optimization model that is integrated with an ODM Enterprise solution is
developed in parallel with all the other parts of the solution. Even though the
team that develops the optimization model can work separately from the team
that develops the rest of the application it makes sense for the two teams to be in
constant communication. We already discussed how these two teams need to
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
37
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
coordinate to agree on the input and output schemas. Now we discuss all the
tasks that have to be completed by the optimization team.
1.First we need to add an OPL project to the ODM Enterprise solution. Follow
the steps on the website link below for detailed instructions (IBM ILOG ODM
Enterprise Developer Edition V3.4  IBM ILOG ODM Enterprise Developer
Edition V3.4  ODM Enterprise User Manual Basic usage  Creating
an ODM Enterprise application  Modifying an ODM Enterprise project 
Adding a new OPL project to an ODM Enterprise project):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?top
ic=/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/
_pubskel/ODME_pubskels/startall_ODME34_Eclipse205.html
2.Next we need to map the data in the application data model to the OPL
project. This achieved through the
ODM to OPL Mapping Editor
. The
following link provides instructions on how the Mapping Editor works (IBM
ILOG ODM Enterprise Developer Edition V3.4  IBM ILOG ODM Enterprise
Developer Edition V3.4  ODM Enterprise User Manual Basic usage 
Creating an ODM Enterprise application  Mapping the Application Data
Model to the OPL project  The ODM To OPL Mapping Editor):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?top
ic=/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/
_pubskel/ODME_pubskels/startall_ODME34_Eclipse229.html.
The optimization model that we are going to use in this solution utilizes the name
of the month to distinguish between different time periods. The name of the
month in this example happens to also inlcude the name of the year (for example
“Jan-2007”) it can be used as a unique index for the planning horizon even over
multiple years. As a result the optimization model does not need the data
structures related to years and quarters and we therefore do not have to map
ODM to OPL mapping key points:
The following are key points for ODM to OPL mapping:
￿ The key objective during mapping is to map only the data structures that
are necessary for the optimization model. The input schema might contain
additional structures that enrich the IBM ILOG ODM Enterprise GUI but are
not necessary for the optimization model.
￿ Typically most input schema structures are added as OPL input and most
output schema structures are added as OPL output.
￿ Mapping automatically generates a .mod file that can be imported by the
OPL project.
￿ It is possible to edit the OPL output within the mapping editor to
accomodate cases where the default choices made by the editor are not
ideal.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
38
IBM ILOG ODM Enterprise and Data Integration
them in the Mapping Editor. More specifically, notice that when mapping the
Months data structure we only map the name without the foreign key to the
Quarters or the ID field.
Additionally, the optimization model does not make use of product specific
information like maturities, price levels and types. As a result these, data
structures are not mapped and when it comes to the mapping of the Products
structure itself, we leave out the foreign keys to all these structures. Very similar
considerations lead to the mapping of Markets without Regions.
Once the mapping is complete, the Mapping Editor should look like Figure 3-14
on page 38.
Figure 3-14 ODM to OPL Mapping editor
3.Save the changes in the editor by clicking Save. As soon as the changes are
saved, the ITSOMotorBikeCompany_odm.mod file in the OPL project is
updated.
4.The optimization expert team can now either start to develop the optimization
model or copy and paste existing models in the ITSOMotorBikeCompany.mod
file.
5.For the ODM Enterprise solution we are building here we already have a fully
functional optimization model that we can use right away. It is the model
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
39
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
contained in the “SupplyDemand.mod” file of the Supply Demand IBM ILOG
ODM Enterprise Demo that is included in the distribution.
In order to generate a data set that can be used with OPL from the user interface
go to the link (IBM ILOG ODM Enterprise Developer Edition V3.4  IBM ILOG
ODM Enterprise Developer Edition V3.4  ODM Enterprise User Manual
Basic usage  Creating an ODM Enterprise application  Exporting OPL
data files from ODM Studio):
http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=
/ilog.odms.ide.odme.help/Content/Optimization/Documentation/ODME/_pubsk
el/ODME_pubskels/startall_ODME34_Eclipse232.html
3.4 Data exporting
The output from the ODM Enterprise solution typically is required by multiple
business stakeholders inside a company. In most cases it makes sense to have
the solution information and all relevant input information exported to a separate
data store for safekeeping and general reporting purposes. In this section we
show how to develop a custom data exporter that achieves exactly that.
3.4.1 Data exporting schema
There are three main sets of tables that the data exporting schema needs to
contain:
1.The input tables. It is recommended that this set of tables is identical to the
schema used for the staging database. It is important to include these tables
as part of the scenario data export schema since the scenario input can be
edited inside the IBM ILOG ODM Enterprise application by the user.
Benefits of integrating the OPL project to the IBM ILOG ODM Enterprise
projects earlier rather than later:
By integrating the OPL project to the IBM ILOG ODM Enterprise projects
earlier rather than later the optimization development team benefits from:
￿ Working with real data imported from the staging database through the
input schema.
￿ Sharing intermediate results with the business users through the user
interface.
￿ Generating debugging data sets from the user interface.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
40
IBM ILOG ODM Enterprise and Data Integration
2.The output tables. It is recommended that this set of tables is identical to
output schema defined in 3.1.3, “Defining the output schema” on page 28.
3.An auxiliary set of tables. In the implementation of this ODM Enterprise
solution we only included one auxiliary table to capture scenario specific
information in order to be able to uniquely identify a scenario. The information
we captured was:
– the user that generated the scenario
– the time that the export occurred
– the name of the scenario
This new schema will have to be constructed in a separate database instance
and given an appropriate name. We named this schema ODME_SCENARIO.
3.4.2 Creating and configuring the Java project
We now describe how to create the Java project that will contain the code
necessary to export the data.
1.Switch to the Java perspective in Eclipse. From the menu navigate to:
Window Open Perspective  Other ... and select Java (Default).
2.From the menu select: File  New Java Project.
3.In the “New Java Project” window add “ITSOMotorBikeCompany_java” as the
name of the project and select Next.
4.Select the Libraries tab and click on the Add Library... button. Select ODM
Library from the list and click Next and then Finish.
5.Once the project has been created we need to create a package that holds
the code which implements the custom exporting. Right-click on the src folder
under the Java project and select New Package and name the package
itsomotorbikecompany.export.
3.4.3 Custom exporting code
We implement two Java classes. The first one is called
DatabaseUtilities.java

and the second one
DatabaseExporter.java
. The code for both of these classes
can be downloaded using the instructions provided in Appendix A, “Additional
material” on page 93.
Database utilities
In the DatabaseUtilities.java class we implement a number of generic utility
functions which we briefly describe below:
￿ setProperties: Reads a properties file that defines:
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
41
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
– the database type: DB2
– the class name for the JDBC drivers: com.ibm.db2.jcc.DB2Driver
– the database name
– the schema name where we will store all exporting data
– the user name to connect to the database
– the password
– the server name where the database is hosted
– the port number for the server
￿ getConnection: Opens a JDBC connection to the database
￿ deleteTable: Deletes all rows in a given database table through an
appropriately formed SQL statement
￿ populateTable: Populates a given database table with a given list of strings
through a series of SQL update statements
￿ closeConnection: Closes the JDBC connection to the database
Database exporter
The DatabaseExporter.java class implements the IloScenarioExporter interface.
This is a requirement for any custom code class that will export data from an
ODM Enterprise solution. We now briefly describe the functions that are
implemented in this class:
￿ deleteOutputTables: Deletes all output database tables for a given scenario
by calling the deleteTable function in DatabaseUtilities.java
￿ deleteInputTables: Deletes all input database tables for a given scenario
￿ deleteAuxiliaryTables: Deletes all auxiliary database tables for a given
scenario
￿ exportTable: Returns a list of strings that contain all the data in a scenario
table and can be used with the populateTable function in
DatabaseUtilities.java
￿ exportOutputTables: Updates all output database tables for a given scenario
￿ exportInputTables: Updates all input database tables for a given scenario
￿ exportAuxiliaryTables: Updates all auxiliary database tables for a given
scenario
￿ exportScenario: This is the function that is inherited from IloScenarioExporter
and must be implemented. It first deletes the contents of the tables in the data
exporting schema and then populates them with the data in the active
scenario.
Sample code
We present the implementation of the exportTable function below that shows how
the IBM ILOG ODM Enterprise API can be used to obtain data from an IBM ILOG
ODM Enterprise table for a given scenario. See Example 3-1 on page 42.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
42
IBM ILOG ODM Enterprise and Data Integration
Example 3-1 The exportTable method that uses key functions from the IBM ILOG ODM Enterprise API
private List<String> exportTable(IloTable anODMETable)
{
List<String> vReturnList = new ArrayList<String>();
IloSchema vTableSchema = anODMETable.getTableSchema();
List<IloColumn> vColumns = vTableSchema.getColumnsList();
for (Iterator<IloRow> vRows = anODMETable.getRows().iterator();
vRows.hasNext();)
{
IloRow vRow = vRows.next();
String vStringRow = "";
int vColumnCount = 0;
for(IloColumn c : vColumns)
{
IloDataType vDataType = c.getDataType();
String vColumnName = c.getId();
if( (vDataType.getJavaClass() == Integer.class) ||
(vDataType.getJavaClass() == Double.class) ||
(vDataType.getJavaClass() == Float.class) )
{
vStringRow += "" + vRow.getValue(vColumnName);
}
if( vDataType.getJavaClass() == String.class )
{
vStringRow += "'" + vRow.getValue(vColumnName) + "'";
}
if( vColumnCount < (vColumns.size()-1) )
vStringRow += ", ";
vColumnCount++;
}
vReturnList.add(vStringRow);
}
return vReturnList;
}
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
43
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Example 3-1 on page 42 shows how the function exportTable first obtains a
definition of the schema of the table and then the columns in that schema. It then
demonstrates how to iterate over the rows in that table capturing every column in
an appropriate way depending on its datatype.
Once the code is ready we package all classes into a jar file. A good location for
the jar file is to have it in the deploy directory under the ODM Enterprise project
ITSOMotorBikeCompany.
We then configure the application so that it can locate the jar file.
1.First switch to the IBM ILOG ODM Enterprise perspective by navigating to:
Window Open Perspective  Other... and selecting ODM Enterprise.
2.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder.
3.Double-click on the deployment_dev.odmds file and open the Additional
JARs ...and Resources tab.
4.Click the Add Resource button and navigate to the deploy directory where
the newly create .jar file is stored and click Open.
3.4.4 Editing the XML
In order to have appropriate menu options appear in the IBM ILOG ODM
Enterprise application GUI that are linked to the custom Java code and allow the
user to export a scenario we need to edit the deployment_prod.odmds file of the
IBM ILOG ODM Enterprise project.
1.In the ODM Enterprise Projects panel, expand the ITSOMotorBikeCompany
project and then expand the Deployments folder.
2.Right-click on the deployment_dev.odmds file and select Open with  Text
Editor.
3.Notice that this is an XML file with an empty (by default) section called
“ScenarioExporters”. In this section we add the XML in Example 3-2.
Example 3-2 Necessary XML additions
<scenarioExporter id="publish2DB">
<template>
<message>Publish to Reporting Database</message>
<args/>
</template>
<customExporter
javaClass="ITSOMotorBikeCompany.export.DatabaseExporter"/>
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
44
IBM ILOG ODM Enterprise and Data Integration
</scenarioExporter>
The message tab defines the text that will appear in the IBM ILOG ODM
Enterprise application menu. The javaClass argument must point to the class
that implements IloScenarioExporter.
3.4.5 Debugging the custom Java code
In order to debug the custom Java code for the data exporter we need to deploy
the IBM ILOG ODM Enterprise application and setup a special debug
configuration in Eclipse using the steps that follow:
1.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder. Right-click on the
deployment_dev.odmds file and select Open with  ODM Enterprise
Deployment Settings Editor (this is usually the default choice).
2.Open the Deployment tab and click the Deploy button. (See Figure 3-15).
Figure 3-15 Application deployment
3.Now that the development application has been deployed we create the
debug configuration. Switch to the Java perspective by navigating to
Window Open Perspective  Other... and select Java (Default).
4.Right-click on the Java project and select: Debug As  Java Application.
5.Select the IloOplOdmLauncher from the ilog.oplodm.service package as
seen in Figure 3-16.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
45
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Figure 3-16 Select the IloOplOdmLauncher class for the debug configuration
6.Once the class has been selected, the IBM ILOG ODM Enterprise application
launcher window displays prompting the user to select the .odmapp file to be
opened. Navigate to the path defined when the application was deployed in
step 8.
7.The application launches normally and waits for user input. In order to start
debugging the Java code we select a scenario from the Scenario Explorer
panel and then we navigate from the application menu to: Scenario 
Export  Publish to Reporting Database. This causes the Java code to
execute and the debugger stops at any breakpoints we have set in the code.
3.5 Deploying the ODM Enterprise solution
In this section we describe how to setup the connections to the various
databases and servers that will be used by the ODM Enterprise solution.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
46
IBM ILOG ODM Enterprise and Data Integration
3.5.1 Configuring the connection to ODM Scenario Repository
The first thing we need to set-up is the connection to the ODM Repository. This
repository is essentially an internal database that the ODM Enterprise solution
uses to save all generated scenarios and work-in-progress.
1.First, switch to the ODM Enterprise perspective in Eclipse.
2.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder and double-click on the
deployment_prod.odmds file.
3.Open the ODM Repository tab and select the Multi-user mode radio button.
4.Then select the Database Type as IBM DB2 v9 from the drop-down menu.
5.Enter the hostname (IP address) of the machine that hosts the DB2 instance
where the ODM Repository is located and the port number for that machine
as in Figure 3-17 on page 47.
6.Enter the instance name of the database instance that will be used for the
ODM Repository (in this case, ODME_INT).
7.It is a good idea to provide a specific name for the ODM Repository schema
and also provide a separate account (username and password) that the ODM
Enterprise application will use to access the repository. In the end the ODM
Repository tab looks like Figure 3-17 on page 47.
8.Click on Test Connection to make sure the connection to ODM Repository
has been set-up properly.
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
47
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
Figure 3-17 ODM Repository set-up
9.Once the connection is working click on Create Schema so that the
appropriate schema is generated on the database. This is why when we
created the ODME_INT database we did not create a schema for it. IBM
ILOG ODM Enterprise takes care of that automatically.
10.Click on Administer Database and add user accounts by clicking Add User
and providing a user name and password.
The ODM Repository has now been configured and every time the IBM ILOG
ODM Enterprise application executes, it will ask for the credentials of one of the
users given access to the repository.
3.5.2 Configuring the connection to the staging database
The following steps describe how to setup the connection to the staging
database which holds the input data relevant to the ODM Enterprise solution that
is imported from the corporate database.
1.Switch to the ODM Enterprise perspective in Eclipse.
2.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder and double-click on the
deployment_prod.odmds file.
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
48
IBM ILOG ODM Enterprise and Data Integration
3.Open the Datasources tab, right-click on Datasources and select New
Database Scenario Datasource.
4.A new datasource called “new_source (Default)” appears under Datasources
and its properties appear on the right.
5.The Datasource name will appear in the IBM ILOG ODM Enterprise Studio
and it therefore needs to reasonably descriptive for a business user to
understand. We name it ODME Staging DB.
6.From the Choose Database Connection drop-down, select ODME Staging
(from Eclipse Database Connections). This is the connection we configured
when we imported the database schema from the ODM Enterprise Staging
database.
7.We now configure the SQL statements that will be executed when a user
selects Create New Default Scenario in IBM ILOG ODM Enterprise Studio
and all relevant optimization data needs to be imported to the ODM
Enterprise Repository (ODM Enterprise internal database).
8.For each statement we click on the Add button and select an input table from
the drop-down list.
9.The SQL statement is filled in automatically based on the column definitions
in the ADM. We update the schema used in the SQL statement from “app” to
“ODME_STG”.
Once we have completed all required setup the Datasources tab looks similar to
Figure 3-18.
Figure 3-18 Datasources tab for the ODME Staging datasource
Chapter 3. Developing and deploying the IBM ILOG ODM Enterprise solution
49
Draft Document for Review May 15, 2011 10:30 pm
4740ch03.fm
3.5.3 Configuring the connection to the optimization server
We now describe how to setup the connection to the optimization server so that
when users solve a scenario in IBM ILOG ODM Enterprise Studio the solve
occurs on the remote server rather than locally.
1.Switch to the ODM Enterprise perspective in Eclipse.
2.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder and double-click on the
deployment_prod.odmds file.
3.Open the Optimization Server tab and check the check box that reads
Additionally I want to use an optimization server when solving
scenarios.
4.We then add fill in the URL for the server location which is of the form:
http://<server>:<port>/optimserver/. Note that <server> is the IP address of
the machine hosting the IBM ILOG ODM Enterprise Server and <port> is
9081 under default settings.
5.Click on the Test Connection... button to ensure that the connection has
been set-up properly.
3.5.4 Deploying the IBM ILOG ODM Enterprise application
Once all the database and server connections have been setup we can deploy
the application on the optimization server so that users can access it.
1.First switch to the ODM Enterprise perspective in Eclipse.
2.In the ODM Enterprise Projects panel expand the ITSOMotorBikeCompany
project and then expand the Deployments folder and double-click on the
deployment_dev.odmds.
3.Open the Deployment tab and click the Deploy button (See Figure 3-15).
For a user to run the IBM ILOG ODM Enterprise application they would need to
install IBM ILOG ODM Enterprise Planner and obtain a copy of the contents of
the deploy directory (the .odmapp file and all .jar files).
4740ch03.fm
Draft Document for Review May 15, 2011 10:30 pm
50
IBM ILOG ODM Enterprise and Data Integration
© Copyright IBM Corp. 2011. All rights reserved.
51
Draft Document for Review May 15, 2011 10:30 pm
4740ch04.fm
Chapter 4.
IBM ILOG ODM Enterprise
Scenario Management
This chapter provides, describes, IBM ILOG ODM Enterprise scenario
management functionality, We will introduce key concepts relating to the
business value and technical background of scenario management.
Focus areas will include:
￿ 4.1, “Scenario management: Basic concepts” on page 52
￿ 4.2, “Creating a new scenario” on page 57
￿ 4.3, “Solving and reviewing scenarios” on page 60
￿ 4.4, “Scenario collaboration and sharing” on page 67
￿ 4.5, “Scenario export” on page 68
4
4740ch04.fm
Draft Document for Review May 15, 2011 10:30 pm
52
IBM ILOG ODM Enterprise and Data Integration
4.1 Scenario management: Basic concepts
In this section we will describe the concept of “scenario” in the sense it is used
within IBM ILOG ODM Enterprise. The “Supply Demand” model will be used as
an example throughout this chapter, supplemented by some description of
additional related functionality that is absent from this example.
An ODME scenario is a collection of input data, goals, requirements, rules and
output values. Essentially a scenario represents the full input and output of an
ODME optimization model.
Scenarios can be used for several business purposes which will be illustrated in
the following sections, each leveraging one or more features of ODM.Enterprise.
Upon opening ODM Studio to begin an initial planning or scheduling session, a
business user would encounter an empty Scenario Workspace, as in Figure 4-1
on page 52.
Figure 4-1 ODM Studio
4.1.1 Creating an initial scenario
We create an initial scenario, named “New Default Scenario” by one of two
means:
￿ Right-click the Workspace icon and select New Default Scenario from the
context menu.
￿ Select New and then New Default Scenario from the File Menu.
This action executes a set of queries drawing a full set of input data from the
source database.In addition to basic data elements, model elements including
goals, rules and requirements are imported into the IBM ILOG ODM Enterprise
working database.
Chapter 4. IBM ILOG ODM Enterprise Scenario Management
53
Draft Document for Review May 15, 2011 10:30 pm
4740ch04.fm
4.1.2 Reviewing scenario components
At this point in the process, we can examine the data that has been imported
from the corporate database. We can also modify any of the input data elements
in the scenario. As this is intended as a baseline scenario, we typically would
solve it without modification.
We can examine input data elements that are presented in table or chart form by
selecting the required element from the Scenario Explorer area in ODM Studio
as displayed in Figure 4-2
Figure 4-2 Scenario Explorer area
Input data are presented as tables or charts. We can see in Figure 4-3 on
page 54 two tables; Firm Orders, presented as a pivot table, and Plant
Capacities, presented as a group of line graphs. Table data is, by default editable,
unless the application developer has locked some or all fields in a table. Chart
data is, of course, read only.
4740ch04.fm
Draft Document for Review May 15, 2011 10:30 pm
54
IBM ILOG ODM Enterprise and Data Integration
Figure 4-3 Firm Orders and Plant Capacities
We solve this scenario by selecting it from the Scenario Workspace and selecting
the Solve option from the context menu presented after a mouse right-click.
After IBM ILOG ODM Enterprise completes data checking, a Solve Progress box,
similar to the one shown in Figure 4-4 on page 55 appears.
Chapter 4. IBM ILOG ODM Enterprise Scenario Management
55
Draft Document for Review May 15, 2011 10:30 pm
4740ch04.fm
Figure 4-4 Solve Progress box
As the optimization progresses, this box displays the value of each of the goals
that make up the model’s objective function as well as the combined objective
which is a weighted sum of the goals currently being used as the optimization
criterion.
We can see more details on the values of these goals by selecting Goals in the
Analysis folder. This will display the screen we see in Figure 4-5 on page 56.
4740ch04.fm
Draft Document for Review May 15, 2011 10:30 pm
56
IBM ILOG ODM Enterprise and Data Integration
Figure 4-5 Selecting Goals in the Analysis folder
Here we see that there are three goals:
￿ Production Cost
￿ Marginal Profit
￿ Supply-Demand Deviation
Each of these goals has the Active check box checked and has an Importance of
1.0. This indicates that the combined objective is the sum of these goals, each
weighted by a factor of 1.0. In the case of this particular model, we are effectively
optimizing Marginal Profit minus Production cost minus Supply-Demand
Deviation.
On this screen we can see the values of the three goals in the optimal solution of
this scenario. We selected one of the goals, in this case, Production Cost which
allows drilling down on the components of that goal, specifically production costs
broken out by location and model.
Supply-Demand Deviation: Supply-Demand Deviation is calculated as the