PyProp: Unable to run Optimizer

62 views
Skip to first unread message

Rahmathulla P

unread,
Dec 10, 2023, 3:55:20 PM12/10/23
to MachUp Forum
Hi Cory,

I've started working with PyProp and found very useful. But I am unable to execute the optimizer as it was running for very long time. Finally, I executed the same example code given in the user interface section of the documentation, as given in the below link. There are no errors (except a minor opt vs opter typo) but still it takes long time.

I reduced n_units to 10 (instead of 1000), as given in the attached file.

I waited for 14 hours in my laptop but it is still running.
Does it take that long or am I doing something wrong?

Regards,
Rahmat
example_ui.py

Cory Goates

unread,
Dec 19, 2023, 4:38:27 PM12/19/23
to MachUp Forum
Hi Rahmat

It should not take that long, unless you've put in unreasonable optimization values (too high of required thrust, too high of cruise speed, etc). You might try dialing those down really far, just to make sure it's working, and then bringing them back up to where you want them to be. As you can imagine, it's easier to find a propulsion system that will deliver 0.1 lbs of thrust than 10 lbs of thrust.

Let me know if that changes anything.

Cory

Rahmathulla P

unread,
Dec 24, 2023, 9:37:45 AM12/24/23
to MachUp Forum
Hi Cory,

I'm having trouble with the same example code given in the user interface of the documentation

Has the same code been running in your system?

Regards,
Rahmat

Rahmathulla P

unread,
Dec 25, 2023, 6:25:22 AM12/25/23
to MachUp Forum
Hi Cory,

I guess it is something to do with multiprocessing. When I was running in Anaconda Spider, there was no output but hangs. When I ran it in the command prompt, I can see errors related to multiprocessing. Please find the example code and the error log attached.

I have also another observation. The documentation, see the link and image below, provides the units that PyProp uses.
PyProp_units.png
You can see the unit of weight is ounces. But it seems the optimizer reads the unit of airframe weight in lb (see the flight condition in the error_log.txt)

Regards,
Rahmat
example_ui.py
error_log.txt

Cory Goates

unread,
Jan 3, 2024, 2:06:31 PM1/3/24
to MachUp Forum
Hi Rahmat

Sorry for the delayed response. It's been a busy couple of weeks for me. I will try to have a look at your error soon.

As far as the units go, the docstrings for Optimizer.random_search() clarify that the input units for the airframe weight are lbf. There are some exceptions to the standard units given in the "User Interface" section of the docs. I know it's not ideal.

Thanks for your patience.

Cory

Reply all
Reply to author
Forward
0 new messages