Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Getting current parameter values in objective() #486021
05/31/22 13:36
05/31/22 13:36
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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)?

Re: Getting current parameter values in objective() [Re: Zheka] #486023
05/31/22 13:44
05/31/22 13:44
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
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.

Re: Getting current parameter values in objective() [Re: Zheka] #486027
05/31/22 15:42
05/31/22 15:42
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
I thought optimize() sets Parameters[i].Value...and an array of PARAMETER structs - available via Parameters - is exactly the global array for such purposes.

Re: Getting current parameter values in objective() [Re: Zheka] #486028
05/31/22 16:30
05/31/22 16:30
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
That's for external optimization. Optimize() does not set the values, but reads them.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1