Posts

A New Python Package: pyutilib.autotest

A while back I developed EXACT , a Python package for executing computational experiments using an XML-defined process. EXACT was designed to fill a particular niche in software testing: performing computational tests that involve the application of solvers to a suite of test problems. This sort of testing arises a lot when doing functionality testing for scientific software. Unfortunately, EXACT was too complex: The XML specification was complex and difficult to read Experiments with many factors were assigned generic experiment IDs It was hard to replication the execution of specific experiments The experimental results were captured in XML results files that were difficult to browse Even my close collaborators struggled to setup, run and analyze computational experiments! {sigh} I have recently developed the pyutilib.autotest Python package to provide a simpler alternative to EXACT. This package uses a YAML test configuration file to specify the solvers and problems that are ...

Dynamic Service Creation in the PyUtilib Component Architecture

The PyUtilib Component Architecture (PCA) is a component architecture in Python that is derived from the Trac component framework . One important extension was to support both singleton and non-singleton plugins. Trac plugins are singletons that are created immediately when the plugin module is loaded (Python is a wonderful language for supporting this type of capability). Singleton plugins are well-suited for Trac, since it is a persistent application, but many other applications need to employ plugins "on demand". Consequently, the PCA supports non-singleton plugins, which need to be explicitly constructed by the end-user. The PCA is widely used in the Coopr project, and most plugins are non-singletons. Until recently, the PCA did not directly support plugin construction on demand. That is, the user needed to know the plugin class name, and plugin construction was done explicitly by the user. However, most plugins in Coopr can be best described as named services . ...

Blogs for Coopr and PyUtilib

This is just a heads-up that I have setup blogs for the Coopr and PyUtilib software projects: Coopr: https://software.sandia.gov/trac/coopr/blog PyUtilib: https://software.sandia.gov/trac/pyutilib/blog These blogs will document releases and end-user advice and examples. Additionally, there will hopefully be other authors than just me adding content to these blogs. But, I guess we'll see.

PyUtilib Component Architecture

I earlier mentioned that I developed a plugin framework within my PyUtilib software.  This is now called the PyUtilib Component Architecture (PCA).  The PCA is derived from the Trac component architecture, and it supports advanced features like nonsingleton components, namespaces and caching of component interactions. The PCA includes an independent, self-contained framework core that can be easily integrated into other applications, as well as a variety of extension packages with commonly used components. See The PyUtilib Component Architecture for further details.

Recent Coopr Developments

Coopr is a collection of Python optimization-related packages that supports a diverse set of optimization capabilities for formulating and analyzing optimization models. The following are key Coopr capabilities that are driving Coopr development: Pyomo: Formulate algebraic models within Python's modern programming language PySP: Generic solvers for stochastic programming problems COLIN: Scripts that simplify IO between optimizers and black-box applications SUCASA: Customize MIP solvers to expose model structure to the MIP solver engine See https://software.sandia.gov/trac/coopr/wiki/GettingStarted for instructions for getting started with Coopr. An installation script, coopr_install, is provided to simplify the installation of Coopr packages along with the third-party Python packages that they depend on. This installer can also automatically install extension packages from Coin Bazaar. See http://groups.google.com/group/coopr-forum/topics for online discussions of Coopr. Two ...

MINLP Test Problems

Image
Ignacio Grossmann and Jon Lee recently announced the CMU-IBM Cyberinfrastructure Collaborative site for MINLP .  The goal of this web site is to create a library of optimization problems in different application areas in which one or several alternative models are presented with their derivation. In addition, each model has one or several instances that can serve to test various algorithms. This effort is different from other test problem collections by requiring a description of the problem, and encouraging the contribution of alternate modeling formulations.  Thus, the actual models in this collection may be MILP or NLP formulations that simplify a nonlinear problem, including simplifications of other MINLP formulations. As it happens, Cindy Phillips, Regan Murray and I are working on a paper that describes our work on sensor placement for water security, where we describe various MILP formulations for this nonlinear application.  I guess we should try to add our models to this repos...

Using easy_install to download source files

Python's setuptools package includes the easy_install script, which provides a convenient mechanism for installing a Python package from the PyPi repository.  Normally, easy_install installs a Python package in the Python site packages directory.  However, I recently discovered that easy_install can download the source for Python package.  For example, the following command downloads the Coopr optimization package into the coopr directory: easy_install -q --editable --build-directory . Coopr I had to browse a variety of web pages before I figured this syntax out.  Enjoy!