Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785
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: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785
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