# Path: cmepy/models/burr08.py
# def create_model():
#     def reaction_a_birth(*x):
#     def reaction_a_decay(*x):
#     def reaction_b_birth(*x):
#     def reaction_b_decay(*x):
# def create_time_dependencies():
# def main():


from cmepy.models import burr08
import numpy
import cmepy.recorder
import cmepy.fsp.solver
import cmepy.fsp.support_expander
import cmepy.domain
import cmepy.statistics
import fsp_example_util



# fsp_example_util a common plotting routine for the three fsp examples

def main():
    """
    solve burr08 model using FSP with better expansion approach
    """
    
    # create model and initial states for domain
    model = burr08.create_model()
    initial_states = cmepy.domain.from_iter((model.initial_state, ))
    
    # Create expander for FSP expansion strategy.
    # The SolutionExpander only expands states around the
    # support of the current solution, instead of
    # expanding the entire domain
    expander = cmepy.fsp.support_expander.SupportExpander(
        model.transitions,
        depth = 1,
        epsilon = 1.0e-7
    )
    
    # create fsp solver for model, initial states, expander
    # - time dependencies for the burr08 model are also supplied
    fsp_solver = cmepy.fsp.solver.create(
        model,
        initial_states,
        expander,

# Path: cmepy/models/burr08.py
# def create_model():
#     def reaction_a_birth(*x):
#     def reaction_a_decay(*x):
#     def reaction_b_birth(*x):
#     def reaction_b_decay(*x):
# def create_time_dependencies():
# def main():


# Path: examples/fsp_example_2_support_expansion.py
from cmepy.models import burr08
import numpy
import cmepy.recorder
import cmepy.fsp.solver
import cmepy.fsp.support_expander
import cmepy.domain
import cmepy.statistics
import fsp_example_util




# fsp_example_util a common plotting routine for the three fsp examples

def main():
    """
    solve burr08 model using FSP with better expansion approach
    """
    
    # create model and initial states for domain
    model = burr08.create_model()
    initial_states = cmepy.domain.from_iter((model.initial_state, ))
    
    # Create expander for FSP expansion strategy.
    # The SolutionExpander only expands states around the
    # support of the current solution, instead of
    # expanding the entire domain
    expander = cmepy.fsp.support_expander.SupportExpander(
        model.transitions,
        depth = 1,
        epsilon = 1.0e-7
    )
    
    # create fsp solver for model, initial states, expander
    # - time dependencies for the burr08 model are also supplied
    fsp_solver = cmepy.fsp.solver.create(
        model,
        initial_states,
        expander,

        time_dependencies = burr08.create_time_dependencies()