# Path: cmepy/model.py
# PROPENSITIES = 'propensities'
# TRANSITIONS = 'transitions'
# NAME = 'name'
# INITIAL_STATE = 'initial_state'
# SHAPE = 'shape'
# SPECIES_NAMES = 'species'
# SPECIES_COUNTS = 'species_counts'
# REACTION_NAMES = 'reactions'
# ENTRIES = frozenset([
#     PROPENSITIES,
#     TRANSITIONS,
#     NAME,
#     INITIAL_STATE,
#     SHAPE,
#     SPECIES_NAMES,
#     SPECIES_COUNTS,
#     REACTION_NAMES,
# ])
# class Model(dict):
#     def __init__(self, **entries):
#     def _ensure_shape_invariance(self, x):
#     def __getattribute__(self, attrname):
#     def validate(self):
# def create(**entries):
# def raise_error(error_type, descr, value, message):
# def must_be_within_range(value, descr=None, min_value=None, max_value=None):
# def must_have_length(value, descr=None, min_len=None, max_len=None):
# def must_be_callable(value, descr=None):
# def must_be_string_like(value, descr=None):
# def must_be_int_like(value, descr=None, min_value=None, max_value=None):
# def must_be_mapping(value, descr=None):
# def must_contain_item(value, descr, item):
# def validate_name(value):
# def validate_propensities(value):
# def validate_species_names(value):
# def validate_species_counts(value):
# def validate_transitions(value):
# def validate_initial_state(value):
# def validate_shape(value):
# def validate_model(m):


from cmepy.util import non_neg
from cmepy import model


A2B2C = model.create(
    name = 'simplest nontrivial mono-molecular reaction',
    propensities = (
        lambda *x: non_neg(31.0-x[0]),
        lambda *x: non_neg(x[0]-x[1]),
    ),
    transitions = (
        (1, 0),
        (0, 1),
    ),
    reactions = (
        'A->B',
        'B->C',
    ),
    species_counts = (
        lambda *x: non_neg(31-x[0]),
        lambda *x: non_neg(x[0]-x[1]),
        lambda *x: x[1],
    ),
    species = (
        'A',
        'B',
        'C',
    ),
    shape = (32, 32),
    initial_state = (0, 0)
)


# Path: cmepy/model.py
# PROPENSITIES = 'propensities'
# TRANSITIONS = 'transitions'
# NAME = 'name'
# INITIAL_STATE = 'initial_state'
# SHAPE = 'shape'
# SPECIES_NAMES = 'species'
# SPECIES_COUNTS = 'species_counts'
# REACTION_NAMES = 'reactions'
# ENTRIES = frozenset([
#     PROPENSITIES,
#     TRANSITIONS,
#     NAME,
#     INITIAL_STATE,
#     SHAPE,
#     SPECIES_NAMES,
#     SPECIES_COUNTS,
#     REACTION_NAMES,
# ])
# class Model(dict):
#     def __init__(self, **entries):
#     def _ensure_shape_invariance(self, x):
#     def __getattribute__(self, attrname):
#     def validate(self):
# def create(**entries):
# def raise_error(error_type, descr, value, message):
# def must_be_within_range(value, descr=None, min_value=None, max_value=None):
# def must_have_length(value, descr=None, min_len=None, max_len=None):
# def must_be_callable(value, descr=None):
# def must_be_string_like(value, descr=None):
# def must_be_int_like(value, descr=None, min_value=None, max_value=None):
# def must_be_mapping(value, descr=None):
# def must_contain_item(value, descr, item):
# def validate_name(value):
# def validate_propensities(value):
# def validate_species_names(value):
# def validate_species_counts(value):
# def validate_transitions(value):
# def validate_initial_state(value):
# def validate_shape(value):
# def validate_model(m):


# Path: cmepy/models/mono_molecular.py
from cmepy.util import non_neg
from cmepy import model



A2B2C = model.create(
    name = 'simplest nontrivial mono-molecular reaction',
    propensities = (
        lambda *x: non_neg(31.0-x[0]),
        lambda *x: non_neg(x[0]-x[1]),
    ),
    transitions = (
        (1, 0),
        (0, 1),
    ),
    reactions = (
        'A->B',
        'B->C',
    ),
    species_counts = (
        lambda *x: non_neg(31-x[0]),
        lambda *x: non_neg(x[0]-x[1]),
        lambda *x: x[1],
    ),
    species = (
        'A',
        'B',
        'C',
    ),
    shape = (32, 32),
    initial_state = (0, 0)
)


A2B2A = model.create(