我执行了一个循环 10 次的遗传算法,每次调用“FitnessFunction”函数时,我使用后台工作人员在拓扑上移动一个对象,一旦它到达特定点,然后我取消该后台工作人员并返回“遗传算法”功能...
不幸的是,我收到以下错误:
Cross-thread operation not valid: Control 'topology' accessed from a thread other than the thread it was created on...
我试过的:
每次我调用“FitnessFunction”函数时运行后台工作程序,该函数负责在特定条件下停止它。