Modelica is an object-oriented acausal modeling language that is well positioned to become a de-facto standard for expressing models of complex physical systems. To simulate a model expressed in Modelica, it needs to be translated into executable code. For generating run-time efficient code, such a translation needs to employ algebraic formula manipulations. As the SPARK solver has been shown to be competitive for generating such code but currently cannot be used with the Modelica language, we report in this paper how SPARK{\textquoteright}s symbolic and numerical algorithms can be implemented in OpenModelica, an open-source implementation of a Modelica modeling and simulation environment. We also report benchmark results that show that for our air flow network simulation benchmark, the SPARK solver is competitive with Dymola, which is believed to provide the best solver for Modelica.

}, url = {http://www.ibpsa.us/simbuild2008/technical_sessions/SB08-DOC-TS03-1-Wetter.pdf}, author = {Michael Wetter and Philip Haves and Michael A. Moshier and Edward F. Sowell} } @conference {3388, title = {Using SPARK as a Solver for Modelica}, booktitle = {SimBuild 2008}, year = {2008}, month = {07/2008}, address = {Berkeley, CA, USA}, author = {Michael Wetter and Philip Haves and Michael A. Moshier and Edward F. Sowell} } @proceedings {2834, title = {Graph-Theoretic Methods in Simulation Using SPARK}, journal = {High Performance Computing Symposium of the Advanced Simulation Technologies Conference (Society for Modeling Simulation International)}, year = {2004}, month = {04/2004}, address = {Arlington, Virginia, USA}, author = {Edward F. Sowell and Michael A. Moshier and Philip Haves and Dimitri Curtil} } @proceedings {285, title = {Graph-theoretic Methods in Simulation Using SPARK}, journal = {High Performance Computing Symposium of the Advanced Simulation Technologies Conference}, year = {2004}, month = {04/2004}, address = {Arlington, VA}, abstract = {This paper deals with simulation modeling of nonlinear, deterministic, continuous systems. It describes how the Simulation Problem Analysis and Research Kernel (SPARK) uses the mathematical graph both to describe models of such systems, and to solve the embodied differential-algebraic equation systems (DAEs). Problems are described declaratively rather than algorithmically, with atomic objects representing individual equations and macro objects representing larger programming entities (submodels) in a smooth hierarchy. Internally, in a preprocessing step, graphs are used to represent the problem at the level of equations and variables rather than procedural, multi-equation blocks. Benefits obtained include models that are without predefined input and output sets, enhancing modeling flexibility and code reusability, and relieving the modeler from manual algorithm development. Moreover, graph algorithms are used for problem decomposition and reduction, greatly reducing solution time for wide classes of problems. After describing the methodology the paper presents results of benchmark tests that quantify performance advantages relative to conventional methods. In a somewhat contrived nonlinear example we show O performance as opposed}, author = {Edward F. Sowell and Michael A. Moshier and Philip Haves} } @article {312, title = {Efficient Solution Strategies for Building Energy System Simulation}, journal = {Energy and Buildings}, volume = {33}, year = {2001}, month = {04/2001}, pages = {309-317}, chapter = {309}, abstract = {The efficiencies of methods employed in solution of building simulation models are considered and compared by means of benchmark testing. Direct comparisons between the Simulation Problem Analysis and Research Kernel (SPARK) and the HVACSIM+ programs are presented, as are results for SPARK versus conventional and sparse matrix methods. An indirect comparison between SPARK and the IDA program is carried out by solving one of the benchmark test suite problems using the sparse methods employed in that program. The test suite consisted of two problems chosen to span the range of expected performance advantage. SPARK execution times versus problem size are compared to those obtained with conventional and sparse matrix implementations of these problems. Then, to see if the results of these limiting cases extend to actual problems in building simulation, a detailed control system for a heating, ventilating and air conditioning (HVAC) system is simulated with and without the use of SPARK cut set reduction. Execution times for the reduced and non-reduced SPARK models are compared with those for an HVACSIM+ model of the same system. Results show that the graph-theoretic techniques employed in SPARK offer significant speed advantages over the other methods for significantly reducible problems and that by using sparse methods in combination with graph-theoretic methods even problem portions with little reduction potential can be solved efficiently.

}, keywords = {building energy systems, computational efficiency, graph theory applications, hvac simulation, hvacsim+ models, spark models}, doi = {10.1016/S0378-7788(00)00113-4}, author = {Edward F. Sowell and Philip Haves} } @proceedings {315, title = {Numerical Performance of a Graph-Theoretic HVAC Simulation Program}, journal = {Building Simulation {\textquoteright}99}, year = {1999}, month = {09/1999}, address = {Kyoto, Japan}, abstract = {The Simulation Problem Analysis and Research Kernel (SPARK) uses graph-theoretic techniques to match equations to variables and build computational graphs, yielding solution sequences indicated by needed data flow. Additionally, the problem graph is decomposed into strongly connected components, thus reducing the size of simultaneous equation sets, and small cut sets are determined, thereby reducing the number of iteration variables needed to solve each equation set. The improvement in computational efficiency produced by this graph theoretic preprocessing depends on the nature of the problem. The paper explores the improvement one might expect in practice in three ways. First, two problems chosen to span the range of performance are studied and some of the factors determining the performance are identified and discussed. The problem selected to exhibit a large improvement consists of a set of sparsely coupled non-linear equations. The problem selected to represent the other end of the performance spectrum is a set of equations obtained by discretizing Laplace{\textquoteright}s equation in two dimensions, e.g. a heat conduction problem. Execution time versus problem size is compared to that obtained with sparse matrix implementations of the same problems. Then, to see if the results of these somewhat contrived limiting cases extend to actual problems in building simulation, a detailed control system model of a six- zone VAV HVAC system is simulated with and without the use of cut set reduction. Execution times are compared between the reduced and non-reduced SPARK models, and with those from an HVACSIM+ model of the same system.}, url = {http://www.ibpsa.org/proceedings/BS1999/BS99_A-05.pdf}, author = {Edward F. Sowell and Philip Haves} } @proceedings {318, title = {The application of Problem Reduction Techniques Based on Graph Theory to the Simulation of Non-Linear Continuous Systems}, journal = {EUROSIM{\textquoteright}98}, year = {1998}, pages = {pp. 203-207}, address = {Manchester, UK}, author = {Philip Haves and Edward F. Sowell} } @proceedings {317, title = {Component-Based and Equation-Based Solvers for HVAC Simulation: a Comparison of HVACSIM+ and SPARK}, journal = {System Simulation in Buildings {\textquoteright}98}, year = {1998}, month = {12/98}, address = {Li{\`e}ge, Belgium}, author = {Philip Haves and Edward F. Sowell} }