Automatic rocket design optimization

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Sampo

Well-Known Member
Joined
Jun 1, 2010
Messages
199
Reaction score
12
Hi,

I just released a new version of OpenRocket, which has a new major feature: automatic rocket design optimization. It contains a multidimensional optimizer, where you can define any number of rocket design parameters to optimize for apogee altitude, maximum velocity or a number of other values.

While the automatic optimization is a powerful tool, it is very quite easy to shoot yourself in the foot with it. In particular, it's easy to optimize against particulars of the simulation methods, instead of true physical phenomena. In my experience it's good to keep the number of optimization parameters low and the optimization range reasonable. Always keep common sense at hand and take the results with a grain of salt.

I'd like to hear feedback on what you think of the feature, how easy/hard it is to use and how useful it is.

The newest version is available at https://openrocket.sourceforge.net/, the optimizer can be started from Analysis -> Rocket optimization.


Cheers,
Sampo N.


P.S. The optimization really stresses out the software, so it's bound to reveal new bugs in the simulation routines. Send in the bug reports and I'll have a look at them. It also seems to stress our the Java runtime environment, and I've had the JRE crash several times during optimization. Save your designs before optimizing!
 
OR is a terrific program. The biggest thing on my wish list it to be able to write (as well as read) rocksim files. Is there a reason OR can't/won't write them?
 
Sampo: Excellent idea! I always wanted to see this feature in Rocksim. In fact, I wrote a similar little add-on called SMARTSim that Apogee sold for a few years. I wanted to take the next step to multi-variable rocket optimization, but I didn't have the time nor updated programming skills to take it on. I am glad you did it. I will check it out in OR.

The simulations run so quickly, it is very easy to run full-factorial and large design matrices for optimization. I'd like to hear about the numerical methods you are using.
 
Hi,

The simulations run so quickly, it is very easy to run full-factorial and large design matrices for optimization. I'd like to hear about the numerical methods you are using.

The method is a multi-dimensional pattern search algorithm by Dennis and Torczon. I chose it because it allows computing the points in parallel, allowing to make use of modern multi-processor systems. I'm not sure how it compares to e.g. coordinate search methods based on repeated line searches.

In single-parameter optimization it uses a golden-section search method over the whole range. It starts computing the next two points in parallel with the decision point for parallel processing.

In my experience it's best to set the optimization range as strictly as reasonable, otherwise the results may be nonsensical. Just because you can throw in any parameters doesn't mean you'll get good results doing so. For instance when optimizing the shape of a trapezoidal fin it easily generates a fin that is very backslanted and widening outwards - but if you require the root chord to be a bit longer you can get a quite reasonable-looking shape.


The biggest thing on my wish list it to be able to write (as well as read) rocksim files. Is there a reason OR can't/won't write them?

The reason is that no-one has volunteered to implement it. I personally don't use RockSim (for obvious reasons) so I don't have much motivation for that support. Doug Pedrick did a great job in implementing the reading support (which I also considered much more important that write support), but also wasn't that interested in write support.

If someone would like to volunteer to implement RockSim format writing, I would be glad to help out with it. It shouldn't even be that hard, the biggest thing is probably understanding the RockSim format well enough.


Cheers,
Sampo N.
 
The golden search is probably the best. I used it in SMARTSim and Rocksim uses it for optimal mass. Yes, it is wise to use a small design space, else the optimization can quickly get nonsensical.

I created a batch run process for Rocksim to vary many parameters in the rkt file at the same time. The problem I ran into was keeping all the part connectivity together in the rocket. For example, when changing a BT diameter, you need to also adjust the coresponding nose cone dia, centering ring dia, fin span, etc. I assume the OR optimizer will take care of this automatically?

Rocksim welcomed add ons to read their format when the XML file standard was implemented. That's how I came up with SMARTSim, and others created utilities as well. I agree, it doesn't make sense for OR to write rocksim format. After the model is built and simulated in OR, why do you need the rocksim file? The Napster generation, I guess - everybody wants something for nothing.

Maybe I am just an old fuddy-duddy, but I haven't gotten my arms around this open source philosophy. I see it in my day job, too. Companies are taking open source codes then selling GUIs, customizations, and training for it. Seems odd to me. The profit motive will always prevail and lead the innovation, imo
 
Last edited:
The golden search is probably the best. I used it in SMARTSim and Rocksim uses it for optimal mass. Yes, it is wise to use a small design space, else the optimization can quickly get nonsensical.

Golden-section search is good for one-dimensional optimization, but doesn't work for multi-dimensional optimization directly. I might experiment with some line-search methods at some point, but the current method seems fast enough as well.

Maybe I am just an old fuddy-duddy, but I haven't gotten my arms around this open source philosophy. I see it in my day job, too. Companies are taking open source codes then selling GUIs, customizations, and training for it. Seems odd to me. The profit motive will always prevail and lead the innovation, imo

From a practical perspective, if I wanted to make money off of OR I would have to write it completely myself and have to deal with payments, support, guarantees, refunds etc. It would also be in direct competition with RockSim - either the price would have to be significantly lower, or the quality higher. OpenRocket would just be another inferior competitor and a fringe software.

On the other hand, by making it open source I'm trying to encourage others to help in the task. If it wasn't open source, OR still wouldn't have RockSim file reading support, printing or localization. I want OpenRocket to become the best model rocket simulator out there, and I just don't have the time to do that by myself. There's also the aspect of respect and new contacts that I've made. :)

I'm also a supporter of open source from a philosophical point of view. I can't say I wasn't a bit tempted to start selling OR, but I would have felt like a hypocrite. This is a hobby to me, and the point is making the world an overall better place.

Cheers,
Sampo N.

P.S. Open source is not incompatible with companies making money. Many firms make money off of open source software, like you said, by making customization, support etc. There's nothing wrong with this.
 
Fair enouh, Sampo. Everybody has their price, whether it be in dollars, time, enjoyment, or recognition. Thanks for making a cool product that makes rocketry more accurate, safe, and fun.
 
Back
Top