# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/errors.py
# class SimError(LEMSError):
#     """
#     Exception class to signal errors in simulation.
#     """
# 
#     pass


from lems.base.base import LEMSBase
from lems.base.errors import SimError
import heapq
"""
Simulation.

:author: Gautham Ganapathy
:organization: LEMS (https://github.com/organizations/LEMS)
"""




class Simulation(LEMSBase):
    """
    Simulation class.
    """

    debug = False

    def __init__(self):
        """
        Constructor.
        """

        self.runnables = {}
        """ Dictionary of runnable components in this simulation.
        :type: dict(string -> lems.sim.runnable.Runnable) """

        self.run_queue = []
        """ Priority of pairs of (time-to-next run, runnable).
        :type: list((Integer, lems.sim.runnable.Runnable)) """


# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/errors.py
# class SimError(LEMSError):
#     """
#     Exception class to signal errors in simulation.
#     """
# 
#     pass


# Path: lems/sim/sim.py
from lems.base.base import LEMSBase
from lems.base.errors import SimError
import heapq

"""
Simulation.

:author: Gautham Ganapathy
:organization: LEMS (https://github.com/organizations/LEMS)
"""




class Simulation(LEMSBase):
    """
    Simulation class.
    """

    debug = False

    def __init__(self):
        """
        Constructor.
        """

        self.runnables = {}
        """ Dictionary of runnable components in this simulation.
        :type: dict(string -> lems.sim.runnable.Runnable) """

        self.run_queue = []
        """ Priority of pairs of (time-to-next run, runnable).
        :type: list((Integer, lems.sim.runnable.Runnable)) """


        self.event_queue = []