Optimization Services Instance Language (OSiL)

Slides:



Advertisements
Similar presentations
The eXtensible Markup Language (XML) An Applied Tutorial Kevin Thomas.
Advertisements

Optimization Services Robert Fourer, Jun Ma, Kipp Martin Optimization Services OS Server and OS Libraries Jun Ma Industrial Engineering.
SCIP Optimization Suite
Solver and modelling support for stochastic programming H.I. Gassmann, Dalhousie University Happy Birthday András, November 2009.
What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
AMPL Presentation 1 By Raymond Kleinberg Outline AMPL - Ugh! - What is it good for? Basics Starting a Problem Running the Problem Example.
Optimization Services (OS) Framework and OSP Protocols (OSxL) “Combining Operations Research with Computing Technology” Jun Ma 10/24/2004.
1 LPFML: A W3C XML Schema for Linear and Integer Programming Robert Fourer Northwestern University Leonardo Lopes University.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
Robert Fourer, Jun Ma, Kipp Martin, Optimization Services, January 18, 2005 Optimization Services (OS) Jun Ma Motorola, Schaumburg 01/18/2005 Robert Fourer.
Robert Fourer, Jun Ma, Kipp Martin Optimization Services Instance Language (OSiL), Solvers, and Modeling Languages Kipp Martin University of Chicago
Quantitative Methods of Management
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
Optimization Services Robert Fourer, Jun Ma, Kipp Martin Setting Up and Hosting Your Solver as Web Services via Optimization Services (OS) Jun Ma
Recent Changes to the Optimization Services Project H.I. Gassmann, Faculty of Management J. Ma, Northwestern University R.K. Martin, The University of.
Robert Fourer, Jun Ma, Kipp Martin Copyright 2006 An Enterprise Computational System Built on the Optimization Services (OS) Framework and Standards Jun.
Extensions to the OSiL schema: Matrix and cone programming Horand I. Gassmann, Dalhousie University Jun Ma, Kipp Martin, Imre Polik.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
Linear Programming Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Jun Ma, Optimization Services, July 19, 2006 Optimization Services (OS) Today: open Interface for Hooking Solvers to Modeling Systems Jun Ma Northwestern.
Robert Fourer, Jun Ma, Kipp Martin Optimization Services and the Stylized “OS” Logo are registered in the US Patent & Trademark Office. All other product.
An introduction to stochastic programming H.I. Gassmann.
Jun Ma, Optimization Services, June 23, 2005 Optimization Services (OS) Jun Ma Industrial Engineering and Management Sciences Northwestern University T.J.
Fourer, Ma, Martin, An Open Interface for Hooking Solvers to Modeling Systems INFORMS International, Puerto Rico, July 8-11, INFORMS International.
XML Schema. Why Validate XML? XML documents can generally have any structure XML grammars define specific document structures Validation is the act of.
Robert Fourer, Jun Ma, Kipp Martin, Optimization Services, May 06, 2005 Optimization Services (OS) Jun Ma Industrial Engineering and Management Sciences.
Diego Klabjan, Jun Ma, Robert Fourer – Northwestern University.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
XML eXtensible Markup Language. XML A method of defining a format for exchanging documents and data. –Allows one to define a dialect of XML –A library.
An XML-based schema for stochastic programs H.I. Gassmann, R. Fourer, J. Ma, R.K. Martin EURO XXI, June 2006, Reykjavik.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Robert Fourer, Jun Ma, Kipp Martin Copyright 2006 Optimization Services hookup Language (OShL) Jun Ma INFORMS, Pittsburgh 11/08/2006 Jun Ma Robert Fourer.
Jun Ma, Optimization Services, May 18, 2005 Optimization Services (OS) Jun Ma Industrial Engineering and Management Sciences Northwestern University Lindo.
Optimization Services Framework and OSxL Protocols Jun Ma Northwestern University 09/14/04.
Martin Kruliš by Martin Kruliš (v1.1)1.
XML Validation II Advanced DTDs + Schemas Robin Burke ECT 360.
OSiL: An XML-based schema for stochastic programs H.I. Gassmann, R. Fourer, J. Ma, R.K. Martin SP XI Vienna, August 2007.
Jun Ma, Sanjay Mehrotra and Huanyuan Sheng Impact Solver for Optimization Services, November 8, 2006 On Implementing a Parallel Integer Solver Using Optimization.
Robert Fourer, Jun Ma, Kipp Martin Copyright 2005 Optimization Services (OS) Jun Ma Annapolis, 01/07/2005 Robert Fourer Jun Ma Northwestern University.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Huanyuan Sheng, Sanjay Mehrotra and Jun Ma Impact Solver for Optimization Services, November 15, 2005 IMPACT Solver for Optimization Services Huanyuan(Wayne)
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
ACG 4401 XML Schemas XML Namespaces XLink.
Coopr: A Python Repository for Optimization
ACG 4401 XML Schemas XML Namespaces XLink.
XML in CCSDS CCSDS Spring Meeting - Montreal
XML QUESTIONS AND ANSWERS
CMP 051 XML Introduction Session IV
XML in Web Technologies
Eugenia Fernandez IUPUI
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Optimization via Simulation under Optimization Services (OS)
Advanced Database Models
Chapter 7 Representing Web Data: XML
Optimization Services (OS)
Huanyuan(Wayne) Sheng
Optimization Services Instance Language (OSiL)
A Mathematical Programming Language
CMP 051 XML Introduction Session III
Presented by: Jacky Ma Date: 11 Dec 2001
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
An XML-based schema for stochastic programs
More XML XML schema, XPATH, XSLT
XML: The new standard -Eric Taylor.
Presentation transcript:

Optimization Services Instance Language (OSiL) Robert Fourer Jun Ma Northwestern University Kipp Martin University of Chicago Jun Ma Northwestern University

Outline 1. Background and motivation for an instance standard Why use XML for the instance standard 3. Optimization Services instance Language (OSiL) - this replaces LPFML for the linear case and can be used to represent a wide variety of optimization problems. The OSiL schema 5. Real time data and user defined functions 6. Extensions 2

A Distributed Modeling Environment 3

A Distributed Modeling Environment In a loosely coupled setting we have a separation of the modeling language process and solver process. Key idea: model versus instance The solver wants an instance as opposed to a model 4

A MODEL This is a model. It is symbolic, general, concise, set PROD; # products set DEP; # processing departments param hours {DEP}; # time available in each department param rate {DEP,PROD}; # hours used in each dept per product unit made param profit {PROD}; # profit per unit of each product made var Make {PROD} >= 0; # number of units of each product to be made maximize TotalProfit: sum {j in PROD} profit[j] * Make[j]; subject to HoursAvailable {i in DEP}: sum {j in PROD} rate[i,j] * Make[j] <= hours[i]; This is a model. It is symbolic, general, concise, and understandable (Fourer, 1983). 5

DATA param: PROD: profit := std 10 del 9 ; param: DEP: hours := cutanddye 630 sewing 600 finishing 708 inspectandpack 135 ; param: rate: std del := cutanddye 0.7 1.0 sewing 0.5 0.8333 finishing 1.0 0.6667 inspectandpack 0.1 0.25 ; 6

MODEL + DATA = INSTANCE maximize TotalProfit: 10*Make[‘std’] + 9*Make[‘del’]; subject to HoursAvailable[‘cutanddye’]: 0.7*Make[‘std’] + Make[‘del’] <= 630; subject to HoursAvailable[‘sewing’]: 0.5*Make[‘std’] + 0.8333*Make[‘del’] <= 600; subject to HoursAvailable[‘finishing’]: Make[‘std’] + 0.6667*Make[‘del’] <= 708; subject to HoursAvailable[‘inspectandpack’]: 0.1*Make[‘std’] + 0.25*Make[‘del’] <= 135; Objective: represent a model instance using XML. 7

AIMMS CLP AMPL Impact GAMS GLPK LINGO LINDO Mosel MINOS MPL MOSEK OSmL There is a proliferation of modeling languages and solvers AIMMS CLP AMPL Impact GAMS GLPK LINGO LINDO Mosel MINOS MPL MOSEK OSmL Xpress-MP 8

Consequence: a lot of drivers are need for every modeling language to talk to every solver 9

It would be nice to have an instance representation language. 10

The Case for XML 1. Validation against a schema provides for error checking 2. Validation against a schema promotes stability of a standard 3. The schema can restrict data values to appropriate types, e.g. row names to string, indices to integer, coefficients to double 4. The schema can define keys to insure, for example, no row or column name is used more than once. 5. The schema can be extended to include new constraint types or solver directives 6. There is a lot of open source software to make parsing easy. 11

XML and Optimization Systems When instances are stored in XML format, optimization technology solutions are more readily integrated into broader IT infrastructures 2. XML is used for Web Services – important for distributed computing 3. The XML format lends itself well to compression – more on this later 4. The XML format can be combined with other technologies, e.g. XSLT to present results in human readable formats Encryption standards are emerging for XML – possibly important in a commercial setting. 12

XML Concepts XML (Extensible Markup Language) – an XML file contains both data and Markup (Elements (tags) and Attributes) The tags are organized in a tree like structure. The closing tag of a child element preceding the closing tag of its parent. <constraints> <con name=“cutanddye" ub="630"/> <con name="sewing" ub="600"/> <con name="finishing" ub="708"/> <con name="inspectandpack" ub="135"/> </constraints> ATTRIBUTE ELEMENT 13

OSiL Instance Representation 14

OSiL Instance Representation The variables: <variables number="2"> <var lb="0" name="x0" type="C"/> <var lb="0" name="x1" type="C"/> </variables> -OR- <variables number="2"> <var lb="0" ub=“INF” name="x0" type="C"/> <var lb="0" ub=“INF” name="x1" type="C"/> </variables> 15

OSiL Instance Representation The objective functions: <objectives number="1"> <obj maxOrMin="min" name="minCost">] <coef idx="1">9</coef> </obj> </objectives> 16

OSiL Instance Representation The constraints: <constraints number="2"> <con name=“row0” ub="10.0"/> <con name=“row1” lb="10.0"/> </constraints> 17

OSiL Instance Representation The linear constraint terms: <linearConstraintCoefficients> <start> <el>0</el><el>2</el><el>3</el> </start> <rowIdx> <el>0</el><el>1</el><el>1</el> </rowIdx> <value> <el>1.0</el><el>7.0</el><el>5.0</el> </value> </linearConstraintCoefficients> 18

OSiL Instance Representation The nonlinear terms: <nl idx="1"> <ln> <times> <var idx="0"/> <var idx="1"/> </times> </ln> </nl> 19

OSiL Instance Representation The nonlinear terms: <nl idx="0"> <quadratic> <qpTerm idxOne="0" idxTwo="1" coef="3"/> <qpTerm idxOne="0" idxTwo=”0" coef=”1"/> </quadratic> </nl> or <quadraticCoefficients numberOfQPTerms=“2”> <qpTerm idx=“0” idxOne="0" idxTwo="1" coef="3"/> <qpTerm idx=“0” idxOne="0" idxTwo=”0" coef=”1"/> </quadraticCoefficients > 20

XML Schema Key idea – a schema. Similar to the concept of a class in object orient programming. Critical for parsing! Schema Class XML File Object We need a schema to represent an instance. 21

Schema – a Constraints Object <constraints number="2"> <con name=“row0” ub="10.0"/> <con name=“row1” lb="10.0"/> </constraints> 22

Schema – a Constraints and Con Class <xs:complexType name="constraints"> <xs:sequence> <xs:element name="con" type="con" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="number" type="xs:nonNegativeInteger" use="required"/> </xs:complexType> <xs:complexType name="con"> <xs:attribute name="name" type="xs:string" use="optional"/> <xs:attribute name="lb" type="xs:double" use="optional" default="-INF"/> <xs:attribute name="ub" type="xs:double" use="optional" default="INF"/> <xs:attribute name="mult" type="xs:positiveInteger" use="optional" default="1"/> 23

The OSiL Schema 24

The OSiL Schema 25

Real Time Data In many cases the instance generated by the solver contains time sensitive data. For example, in many financial models. Before solving we can: Repeat entire modeling process and have modeling language generate a new model from scratch. OR 2. Have the “reader” library update only the necessary data before sending it to the solver. 26

Real Time Data Real time data 27

Real Time Data 28

Real Time Data 29

Markowitz Example 30

Markowitz and Real Time Data <variables number="4"> <var name="msft" lb="0.0" ub=".75"/> <var name="pg" lb="0.0" ub=".75"/> <var name="ge" lb="0.0" ub=".75"/> <var name="RBAR" lb=".05"/> </variables> <realTimeData> <defaultURI>http://www.stockdata.com/stockdata.xml</defaultURI> <variables> <var idx="3" type="lb"> <xPath path="/xmlData/portfolioReturn/text()" /> </var> </variables> </realTimeData> 31

User Defined Functions Many istances often: Contain terms repeated many times, either verbatim or With small systematic changes 2. Contain definitional variables 32

User Defined Functions <userFunction name="stockRet" numArg="2"> <xPath path="//scenario[@id=$scenario]/stock[@name=$name]/@return"> <xPathIndex indexName="scenario"> <arg idx="0"/> </xPathIndex> <xPathIndex indexName="name"> <arg idx="1"/> </xPath> </userFunction> Idx=0 idx = 1 33

User Defined Functions <userFunction name = "scenarioRet" numArg="1"> <sum> <times> <userF name="stockRet"> <arg idx="0"/> <string value="msft"/> </userF> <var idx="0"/> </times> </sum> </userFunction> 34

OSrL - Optimization Services result Language 35

OSrL - Optimization Services result Language 36

OSrL - Optimization Services result Language 37

Interested? MB44 – Open Source Modeling Tools OS Library and Server MC43 – Standards for Optimization Problem Representation OSiL (Fourer, Ma, Martin) OSiL stochastic extension (Gassmann, Fourer, Ma, Martin) Panel on standards etc TC44 – Optimization Tools and Modeling Languages OSmL (Ma, Martin) Impact Solver Services (Huanyuan Sheng, Ma, Mehrotra) etc. TD43 – Distributed Optimization Systems Optimization Services Framework (Fourer, Ma, Martin) 38

QUESTIONS? 39