PESTO icon indicating copy to clipboard operation
PESTO copied to clipboard

Restructure Pesto as Matlab package?

Open paulstapor opened this issue 8 years ago • 7 comments

One question to the other developers and users: As Daniel has pointed out recently, we could use the idea of package folders (see https://de.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html) to restructure Pesto: We could have an own namespace and subfolders, which need not to be added to the Matlab path.

That would probably break compatibility, since Pesto commands would have to be called in different manner, e.g. Pesto.getOptimization() or Pesto.getProfiles()... However, it would make things somewhat cleaner, I think. Any opinions on that?

paulstapor avatar Feb 02 '18 07:02 paulstapor

I would prefer if parameters would actually be turned into a class and this scoping would be handled internally and not exposed to the user.

FFroehlich avatar Feb 02 '18 08:02 FFroehlich

@FFroehlich : Something like this?

p = PestoProblem(costFun)
p.setBounds(...)
...
p.getMultiStarts(...)
p.getParameterProfiles(...)
p.getParameterSamples(...)

dweindl avatar Feb 02 '18 08:02 dweindl

yes

FFroehlich avatar Feb 02 '18 08:02 FFroehlich

Looks nice. However, users would need to change their Pesto code. But I think that's worth it... May this cause trouble when using the Matlab-compiler?

paulstapor avatar Feb 02 '18 09:02 paulstapor

Sounds good. What is the status there? Just wondering whether it is worth waiting for the new structure... :)

willigott avatar Jun 06 '18 07:06 willigott

We are also currently thinking about moving from Matlab to Python, or: also providing a Python interface. It is currently not clear, whether there will be a restructuring of the Matlab-version of PESTO according to this issue, or if this will be left to the Python version. I think we will start working on this in roughly 1 - 2 months, so it depends what the time scale of your project is...

paulstapor avatar Jun 06 '18 07:06 paulstapor

Oh, that is fantastic news! I am far more familiar with Python than with Matlab so this would help a lot. Let me know if I can be of any help there! You might want to look into tellurium i.e. the packages it uses which already offer(s) a great way of generating models, has full SBML support and makes also use of CVODE. It lacks, however, the parameter estimation part.

willigott avatar Jun 06 '18 08:06 willigott