from pydtn.core import Process, TickProcess

class Trace(Process):
    def __init__(self, duration, nodes):
        Process.__init__(self)

        if duration < 1:
            raise ValueError('duration must be greater than or equal to 1')
        if nodes < 2:
            raise ValueError('nodes must be greater than or equal to 2')

        self.duration = duration
        self.nodes = nodes


class TickTrace(Trace, TickProcess):
    def __init__(self, duration, nodes, tick):
        Trace.__init__(self, duration, nodes)
        TickProcess.__init__(self, tick)