Module osl_siman
module osl_siman
! Uses
use osl_core, wp => osl_wp
use osl_rng
! Types
public type osl_siman_t
! Subroutines and functions
public subroutine osl_siman_opt(sa, func_n, x_opt, f_opt, ctx)
public subroutine osl_siman_init(self, x, temp, max, step, fix, lb, ub, alpha, period, dwell, step_adj, seed, eps, num_eps, max_eval, verb)
public subroutine osl_siman_set(self, x, temp, max, step, fix, lb, ub, alpha, period, dwell, step_adj, seed, eps, num_eps, max_eval, verb)
public subroutine osl_siman_free(self)
private subroutine print_initial_values(sa)
private subroutine print_results(sa)
private subroutine print_step(sa, xopt, ratio)
private subroutine print_status(sa, xopt, fopt, acc, met, obds, opt)
private subroutine print_trial(sa, xc, fc, h, obds, accept, metrop, newopt)
end module osl_siman
Description of Types
osl_siman_t
public type osl_siman_t
private
logical :: max = .false.
real (kind=wp) :: alpha = 0.85_wp
real (kind=wp) :: eps = epsilon (1.0_wp)
integer :: dwell = 20
integer :: period = 100
integer :: num_eps = 4
integer :: max_eval = 100000
real (kind=wp) :: step_adj = 2.0_wp
integer :: seed = 274
real (kind=wp) :: f
real (kind=wp), dimension(:), pointer :: x_start
real (kind=wp), dimension(:), pointer :: x
real (kind=wp), dimension(:), pointer :: step
real (kind=wp), dimension(:), pointer :: lb
real (kind=wp), dimension(:), pointer :: ub
logical, dimension(:), pointer :: fixed
real (kind=wp) :: temp_start = 10.0_wp
real (kind=wp) :: temp = 10.0_wp
integer :: dim = 0
real (kind=wp) :: time = 0.0_wp
integer :: num_eval = 0
integer :: num_accept = 0
integer :: num_obds = 0
type (osl_rng_t) :: rng
integer :: verb = 0
logical :: init = .false.
end type osl_siman_t
Description of Subroutines and Functions
osl_siman_opt
public subroutine osl_siman_opt(sa, func_n, x_opt, f_opt, ctx)
type (osl_siman_t), intent(inout) :: sa
interface func_n
subroutine func_n(x, y, ctx)
real (kind=wp), dimension(:), intent(in) :: x
real (kind=wp), intent(out) :: y
integer, optional, dimension(:), intent(in) :: ctx
end subroutine func_n
end interface func_n
real (kind=wp), optional, dimension(sa%dim), intent(out) :: x_opt
real (kind=wp), optional, intent(out) :: f_opt
integer, optional, dimension(:), intent(in) :: ctx
! Calls: cpu_time, func_n, osl_error, osl_rng_init, print_initial_values, print_results, print_status, print_step, print_trial
end subroutine osl_siman_opt
osl_siman_init
public subroutine osl_siman_init(self, x, temp, max, step, fix, lb, ub, alpha, period, dwell, step_adj, seed, eps, num_eps, max_eval, verb)
type (osl_siman_t), intent(inout) :: self
real (kind=wp), dimension(:), intent(in) :: x
real (kind=wp), intent(in) :: temp
logical, optional, intent(in) :: max
real (kind=wp), optional, dimension(size(x,1)), intent(in) :: step
logical, optional, dimension(size(x,1)), intent(in) :: fix
real (kind=wp), optional, dimension(size(x,1)), intent(in) :: lb
real (kind=wp), optional, dimension(size(x,1)), intent(in) :: ub
real (kind=wp), optional, intent(in) :: alpha
integer, optional, intent(in) :: period
integer, optional, intent(in) :: dwell
real (kind=wp), optional, intent(in) :: step_adj
integer, optional, intent(in) :: seed
real (kind=wp), optional, intent(in) :: eps
integer, optional, intent(in) :: num_eps
integer, optional, intent(in) :: max_eval
integer, optional, intent(in) :: verb
! Calls: osl_siman_set
end subroutine osl_siman_init
osl_siman_set
public subroutine osl_siman_set(self, x, temp, max, step, fix, lb, ub, alpha, period, dwell, step_adj, seed, eps, num_eps, max_eval, verb)
type (osl_siman_t), intent(inout) :: self
real (kind=wp), optional, dimension(:), intent(in) :: x
real (kind=wp), optional, intent(in) :: temp
logical, optional, intent(in) :: max
real (kind=wp), optional, dimension(self%dim), intent(in) :: step
logical, optional, dimension(self%dim), intent(in) :: fix
real (kind=wp), optional, dimension(self%dim), intent(in) :: lb
real (kind=wp), optional, dimension(self%dim), intent(in) :: ub
real (kind=wp), optional, intent(in) :: alpha
integer, optional, intent(in) :: period
integer, optional, intent(in) :: dwell
real (kind=wp), optional, intent(in) :: step_adj
integer, optional, intent(in) :: seed
real (kind=wp), optional, intent(in) :: eps
integer, optional, intent(in) :: num_eps
integer, optional, intent(in) :: max_eval
integer, optional, intent(in) :: verb
end subroutine osl_siman_set
osl_siman_free
public subroutine osl_siman_free(self)
type (osl_siman_t), intent(inout) :: self
! Calls: osl_rng_free
end subroutine osl_siman_free
print_initial_values
private subroutine print_initial_values(sa)
type (osl_siman_t), intent(in) :: sa
! Calls: osl_print_header
end subroutine print_initial_values
print_results
private subroutine print_results(sa)
type (osl_siman_t), intent(in) :: sa
! Calls: osl_print_header
end subroutine print_results
print_step
private subroutine print_step(sa, xopt, ratio)
type (osl_siman_t), intent(in) :: sa
real (kind=wp), dimension(:), intent(in) :: xopt
real (kind=wp), dimension(:), intent(in) :: ratio
! Calls: osl_print_subheader
end subroutine print_step
print_status
private subroutine print_status(sa, xopt, fopt, acc, met, obds, opt)
type (osl_siman_t), intent(in) :: sa
real (kind=wp), dimension(:), intent(in) :: xopt
real (kind=wp), intent(in) :: fopt
integer, intent(in) :: acc
integer, intent(in) :: met
integer, intent(in) :: obds
integer, intent(in) :: opt
! Calls: osl_print_subheader
end subroutine print_status
print_trial
private subroutine print_trial(sa, xc, fc, h, obds, accept, metrop, newopt)
type (osl_siman_t), intent(in) :: sa
real (kind=wp), dimension(:), intent(in) :: xc
real (kind=wp), intent(in) :: fc
integer, intent(in) :: h
logical, intent(in) :: obds
logical, intent(in) :: accept
logical, intent(in) :: metrop
logical, intent(in) :: newopt
end subroutine print_trial