A RESTful framework design for componentizing the water evaluation and planning (WEAP) system
Introduction
It is common practice for modelers to contemplate questions of interest by examining systems in terms of their parts and relationships. This approach allows some parts of a system-of-systems to be modeled in detail while all other parts that affect or affected by it to be simple or even excluded. This is attractive as system complexity and scale can be significantly constrained by replacing the dynamics of a system as inputs and outputs. For example, in modeling a water system that uses solar energy, the amount of available photovoltaic energy can be modeled as piecewise input regimes. A key consequence of this choice is that the input regime is non-functional. In contrast, a reactive model produces outputs in part based on consuming inputs dynamically from other models. This photovoltaic model supplies energy to the water system subject to water demand fluctuation can lead to a better understanding of a water system that cannot be achieved through input data alone. From this vantage point, the need for component-based modeling and simulation is evident for understanding the interactions (nexus) among different parts, for example, Food-Energy-Water (FEW) systems [1]. Simulations developed using component-based modeling approaches are important in detailing different kinds of behaviors belonging to different parts of a system-of-systems.
Some existing and popular modeling and simulation tools and frameworks appear to be component-based even though they are not. An example is the Water Evaluation and Planning (WEAP) system for studying water supply and demand [2]. In this framework, models of water systems can be defined via a set of node and link entities assigned to a geographic region. Mass-balanced equations are defined using shared variables (inputs and outputs for the node and link models). The WEAP system supports some scripting languages for manipulating and executing the entities and their data. Approaches that use shared variables amongst models lack sufficient flexibility afforded by component-based modeling frameworks. Consequently, it would be challenging to use the WEAP system with component-based modeling and simulation environments such as DEVS-Suite [3]. A desirable modeling framework should aid combing models developed in different frameworks and their tools. In a component-based modeling framework, each model is a standalone component having its inputs and outputs and functions encapsulated and thus promote modularity, which is a key enabler for synthesizing hierarchical models [4]. In component-based modeling frameworks, models can act on one another. Componentization of the tools such as WEAP and Long-range Energy and Planning (LEAP) system [5] can further their use for system-of-systems modeling, including the class of FEW systems [6].
The overarching research question is on integrating the WEAP system (a legacy modeling and simulation system) with other modeling and simulation tools/frameworks to model and simulate systems of systems. This need requires exposing the entities of water models in the WEAP system to be represented as external logical components to be combined with models of other systems, including energy and food systems. The preliminary work on this research described a preliminary design and implementation using the idea of software components for the WEAP system [6]. The WEAP system was briefly described, along with its role in modeling and simulating the Food-Energy-Water nexus. In this work, the basic design with a prototype of the WEAP RESTful framework was briefly described. The performance efficiency of the RESTful framework compared with the JScript implementation was also presented.
This paper's contributions include new insight into the development of the Componentized-WEAP (C-WEAP) RESTful framework through providing the underlying details and formulation of the WEAP entities as proxy component models using the Model Driven Architecture (MDA) approach and the UML diagrams (moving between different levels of abstraction). These models are defined using the Ecore meta-modeling approach, where every proxy model component corresponds to every WEAP entity. The Ecore is a meta-level design abstraction that maps to concrete-level design abstraction following the MDA approach. The Ecore, in turn, is mapped to the UML diagrams, and then employed to design the RESTful services for the proposed C-WEAP framework. An analytical formulation is developed to show the relationship between the computational scalability of the C-WEAP framework relative to that of the WEAP system. More related works are considered and discussed. Finally, detailed performance analysis shows the computational cost of the RESTful framework to be negligible when compared with the benefits of WEAP componentization.
Section II of the paper describes in detail the WEAP system from the vantage point of component-based modeling. Section III describes selected related works. Also, some approaches for water modeling are described briefly. Section IV describes the C-WEAP RESTful framework architecture at different abstract levels (Ecore, UML diagram, and RESTful service). Section V presents the performance efficiency and analysis of the C-WEAP RESTful framework. Finally, the paper ends up with a conclusion in section VI.
Section snippets
Background
The WEAP system capabilities are described with the focus on its use with other frameworks and tools. The RESTful framework, as the underlying framework for the development of the C-WEAP, is briefly described. Together they are aimed at providing details for the remaining sections.
Related work
There exist a wide variety of many tools for modeling and simulating water systems, serving purposes ranging from natural hydrological processes to engineered distribution networks. Such software tools are developed by representing water systems as data sets with functions, objects, and services. Legacy and object-oriented software systems can be encapsulated as services in Service Oriented Architecture (SOA) paradigm. Various approaches have been proposed for transforming legacy software
A web service framework for the WEAP system
According to the constraint for using the JavaScript language (to invoke Automating the use of WEAP APIs [40]) and the difficulties of using XML-based protocols (extensive code development to create XML structure) [41], the RESTful framework is used to implement the web-service framework for the WEAP system. This framework's lightweight, fast, and scalability traits are the basis for its use for the development of the C-WEAP RESTful framework.
Performance evaluation of the componentized-WEAP framework
Using a MILP Solver (LPSolve, XA, or Gurobi) for the WEAP system, or using any other calculation methods for the entities (e.g., Catchment and Demand Site) do not affect the execution of the entities (i.e., the C-WEAP framework does not affect the execution time for any WEAP model). The execution time of the componentized WEAP is higher than the standalone execution of the WEAP system due to the computation time of the RESTful framework. Changes to any project configuration and scenarios do not
Conclusions
The WEAP system is appealing to domain experts from the standpoint of ease of use for rapid model development. This paper provides detail for defining the WEAP components as proxies for WEAP entities using meta-modeling and Model Driven Architecture. The WEAP entities, input and output variables, and their data are represented using the Ecore meta-modeling approach, where each proxy model component corresponds to a WEAP entity. The Ecore presents a well-defined componentized specification for
Acknowledgment
This research is funded by the National Science Foundation under Grant #CNS-1639227, “INFEWS/T2: Flexible Model Compositions and Visual Representations for Planning and Policy Decisions at the Sub-regional level of food-energy-water nexus”. We are also grateful to four anonymous referees for their critiques and constructive suggestions.
Mostafa D. Fard received the B.S. degree in software engineering from Shamsipour Technical and Vocational College, Tehran, Iran in 2010 and M.S. degrees in software engineering from University of Tehran, Tehran, Iran in 2014. He is currently pursuing his Ph.D. degree in computer science at Arizona State University, Tempe, AZ, USA.
References (47)
- et al.
Testing water demand management scenarios in a water-stressed basin in South Africa: application of the WEAP model
Phys. Chem. Earth, Parts A/B/C
(2003) - et al.
Application of the WEAP model in strategic environmental assessment: experiences from a case study in an arid/semi-arid area in China
J. Environ. Manag. 198
(2017) - et al.
Designing water efficiency measures in a catchment in Greece using WEAP and SWAT models
Proc. Eng. 162
(2016) - et al.
Using web services to integrate heterogeneous simulations in a grid environment
Fut. Gener. Comput. Syst. 21
(2005) - et al.
An Agent-based behavioral simulation model for residential water demand management: the case-study of Tehran, Iran
Simul. Modell. Pract. Theo.
(2017) - H. Hoff, "Understanding the nexus: Background paper for the Bonn2011 Conference,"...
- et al.
Water Evaluation and Planning System (WEAP): User Guide
(2005) - ACIMS, "DEVS-Suite simulator," 2020. URL:...
- et al.
Guide to modeling and simulation of systems of systems
Springer Sci.
(2017) - SEI, "Long-range energy alternatives planning (LEAP) system," 2020. URL:...
A web-service framework for the water evaluation and planning system
Spring Simul. Conf. (Spring Sim)
WEAP21—a demand-, priority-, and preference-driven water planning model: part 1: model characteristics
Water Int. 30
Benin 2025—balancing future water availability and demand using the WEAP ‘water evaluation and planning'system
Water Resour. Manag. 24
Analysis of current and future water demands in the upper Indus basin under IPCC climate and socio-economic scenarios using a hydro-economic WEAP model
Water 10
Theory of Modeling and Simulation
Enabling semantic web services: the web service modeling ontology
Springer Sci. Bus. Media
Underlying techniques for web services: a survey
J. Softw.
Simple object access protocol (SOAP) 1.1
World Wide Web Consort. (W3C)
Architectural styles and the design of network-based software architectures
Doctoral Dissertation
RESTful Web Services
Extensible modeling and simulation framework (XMSF): challenges for web-based modeling and simulation
Cited by (8)
Model And Simulation Scalability Traits For Interaction (Nexus) Modeling Of Water And Energy Systems
2022, Proceedings of the 2022 Annual Modeling and Simulation Conference, ANNSIM 2022Analysis of Water Supply-Demand Based on Socioeconomic Efficiency
2022, Journal of SensorsDesign and Implementation of a Remote Diagnosis System for Congenital Heart Disease Based on DjangoRestFramework
2021, ACM International Conference Proceeding Series
Mostafa D. Fard received the B.S. degree in software engineering from Shamsipour Technical and Vocational College, Tehran, Iran in 2010 and M.S. degrees in software engineering from University of Tehran, Tehran, Iran in 2014. He is currently pursuing his Ph.D. degree in computer science at Arizona State University, Tempe, AZ, USA.
Hessam S. Sarjoughian is currently an Associate Professor of computer science and computer engineering with the School of Computing, Informatics, and Decision Systems Engineering (CIDSE), Arizona State University (ASU), Tempe, AZ, USA, and the Co-Director of the Ari-zona Center for Integrative Modeling and Simulation (ACIMS). His-research interests include model theory, poly-formalism modeling, collaborative modeling, simulation for complexity science, and M&S frameworks/tools. He is the Director of the ASU Online Master of Engineering in Modeling and Simulation Program.