diff options
author | Marius Peter <blendoit@gmail.com> | 2019-06-13 16:49:56 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-06-13 16:49:56 -0700 |
commit | ab880773c095e7e9249f14435a9e03f4af328364 (patch) | |
tree | 75009c6a8177dde0885b462a67045b7ca9a76fdb | |
parent | 99362c09681f5382470f36fed4a6caf6948a84e1 (diff) |
main.py function docstrings
-rw-r--r-- | evaluator.py | 5 | ||||
-rw-r--r-- | main.py | 25 |
2 files changed, 27 insertions, 3 deletions
diff --git a/evaluator.py b/evaluator.py index 180d49a..f3a05f4 100644 --- a/evaluator.py +++ b/evaluator.py @@ -18,3 +18,8 @@ def get_centroid(airfoil): pass + + +def get_mass(*component): + for _ in len(component): + mass += component.mass @@ -15,7 +15,7 @@ import creator # Create geometry import evaluator # Evaluate geometry -import generator # Iteratevely evaluate instances of geometry +import generator # Iteratevely evaluate instances of geometry and optimize import random import time @@ -24,16 +24,19 @@ start_time = time.time() CHORD_LENGTH = 100 SEMI_SPAN = 200 -# masss +# mass AIRFOIL_MASS = 100 # lbs SPAR_MASS = 10 # lbs STRINGER_MASS = 5 # lbs +# population information POP_SIZE = 1 SAVE_PATH = 'C:/Users/blend/github/UCLA_MAE_154B/save' -def main(): +def create(): + '''Create an airfoil.''' + # Create coordinate system specific to our airfoil dimensions. # TODO: imperial + metric unit setting creator.Coordinates(CHORD_LENGTH, SEMI_SPAN) @@ -75,5 +78,21 @@ def main(): print("--- %s seconds ---" % (time.time() - start_time)) +def evaluate(): + '''Evaluate previously created airfoil(s).''' + pass + + +def generate(): + '''Iteratively evaluate airfoils by defining genetic generations.''' + pass + + +def main(): + create() + evaluate() + generate() + + if __name__ == '__main__': main() |