Example #1
0
    def test_pulse(self):
        from pysd import functions

        self.assertEqual(functions.pulse(lambda: 0, 1, 3), 0)

        self.assertEqual(functions.pulse(lambda: 1, 1, 3), 1)

        self.assertEqual(functions.pulse(lambda: 2, 1, 3), 1)

        self.assertEqual(functions.pulse(lambda: 4, 1, 3), 0)

        self.assertEqual(functions.pulse(lambda: 5, 1, 3), 0)
    def test_pulse(self):
        from pysd import functions

        self.assertEqual(functions.pulse(lambda: 0, 1, 3), 0)

        self.assertEqual(functions.pulse(lambda: 1, 1, 3), 1)

        self.assertEqual(functions.pulse(lambda: 2, 1, 3), 1)

        self.assertEqual(functions.pulse(lambda: 4, 1, 3), 0)

        self.assertEqual(functions.pulse(lambda: 5, 1, 3), 0)
Example #3
0
    def test_pulse(self):
        from pysd import functions

        functions.time = lambda: 0
        self.assertEqual(functions.pulse(1, 3), 0)

        functions.time = lambda: 1
        self.assertEqual(functions.pulse(1, 3), 1)

        functions.time = lambda: 2
        self.assertEqual(functions.pulse(1, 3), 1)

        functions.time = lambda: 4
        self.assertEqual(functions.pulse(1, 3), 0)

        functions.time = lambda: 5
        self.assertEqual(functions.pulse(1, 3), 0)
Example #4
0
    def test_pulse(self):
        from pysd import functions

        functions.time = lambda: 0
        self.assertEqual(functions.pulse(1, 3), 0)

        functions.time = lambda: 1
        self.assertEqual(functions.pulse(1, 3), 1)

        functions.time = lambda: 2
        self.assertEqual(functions.pulse(1, 3), 1)

        functions.time = lambda: 4
        self.assertEqual(functions.pulse(1, 3), 0)

        functions.time = lambda: 5
        self.assertEqual(functions.pulse(1, 3), 0)
Example #5
0
def arrival_rate():
    """
    Arrival Rate
    ------------
    (arrival_rate)


    """
    return 10 + 12 * functions.pulse(20, 10)