func
        end function
    end interface

    integer :: task

    task = annealing_init

    do
        call get_next_step( params, range, x, value, task )

        select case ( task )
            case ( annealing_value )
                !
                ! Fill in the evaluation of the function
                !
                ! You can put the customised code here
                !
                value = func(x)

            case ( annealing_report )
                !
        