1 LPFML: A W3C XML Schema for Linear and Integer Programming Robert Fourer Northwestern University Leonardo Lopes University.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Chapter 14 Applets. 2 Knowledge Goals Understand the differing roles of applications and applets Understand how a browser operates Understand the role.
Software – Part 3 V.T. Raja, Ph.D., Information Management College of Business Oregon State University.
Optimization Services (OS) Framework and OSP Protocols (OSxL) “Combining Operations Research with Computing Technology” Jun Ma 10/24/2004.
UNIT-V The MVC architecture and Struts Framework.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
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
Object and component “wiring” standards This presentation reviews the features of software component wiring and the emerging world of XML-based standards.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
XML and its applications: 4. Processing XML using PHP.
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.
Web Services An introduction for eWiSACWIS May 2008.
XML Parsers Overview  Types of parsers  Using XML parsers  SAX  DOM  DOM versus SAX  Products  Conclusion.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
Intro to XML Originally Presented by Clifford Lemoine Modified by Box.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
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.
Using XML to present computer program Qingsong Yao Qingsong Yao Department of Computer Science Department of Computer Science York University York University.
Web Technologies COMP6115 Session 4: Adding a Database to a Web Site Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University.
XML Grammar and Parser for WSOL Kruti Patel, Vladimir Tosic, Bernard Pagurek Network Management & Artificial Intelligence Lab Department of Systems & Computer.
Fourer, Ma, Martin, An Open Interface for Hooking Solvers to Modeling Systems INFORMS International, Puerto Rico, July 8-11, INFORMS International.
Robert Fourer, Jun Ma, Kipp Martin, Optimization Services, May 06, 2005 Optimization Services (OS) Jun Ma Industrial Engineering and Management Sciences.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Using of XML for object store S. Linev, GSI Using of XML for object store. S.Linev2 Content XML and existing packages XML and existing packages.
XML Alyssa Roberts. What is XML? Extensible Markup Language Specification to creating custom mark-up languages Simplified version of SGML, originally.
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.
1 Typing XQuery WANG Zhen (Selina) Something about the Internship Group Name: PROTHEO, Inria, France Research: Rewriting and strategies, Constraints,
1 “Universal Data-Speak”: The eXtensible Markup Language Zack Ives CSE 590DB, Winter 2000 University of Washington 3 January 2000.
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.
SIMO Python/XML Simulator Current situation 28/10/2005 SIMO Seminar Antti Mäkinen Dept. of Forest Resource Management / University of Helsinki.
Jun Ma, Optimization Services, May 18, 2005 Optimization Services (OS) Jun Ma Industrial Engineering and Management Sciences Northwestern University Lindo.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
CIS 250 Advanced Computer Applications Database Management Systems.
 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.
OSiL: An XML-based schema for stochastic programs H.I. Gassmann, R. Fourer, J. Ma, R.K. Martin SP XI Vienna, August 2007.
Robert Fourer, Jun Ma, Kipp Martin Copyright 2005 Optimization Services (OS) Jun Ma Annapolis, 01/07/2005 Robert Fourer Jun Ma Northwestern University.
Java High level programming language ◦ Sun Microsystems ◦ ORACLE acquired Java Development Kit – JDK Java Runtime Environment – JRE Java Virtual Machine.
The Design and Implementation of Free Templates for Digital Achieving Speaker : Kuang-Yu Wu 1.
1 Introduction to XML Babak Esfandiari. 2 What is XML? introduced by W3C in 98 Stands for eXtensible Markup Language it is more general than HTML, but.
Introduction  Model contains different kinds of elements (such as hosts, databases, web servers, applications, etc)  Relations between these elements.
1 XML and XML in DLESE Katy Ginger November 2003.
Coopr: A Python Repository for Optimization
XML QUESTIONS AND ANSWERS
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Design Patterns A Case Study: Designing a Document Editor
Optimization Services Instance Language (OSiL)
Optimization Services Instance Language (OSiL)
A Mathematical Programming Language
Presented by: Jacky Ma Date: 11 Dec 2001
An XML-based schema for stochastic programs
XML and its applications: 4. Processing XML using PHP
Presentation transcript:

1 LPFML: A W3C XML Schema for Linear and Integer Programming Robert Fourer Northwestern University Leonardo Lopes University of Arizona Kipp Martin University of Chicago Denver INFORMS 2004

2 OUTLINE 1. Introduction and motivation 2. Model versus Instance 3. Why XML? 4. The LPFML Schema 5. Compression 6. The libraries 7. Testing under loosely and tightly coupled scenarios 8. The license

3 There is a proliferation of modeling languages and solvers AIMMSCLP AMPLCPLEX GAMSGLPK LINGOLINDO MoselMINOS MPLMOSEK OPLXpress-MP

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

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

6 A MODEL 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).

7 DATA param: PROD: profit := std 10 del 9 ; param: DEP: hours := cutanddye 630 sewing 600 finishing 708 inspectandpack 135 ; param: rate: std del := cutanddye sewing finishing inspectandpack ;

8 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’] *Make[‘del’] <= 600; subject to HoursAvailable[‘finishing’]: Make[‘std’] *Make[‘del’] <= 708; subject to HoursAvailable[‘inspectandpack’]: 0.1*Make[‘std’] *Make[‘del’] <= 135; Objective : represent a model instance using XML.

9 Why not MPS? NAME PRODMIX ROWS N TPROFIT L HRSCUT L HRSSEW L HRSFIN L HRSINS COLUMNS MAKESTD TPROFIT 10 MAKESTD HRSCUT 0.7 HRSSEW 0.5 MAKESTD HRSFIN 1 HRSINS 0.1 MAKEDEL TPROFIT 9 MAKEDEL HRSCUT 1 HRSSEW MAKEDEL HRSFIN HRSINS 0.25 RHS RHS1 HRSCUT 630 RHS1 HRSSEW 600 RHS1 HRSFIN 708 RHS1 HRSINS 135 ENDATA

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 1.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 5.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. ELEMENT ATTRIBUTE

13 XML Concepts SchemaClass XML FileObject Key idea – a schema. Similar to the concept of a class in object orient programming. We need a schema to represent an instance.

14 XML Concepts – a Row Class

15 XML Concepts – a Row Object

16 LPFML Schema 1. Information about the instance

17 LPFML Schema 2. The instance data

18 LPFML Schema 2. The instance data (rows and columns)

19 LPFML Schema 2. The instance data (the A matrix)

20 LPFML Schema 2. The instance data (the A matrix)

21 LPFML Schema 3. Information about the solution

22 Compression – Base ZmZmZmZm5j8AAAAAAADgPwAAAAAAAPA/mpmZmZmZuT8AAAAAA ADwP7U3+MJkquo/S8gHPZtV5T8AAAAAAADQPw==

23 Compression – Structural Min x1 + x2 + x3 + x4 + x5 + x6 s.t. x1 + x2 >= 1 x1 + x2 + x6 >= 1 + x3 + x4 >= 1 + x3 + x4 + x5 >= 1 + x4 + x5 + x6 >= 1 + x2 + x5 + x6 >=

24 The LPFML Libraries A set of open source libraries for reading and writing LP instances in XML format. Objective: hide all of the parsing and writing of XML in the library Corollary: library users should only have to deal with optimization concepts such as objectives, constraints, etc. Objective: allow changes and extensions to the schema without any solver or modeling language code to be rewritten

25 The LPFML Libraries - Parsing Current C++ library based on SAX (Simple API for XML). Our libraries use the Apache Xerces libraries. Key classes are FMLHandler and FMLParser. FMLHandler inherits from SAX2 ContentHandler. The FMLHandler “gets the data” from the XML file when elements and attributes are read.

26 The LPFML Libraries - Parsing FMLParser is solver independent. It instantiates an FMLHandler Object and passes to the constructor an FMLParser object. handler = new FMLHandler(this, encodingName, expandNamespaces) Provides numerous “dummy” methods: onVariableCount(), onObjectiveSense(), onAMatrix(), etc The handler object calls these methods when reading elements and attributes.

27 The LPFML Libraries - Parsing It is up to the user to implement their own solver specific FMLParser class. For example, in FMLLINDOParser we have void FMLLINDOParser::onObjectiveSense(const bool isMin) { if(isMin) nDir_ = LS_MIN; else nDir_ = LS_MAX; // make sure objConstant_ gets initialized objConstant_ = 0.; } There is no XML involved in writing the solver specific FMLParser that inherits from the FMLParser. It is hidden from the solver developer.

28 The LPFML Libraries - Parsing Current open source FMLParses include: OSI/COIN LINDO FORTMP lp_solve (coming soon) OSI/COIN – low level API for solvers. If a solver supports OSI/COIN they can read FML. For example, CLP and GLPK.

29 The LPFML Libraries - Parsing

30 The LPFML Libraries - Writing

31 LPFML - Testing Basic scenarios: 1.Tightly coupled scenario where modeling system and solver communicate directly with each other on same machine. Performance important here. 2.Loosely coupled environments where modeling system and solver on different machines. File size important here. 3. Pre and post-processing environments. Flexibility key here.

32 Scenario – Pre and Post Processing

33 Scenario – Pre and Post Processing

34 Conclusion and Extension 1.The libraries are open source. See 2. Libraries licensed under a non-copyleft license 3.Obvious extensions in the linear area include networks, SOS, quadratic, and stochastic programming. 4.For more general extensions into nonlinear and optimizaton services framework see Jun Ma (SB16.4), “A Unified XML-Based Framework for Optimization Services.”