Week 14

Coding Period Ends …. Hello everyone, hope this blog finds you well.

I am writing this blog 2 weeks since the previous blog as I had my minor exams at university last week. Having pushed all the code I proposed, I did not have any major changes to make and could focus on my exams. Implementation and testing of the State Space Model is complete from my end. I believe that I have addressed all the reviews and it is close to being merged into the codebase. Although the coding period has ended, it is still my responsibility to make sure that our work eventually goes in.

Aim :

This week I made some comments towards the State Space model. It can be viewed here.

Work : Let us go through the Pull Requests in brief.

  1. Failing Test:
    If you go through the latest developments on this comment, there are some tests which fails due to the modified behavior of floats. I am having some difficulties in figuring out why these asserts are failing with sympy.evalf().

      p1 = a1*s + a0
      p2 = b2*s**2 + b1*s + b0
      G = StateSpace(Matrix([p1]), Matrix([p2]))
      expect = StateSpace(Matrix([[2*s + 1]]), Matrix([[5*s**2 + 4*s + 3]]), Matrix([[0]]), Matrix([[0]]))
      expect_ = StateSpace(Matrix([[2.0*s + 1.0]]), Matrix([[5.0*s**2 + 4.0*s + 3.0]]), Matrix([[0]]), Matrix([[0]]))
      assert G.subs({a0: 1, a1: 2, b0: 3, b1: 4, b2: 5}) == expect
      assert G.subs({a0: 1, a1: 2, b0: 3, b1: 4, b2: 5}).evalf() == expect_
       
      >>> G.subs({a0: 1, a1: 2, b0: 3, b1: 4, b2: 5}).evalf() == expect_
      False
      >>> print(G.subs({a0: 1, a1: 2, b0: 3, b1: 4, b2: 5}).evalf())
      StateSpace(Matrix([[2.0*s + 1.0]]), Matrix([[5.0*s**2 + 4.0*s + 3.0]]), Matrix([[0]]), Matrix([[0]]))
      >>> print(expect_)
      StateSpace(Matrix([[2.0*s + 1.0]]), Matrix([[5.0*s**2 + 4.0*s + 3.0]]), Matrix([[0]]), Matrix([[0]]))
    
    

Future Work : Now I have reached my last official active week for Google Summer Of Code, I have to make my final work product submission. That will be followed by the final evaluations. It has been an amazing journey with a few final touches remaining.

Address

Mumbai, Maharashtra, India