Se-lib

Last updated
se-lib
Original author(s) Ray Madachy
Developer(s) Ryan Longshore
Initial releaseNovember 30, 2022 (2022-11-30)
Stable release
0.27.4 / October 19, 2023;6 months ago (2023-10-19)
Written in Python
Operating system Cross-platform
Type Systems Modeling
License MIT
Website se-lib.org

The Systems Engineering Library (se-lib) is a free and open-source library written in Python. Current capabilities for systems modeling include SysML and UML textual notation and diagrams, other modeling diagram types, time-based simulation including discrete-event simulation and continuous systems modeling with system dynamics, system reliability modeling, system cost modeling, and systems engineering process and project management. It is interoperable with other modeling tools.

Contents

Overview

The goals of se-lib are to [1] :

se-lib development has been supported by the Naval Postgraduate School Foundation for critical technologies and education programs . [2] As a seed project it was funded for "adoption of engineers across disciplines in support of digital engineering practice, teaching and research in the DOD".

It has been used in graduate courses for modeling and simulation, capability engineering, and systems software engineering at Naval Postgraduate School. se-lib has also been used for masters capstone projects and research deliverables. It has been the subject of professional training venues for systems engineers with the International Council on Systems Engineering. [3]

The Boehm Center for Systems and Software Engineering is a cooperating organization. [4] The se-lib system cost models in particular have been featured and transitioned through the Center.

se-lib was originally called the Python Modeling Library (PyML), and was renamed to be more specific for systems engineering applications. [5]

Implementation

se-lib is written in Python, and uses the primary libraries of SimPy for discrete event simulation, PySD for a system dynamics engine, Matplotlib for plotting, and graphviz for generating diagrams.

It uses the XMILE format for system dynamics models, making it file-compatible with Vensim and Stella for simulation.

Examples

SysML and UML

The following generates a use case model diagram:

importselibasse# system modelsystem_name="Course Portal"actors=['Student','Instructor']use_cases=['Post Discussion','Take Quiz','Create Quiz']interactions=[('Student','Post Discussion'),('Instructor','Post Discussion'),('Student','Take Quiz'),('Instructor','Create Quiz')]use_case_relationships=[]# create diagramse.use_case_diagram(system_name,actors,use_cases,interactions,use_case_relationships,filename=system_name+'use case diagram.pdf')
Se-lib course portal use case diagram Se-lib course portal use case diagram.svg
Se-lib course portal use case diagram

Discrete Event Simulation

Online discrete event modeling examples are available in playground mode at. [6]

A discrete event model for electric car charging is:

# electric car charging simulationinit_de_model()add_source('incoming_cars',entity_name="Car",num_entities=50,connections={'charger':.7,'impatient_cars':.3},interarrival_time='np.random.exponential(5)')add_server(name='charger',connections={'payment':1},service_time='np.random.uniform(0, 16)',capacity=1)add_delay(name='payment',delay_time='np.random.uniform(1, 3)',connections={'served_cars':1},)add_terminate('served_cars')add_terminate('impatient_cars')draw_model_diagram()model_data,entity_data=run_model()plot_histogram(model_data['charger']['waiting_times'],xlabel="Charger Waiting Time")
Se-lib electric car model diagram from discrete event simulation Se-lib electric car model diagram from discrete event simulation.png
Se-lib electric car model diagram from discrete event simulation
Se-lib electric car model output Se-lib electric car model output.png
Se-lib electric car model output

Related Research Articles

<span class="mw-page-title-main">Systems engineering</span> Interdisciplinary field of engineering

Systems engineering is an interdisciplinary field of engineering and engineering management that focuses on how to design, integrate, and manage complex systems over their life cycles. At its core, systems engineering utilizes systems thinking principles to organize this body of knowledge. The individual outcome of such efforts, an engineered system, can be defined as a combination of components that work in synergy to collectively perform a useful function.

<span class="mw-page-title-main">System dynamics</span> Study of non-linear complex systems

System dynamics (SD) is an approach to understanding the nonlinear behaviour of complex systems over time using stocks, flows, internal feedback loops, table functions and time delays.

<span class="mw-page-title-main">SimPy</span> Process-based discrete-event simulation framework based on standard Python

SimPy stands for “Simulation in Python”, is a process-based discrete-event simulation framework based on standard Python. It enables users to model active components such as customers, vehicles, or agents as simple Python generator functions. SimPy is released as open source software under the MIT License. The first version was released in December 2002.

<span class="mw-page-title-main">NumPy</span> Python library for numerical programming

NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The predecessor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors. NumPy is a NumFOCUS fiscally sponsored project.

Computational science, also known as scientific computing, technical computing or scientific computation (SC), is a division of science that uses advanced computing capabilities to understand and solve complex physical problems. This includes

<span class="mw-page-title-main">Systems modeling language</span> General-purpose modeling language

The systems modeling language (SysML) is a general-purpose modeling language for systems engineering applications. It supports the specification, analysis, design, verification and validation of a broad range of systems and systems-of-systems.

<span class="mw-page-title-main">International Council on Systems Engineering</span> Internal engineering trades organisation

The International Council on Systems Engineering is a not-for-profit membership organization and professional society in the field of systems engineering with about 17,000 members including individual, corporate, and student members. INCOSE's main activities include conferences, publications, local chapters, certifications and technical working groups.

<span class="mw-page-title-main">Computational engineering</span>

Computational Engineering is an emerging discipline that deals with the development and application of computational models for engineering, known as Computational Engineering Models or CEM. Computational engineering uses computers to solve engineering design problems important to a variety of industries. At this time, various different approaches are summarized under the term Computational Engineering, including using computational geometry and virtual design for engineering tasks, often coupled with a simulation-driven approach In Computational Engineering, algorithms solve mathematical and logical models that describe engineering challenges, sometimes coupled with some aspect of AI, specifically Reinforcement Learning.

Web-based simulation (WBS) is the invocation of computer simulation services over the World Wide Web, specifically through a web browser. Increasingly, the web is being looked upon as an environment for providing modeling and simulation applications, and as such, is an emerging area of investigation within the simulation community.

Simcenter Amesim is a commercial simulation software for the modeling and analysis of multi-domain systems. It is part of systems engineering domain and falls into the mechatronic engineering field.

Model order reduction (MOR) is a technique for reducing the computational complexity of mathematical models in numerical simulations. As such it is closely related to the concept of metamodeling, with applications in all areas of mathematical modelling.

<span class="mw-page-title-main">Enterprise Architect (software)</span> Visual modeling and design tool

Sparx Systems Enterprise Architect is a visual modeling and design tool based on the OMG UML. The platform supports: the design and construction of software systems; modeling business processes; and modeling industry based domains. It is used by businesses and organizations to not only model the architecture of their systems, but to process the implementation of these models across the full application development life-cycle.

Model-based systems engineering (MBSE), according to the International Council on Systems Engineering (INCOSE), is the formalized application of modeling to support system requirements, design, analysis, verification and validation activities beginning in the conceptual design phase and continuing throughout development and later life cycle phases. MBSE is a technical approach to systems engineering that focuses on creating and exploiting domain models as the primary means of information exchange, rather than on document-based information exchange. MBSE technical approaches are commonly applied to a wide range of industries with complex systems, such as aerospace, defense, rail, automotive, manufacturing, etc.

The GEKKO Python package solves large-scale mixed-integer and differential algebraic equations with nonlinear programming solvers. Modes of operation include machine learning, data reconciliation, real-time optimization, dynamic simulation, and nonlinear model predictive control. In addition, the package solves Linear programming (LP), Quadratic programming (QP), Quadratically constrained quadratic program (QCQP), Nonlinear programming (NLP), Mixed integer programming (MIP), and Mixed integer linear programming (MILP). GEKKO is available in Python and installed with pip from PyPI of the Python Software Foundation.

References

  1. "Home - se-lib". June 9, 2023. Retrieved May 15, 2024.
  2. "Naval Postgraduate School Foundation invests $145K in defense research of critical technologies and education programs". Naval Postgraduate School Foundation. November 8, 2022. Retrieved May 4, 2024.
  3. "Tutorial: Open Source Systems Modeling". INCOSE San Diego. May 8, 2023. Retrieved May 4, 2024.
  4. "Boehm CSSE - Center for Systems and Software Engineering". Boehm Center for Systems and Software Engineering. May 8, 2023. Retrieved May 7, 2024.
  5. Madachy, Raymond (2022-12-03). "Introduction to PyML" (PDF). San Diego INCOSE Mini-Conference. San Diego, CA.
  6. "Discrete Event Modeling Demonstrations with se-lib". se-lib development team. November 30, 2023. Retrieved May 4, 2024.