Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Help needed with UML

This topic is 5303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing some software (aren't we all!) that evaluates seismic hazard. In order to achieve this I've been playing a bit with UML (which I know nothing about) and have now got a class diagram for. The big snag is that I don't know anyone who can critique me on this & who can help me get this right, so I'd appreciate it if anyone can look at this & help me. UML Diagram (based on tripod - sorry about the ads) Basically in this you have a logic tree that constructs a problem for evaluation (a problem must have 1 site {where the hazard is to be evaluated at} with a list of ground motions to be evaluated, at least one seismic source {with attenuation, reccurence, magnitudes & geometry specified}). In essence the logic tree is like any other algorithmic tree (eg an AST). A logic tree allows you to trial alternatives for certain things that can't be done by plain statistics because it changes something that has a mapping of 1 to 1 - this means that it needs to be split into several problem objects. The idea is that the classes near the bottom which derive from LogicTreeBase will be linked in chains such that they represent a tree like structure. The main routine will create 1 empty problem object then push it into the first object in the tree (which should be a SiteGen object {for various reasons to do with the maths}. The idea is that each time the problem object is passed to a new LogicTreeBase object in the chain the object will do a set of modfications to the data in the problem pertainent to it's type then it will make N copies (well, really N-1 + the original) of the Problem object, passing 1 of each of those to the children listed in its branches variable. Finally as it goes through the chains the Problem object will hit a "ProblemDispatcher" object which represents a leaf - when that is hit the objects address will be registered with the SolutionCollector object & then the Problem object will be instructed to start solving the problem it contains - I want to leave the possibility to push it into a thread here as it seems reasonably possible that it could be running on a multiprocessor machine. When the problem object finishes it will pass it's reference & data back to the SolutionCollector object (the reference is so that we know when all the problems have been solved). The basic proceedure that needs to be followed in the actual problem is that we have a series of ground motions that we're interested in stored in a GroundMotions object, we go through each one and then for each source we solve for the hazard that it will cause that ground motion at the site for all possible magnitudes (Mw) or earthquake & for all possible R's (based on the geometry) bearing in mind various related probabilities (including a Recurrence algo which can change). We also need to estimate a ground motion parameter at the site - we do this with AttenuationAlgorithm - although there are many variations on these. We store the results for each source in another GroundMotion object (copied from the site's original copy) - mostly as some sort of class ecconomy... There shouldn't be any thread issues as most of the data objects are read only when they get into a new thread & should have been loaded in advance of even the problem objects being formed, or if this is a possibility (GroundMotions objects) they are copied from a quasi-static original. Obviously I'm not expecting anyone to tell me how to improve the hazard calculations (unless you happen to be a senior seismologist somewhere!), but I'm sure my UML makes at best limited sense and I am hoping that someone can help me sort this out! - do you think for example what I have tried to explain in text matches the diagram in any way shape or form ? have I got the right sort of associations/class objects ? as a software engineer does this communicate anything useful to you ? should I seperate the problem creating & the problem solving parts into different packages ? Sorry if this is all rambeling a bit, I hope it makes some kind of sense (it's now 4.20am...) Many thanks for any help, Nick PS: Just so that everyone is aware, this is part of a thesis project for a civil engineering degree (hence we aren't taught about UML - or in fact any programming technique from the last 30 years we're only just beyond using punch-cards ) and I'm not expected to produce this, but I want to use this to try and organise my code more effectively & to do a better project as I feel that poor planning of code is one of my greater failings in coding. Basically my point is that this isn't homework per-se. [edited by - NickB on February 10, 2004 12:40:52 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!