ConstraintHg

ConstraintHg is a systems modeling kernel written in Python that enables general definition and universal simulation of any system. The kernel breaks a system down into the informational values (nodes) and functional relationships (hyperedges), providing robust simulation through pathfinding operations. This repository is under active development (no official release yet), and is therefore subject to change without warning. It is not a rigorous data storage solution. Do not use this as a database.

The package has two main components: an interface for building a constraint hypergraph (CHG), and algorithms for simulating the CHG. Examples of both of these are given in the links below.

Get Started

Use PIP to install ConstraintHg into your Python environment:

pip install constrainthg

From there you’ll want to import the library into your Python script. This is a pretty typical method to use:

from constrainthg.hypergraph import Node, Hypergraph
import constrainthg.relations as R

For a walkthrough, check out the tutorial or demonstrations

_images/demo.gif