Getting current parameter values in objective()

Posted By: Zheka

Getting current parameter values in objective() - 05/31/22 13:36

Parameters[i].Min/Max/Step are set, but not Parameters[i].Value (nor Parameters[i].Best).

If that's not a bug, how is one supposed to access current parameter values (besides declaring them global)?
Posted By: jcl

Re: Getting current parameter values in objective() - 05/31/22 13:44

Parameters are returned by optimize().

https://zorro-project.com/manual/en/optimize.htm

For using them in other functions, store them in a global array.
Posted By: Zheka

Re: Getting current parameter values in objective() - 05/31/22 15:42

I thought optimize() sets Parameters[i].Value...and an array of PARAMETER structs - available via Parameters - is exactly the global array for such purposes.
Posted By: jcl

Re: Getting current parameter values in objective() - 05/31/22 16:30

That's for external optimization. Optimize() does not set the values, but reads them.
© 2024 lite-C Forums