-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancing tests for design module's total cost #173
Conversation
…to electrical design for hvac, hvdc-monopole, hvdc-bipole. Included .upper() to various if-statements checking HVDC or HVAC selection.
… Included a .lower() to anchor_type and mooring_type if-statements
Thanks @nRiccobo, nicely done. Just a comment - using the form Also, you could consider making all the inputs lower case in Just my two cents. Thanks for addressing my other comment @nRiccobo! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting these additional checks in place!
I think you opened up a small can of worms with some of input handling methods, otherwise the only thing I'd add is a total design cost for the default fixed and floating scenarios to ensure all the costs are double checked.
@@ -209,7 +213,7 @@ def calculate_line_length_mass(self): | |||
+ self.rope_length * rope_mass_per_m | |||
) / 1e3 # tonnes | |||
|
|||
elif self.mooring_type == "TLP": | |||
elif self.mooring_type == "Tlp": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see how this is now annoying because there are many forms of standardization this could take.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... Never a one size fits all, heh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably think a bit more on the capitalization of SemiTaut, TLP, etc., but I think it's good to go as-is.
Updated several design tests to include some kind of "test_total_cost". A simple test like this should capture a snapshot of the design module's total cost for given a base case. Further, this will aid in tracking if any logic, default costs, or cost algorithms change between additions.
Additionally, I addressed some potential if-statements matching issues in electrical_design and mooring_system_design that @rafmudaf noticed in #171.