Genetic Optimizer: Cross Thread Operations error
Author: Carova
Creation Date: 1/27/2015 5:58 PM
profile picture

Carova

#1
Hi!

I decided to experiment with the Genetic Optimizer Extension and I have run into a problem. In the middle of an optimization all of the parameter combinations start to return a "0" fitness (see attached screenshot) and under Errors the is a message about "cross thread operations" (see other attachment).

Any ideas?

Vince
profile picture

Carova

#2
Here are the attachments



profile picture

Carova

#3
I think that it is being caused by an "Index out of Range".

Error processing symbol FB Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Error processing symbol KRFT Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Error processing symbol LMCA Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Are there any thoughts of how to code the loop to avoid this problem? Something like WL4's "FirstActualBar". I have tried Close.FirstActualBar but that does not solve the problem. Thanks!

Vince
profile picture

Eugene

#4
It's definitely not a Genetic Optimizer issue: we made an effort to fix all cross-thread operation errors that existed in it. As per secreenshot, errors are coming out of the lvErrors control which a Wealth-Lab Optimization tool's own control (Errors tab). The GO doesn't make calls to this control. So it has a more general nature, and I do think it may be a Vista related problem. Fixing your script or using try/catch block may alleviate the problem.
profile picture

Carova

#5
Hi Eugene!

I am currently running on a Windows 7 machine, so it is not Vista! ;)

QUOTE:
Are there any thoughts of how to code the loop to avoid this problem? Something like WL4's "FirstActualBar". I have tried Close.FirstActualBar but that does not solve the problem. Thanks!


Why does this not seem to work?

Vince
profile picture

Eugene

#6
Hi Vince,

QUOTE:
Why does this not seem to work?

Question does not make sense outside of context of script and data. FirstActualBar is not the silver bullet, and your usage of it is unknown. There are several documented reasons for getting this error: Index was out of range.