csu-hmc / opty

A library for using direct collocation in the optimization of dynamic systems.
http://opty.readthedocs.io
Other
92 stars 20 forks source link

Avoid regenerating the problem if all you want to do is change the number of nodes or interval #112

Open moorepants opened 11 months ago

moorepants commented 11 months ago

It isn't clear to me if it is possible (currently) to change the number of nodes and the interval without regenerating the Problem. It would be preferable if you didn't have to, so then you could try different discretization spacing easily wthen debugging.

moorepants commented 1 month ago

The loop in ufuncify_matrix is specified from the shape of the matrix:

https://github.com/csu-hmc/opty/blob/master/opty/utils.py#L469

It may be possible to simply change the number of nodes on an existing Problem to try different node numbers, but there may be things in Problem that hiccup on that.