I rewrote a big portion of my thesis this morning too. I combined two objects that were essentially the same thing. One object acted as an interface to a model file, and the other acted as a cache for data in that model (this is a simplification, but it serves for these purposes). By combining them together, I was able to actually reduce the amount of code by putting all my update routines into loops. With this new class defined, I need to create all the necessary interface routines (which can be tedious in MATLAB), and update my other classes which rely on this class.
Combining the two classes together reduces the amount of data that I need to duplicate, simplifies many of my sanity checks, and is going to provide a much simpler and faster interface to the rest of my design. With this complete, there are basically 3 areas that I need to finish:
- Component Libraries. These are all drag-and-drop designs in simulink. I'm not optimizing them, so this should be quick and straightforward. Estimate 2-3 days of hard work for this.
- Library Interfaces. Code to traverse the various library components and select one based on certain criteria. Should be simple enough to implement. Estimate 1 day for this
- User Interface. I actually have two user interfaces, but through some earlier work, the one is already completed. The second interface is designed, but the buttons and toggles are not all properly connected to the necessary logic. Estimate 2-3 days for this, depending on how nit-picky I get, and how much sanity checking I perform.
I also finished my Parse::RecDescent parser for the expert system this morning. Only took me a few minutes once I realized what the problems were:
- I added a
directive to one of my productions, which caused my @item field indices to be off by 1. returns "1", so when I was accidentally taking it's value in my production, I was using the string "1" as a hash reference. Since I had literal "1" strings in my input file, I assumed that I was not properly returning values, and spent a lot of time double-checking my various data structures and references. - In one of my productions, I was passing a hash reference where I should have been passing a hash. Later, when I took a reference to this value, I was dereferencing a hash reference reference, which was giving me "Is not a hash reference" errors that I couldn't figure out.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.