lacsed / UltraDES-Python

A Python wrapper for UltraDES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AngouriMath logo

UltraDES Python

UltraDES is a library for modeling, analysis and control of Discrete Event Systems. It has been developed at LACSED | UFMG.

Before using UltraDES

Requirements:

  • Supported OS: Windows, MAC OS or Linux (Mono).

First steps

Install using pip

On Windows

On Ubuntu

import UltraDES

import sys, ultrades, os
sys.path.append(os.path.dirname(ultrades.__file__))
from ultrades.automata import *

Create States

s1 = state("s1", marked = True)
s2 = state("s2", marked = False)

Create Events

e1 = event("e1", controllable = True)
e2 = event("e2", controllable = False)
e3 = event("e3", controllable = True)
e4 = event("e4", controllable = False)

Create Automata

G1 = dfa(
[
    (s1, e1, s2), 
    (s2, e2, s1)
], s1, "G1")
  
G2 = dfa(
[
    (s1, e3, s2), 
    (s2, e4, s1)
], s1, "G2")

Operations with Automata

Making a Parallel composition

Gp = parallel_composition(G1, G2); 

Showing the Automaton (only on Jupyter Lab)

 show_automaton(Gp)

More Functions

See the Wiki for more implemented functions.

Try UltraDES-Python

About

A Python wrapper for UltraDES

License:MIT License


Languages

Language:Python 100.0%