Similar to the dataset_simulated_annealing_optimizer worker, which takes a dataset as input, we can consider the curve_simulated_annealing_optimizer worker. It takes a curve as input and returns the optimal y value of the curve as output.
![](https://www.d3view.com/wp-content/uploads/2023/04/image-17-1024x525.png)
A curve can be considered as a dataset with two columns with each representing one coordinate of the points on a curve. The difference between the curve worker and the dataset worker is the way the model is built. With a curve input, curve interpolation techniques are used to find the values on a new location of the curve.
Example
Starting with a parabola curve y = (x-2)^2, we know that the optimum is 0. Upload the curve to the worker input and execute the worker, we see the output is 0 as expected.
![](https://www.d3view.com/wp-content/uploads/2023/04/image-18-1024x625.png)
![](https://www.d3view.com/wp-content/uploads/2023/04/image-19.png)
Replace the curve input by a sine curve that ranges from 0 to 2*pi (about 6.28). From experience, we know the optimum is at x = 5*PI/4 (about 3.927) with a min value of -1.
![](https://www.d3view.com/wp-content/uploads/2023/04/image-20-1024x624.png)
![](https://www.d3view.com/wp-content/uploads/2023/04/image-21.png)
Now we can try a more complex curve with multiple local minimums. As we can see from the graph, the minimum is around x = 5 and the optimal value is about -1.88. Again, after running the worker, we get the expected output.
![](https://www.d3view.com/wp-content/uploads/2023/04/image-23-1024x626.png)
![](https://www.d3view.com/wp-content/uploads/2023/04/image-24.png)