Closed mjburton11 closed 8 years ago
@bqpd, just reviewed this with @mjburton11; we're both ready to merge it. Take a quick glance and press merge if you like it?
Commented on units stuff, otherwise looks great!
Oh, I think this model should have a test function
(like the Troposhere one)
The main method of cost.py
is currently failing:
Traceback (most recent call last):
File "cost.py", line 105, in <module>
DAPCA4Cost().test()
File "cost.py", line 98, in test
C_D = sol('C_{D}')
File "/Users/whoburg/anaconda/envs/gpkit/lib/python2.7/site-packages/gpkit/solution_array.py", line 60, in __call__
return mag(self.subinto(p).c)
File "/Users/whoburg/anaconda/envs/gpkit/lib/python2.7/site-packages/gpkit/solution_array.py", line 70, in subinto
return p.sub(self["variables"])
AttributeError: 'str' object has no attribute 'sub'
Ack, I should add a better error message. That probably means that the variable name was C_D
not C_{D}
Response to code review.
Has comments about assumptions of the DAPCA4 Model and allows the user to specify the cost of the engine, if applicable.