?? asa-makefile
字號:
##
# /***********************************************************************
# * Adaptive Simulated Annealing (ASA)
# * Lester Ingber <ingber@ingber.com>
# * Copyright (c) 1993-2007 Lester Ingber. All Rights Reserved.
# * The ASA-LICENSE file must be included with ASA code.
# ***********************************************************************/
#
## $Id: ASA-Makefile,v 26.23 2007/01/31 20:13:24 ingber Exp ingber $
## ********************************************************************
## First read ASA-README, then examine this ASA-Makefile and ASA-NOTES.
## ********************************************************************
MANIFEST = \
ASA-CHANGES \
ASA-LICENSE \
ASA-Makefile \
ASA-NOTES \
ASA-README.html \
ASA-README.ms \
ASA-README.pdf \
ASA-README.ps \
ASA-README+.txt \
ASA-README.txt \
asa_test_asa \
asa_test_usr \
asa_usr.c \
asa_usr.h \
asa_usr_cst.c \
asa.c \
asa.h \
asa_usr_asa.h \
asa_opt
###
### USER OPTIONS
### The policy is to try to have the asa module (not necessarily
### the user module) compile without "errors" (not necessarily without
### "warnings"). Some additional modifications may be needed on your
### machine; e.g., you might have to comment out the `#include <stdlib.h>'
### line in asa_usr_asa.h. See the current ASA-NOTES file for any
### updates on some standard implementations.
###
## Defaults for various options are given below. These can be
## overridden using DEFINE_OPTIONS. If you include several options,
## separate them by a white space or place them conveniently on several
## lines; if the latter, be sure each line to be continued ends in a "\"
## (backslash).
DEFINE_OPTIONS = -DASA_TEST=TRUE # -DMY_TEMPLATE=TRUE
## This will run the ASA problem.
#DEFINE_OPTIONS = -DASA_TEST=TRUE
##
## This ASA_TEMPLATE will number the ASA_OUT file according to the
## system pid. See asa_usr.h or possible changes you may have to make in the
## include file and the prototype for getpid(), as well as for the set of
## DEFINE_OPTIONS this example turns on. (You might also have to change
## the int declaration of pid_int in asa_usr.c as well.)
#DEFINE_OPTIONS = -DASA_TEMPLATE_ASA_OUT_PID=FALSE
##
## This ASA_TEMPLATE will run the ASA test problem multiple times, and
## separate the runs into different files. See asa_usr_asa.h for the set
## of DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_MULTIPLE=FALSE
##
## This ASA_TEMPLATE illustrates the use of SELF_OPTIMIZE=TRUE. See
## asa_usr_asa.h for the set of DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_SELFOPT=FALSE
##
## This will run the ASA_SAMPLE problem. See asa_usr_asa.h for the set of
## DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_SAMPLE=FALSE
##
## This will run the ASA_QUEUE problem. See asa_usr_asa.h for the set of
## DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_QUEUE=FALSE
##
##This will run the ASA_PARALLEL code. See asa_usr_asa.h for the set of
## DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_PARALLEL=FALSE
##
## These will run the ASA_SAVE problem. See asa_usr_asa.h for the set of
## DEFINE_OPTIONS this example turns on.
#DEFINE_OPTIONS = -DASA_TEMPLATE_SAVE=FALSE
##
###
### Pre-Compile Options
###
## You can elect to read in the Program Options from asa_opt by
## setting OPTIONS_FILE=TRUE. OPTIONS_FILE=TRUE can be set here or
## in asa_usr_asa.h.
#-DOPTIONS_FILE=TRUE
## If OPTIONS_FILE is set to TRUE, then also setting OPTIONS_FILE_DATA
## to TRUE will read in most initialization data from asa_opt.
#-DOPTIONS_FILE_DATA=TRUE
## You can elect to read in the Program Options from asa_opt by setting
## RECUR_OPTIONS_FILE=TRUE. RECUR_OPTIONS_FILE=TRUE can be set here or in
## asa_usr_asa.h.
#-DRECUR_OPTIONS_FILE=FALSE
## If RECUR_OPTIONS_FILE is set to TRUE, then also setting
## RECUR_OPTIONS_FILE_DATA to TRUE will read in most initialization data
## from asa_opt.
#-DRECUR_OPTIONS_FILE_DATA=FALSE
## If COST_FILE is set to TRUE, then your own file for the cost
## function can be read into asa_usr.c.
#-DCOST_FILE=TRUE
## Setting ASA_LIB=TRUE will facilitate your running asa() as a library
## call from another program, calling asa_main() in asa_usr.c. In the
## templates, provided, all initializations and cost function definitions
## are set up in asa_usr.c.
#-DASA_LIB=FALSE
## If ASA_TEMPLATE_LIB=TRUE, then asa_main() returns information to an
## example main() in asa_usr.c. This illustrates how you provide the
## appropriate memory in your main().
#-DASA_TEMPLATE_LIB=FALSE
## If you do _not_ have an ANSI compiler set this to FALSE.
## If you use HAVE_ANSI=FALSE, change CC and CDEBUGFLAGS below.
#-DHAVE_ANSI=TRUE
## Most newer operating systems do not like any other I/O prototyping
## other than those in their own include files. Other machines, like a
## Dec\-3100 under Ultrix complain that the ANSI I/O prototypes were
## inconsistent. A Sun under 4.1.x gcc gave warnings if no I/O prototypes
## were present. The defaults in asa_usr_asa.h use newer system prototypes.
## IO_PROTOTYPES=TRUE will uncomment out declarations for such items as
## fprintf, fflush, fclose, exit, and fscanf.
#-DIO_PROTOTYPES=FALSE
## Some systems do not have the time include files used here; others
## have different scales for time. Setting TIME_CALC=TRUE will permit
## use of the time routines.
#-DTIME_CALC=FALSE
## Some systems, e.g., hpux, use other Unix-standard macros to access
## time. Setting TIME_STD=TRUE when using TIME_CALC=TRUE will use these
## time routines instead.
#-DTIME_STD=FALSE
## Some smaller systems choke on `long int' and this option can be
## set to INT_LONG=FALSE to turn off warnings and possibly some errors.
#-DINT_LONG=TRUE
## Some machine may not permit the dimension of calloc be anything
## but int; in this case define INT_ALLOC=TRUE. The default of FALSE
## is to set the dimension to that of LONG_INT, determined by INT_LONG.
#-DINT_ALLOC=FALSE
## You can define SMALL_FLOAT to better correlate to your own machine's
## maximum precision here if you know it.
#-DSMALL_FLOAT=1.0E-18
## You can define your own machine's minimum positive doubles here
## if you know it.
#-DMIN_DOUBLE=SMALL_FLOAT
## You can define your own machine's maximum doubles here if you
## know it.
#-DMAX_DOUBLE=1.0/SMALL_FLOAT
## You can define your own machine's maximum precision here if you
## know it.
#-DEPS_DOUBLE=SMALL_FLOAT
## When CHECK_EXPONENT is TRUE, EXPONENT_CHECK(x) in asa() checks that
## an exponent x is within a valid range and, if not, adjusts its
## magnitude to fit in the range.
#-DCHECK_EXPONENT=FALSE
## When parameter temperatures are less than SMALL_FLOAT, do not exit,
## and set them to SMALL_FLOAT.
#-DNO_PARAM_TEMP_TEST=FALSE
## When the cost temperature is less than SMALL_FLOAT, do not exit,
## and set it to SMALL_FLOAT.
#-DNO_COST_TEMP_TEST=FALSE
## You can try to use asa to self-optimize its own Program Options
## be setting SELF_OPTIMIZE=TRUE. This can be very CPU-expensive as
## well as being dependent on your definition of recur_cost_function.
#-DSELF_OPTIMIZE=FALSE
## To use the ASA test problem, set ASA_TEST to TRUE.
#-DASA_TEST=FALSE
## To use the enhanced ASA test problem, set ASA_TEST_POINT to TRUE.
#-DASA_TEST_POINT=FALSE
## Setting USER_INITIAL_COST_TEMP to TRUE permits you to specify the
## initial cost temperature. This can be useful in problems where you
## want to start the search at a specific scale.
#-DUSER_INITIAL_COST_TEMP=FALSE
## Different rates of parameter annealing can be set with
## RATIO_TEMPERATURE_SCALES set to TRUE.
#-DRATIO_TEMPERATURE_SCALES=FALSE
## Setting USER_INITIAL_PARAMETERS_TEMPS to TRUE permits you to specify
## the initial parameter temperatures. This can be useful in constrained
## problems, where greater efficiency can be achieved in focussing the
## search than might be permitted just by setting upper and lower bounds.
#-DUSER_INITIAL_PARAMETERS_TEMPS=FALSE
## Different increments, used during reannealing to set each
## parameter's numerical derivatives, can be set with DELTA_PARAMETERS set
## to TRUE.
#-DDELTA_PARAMETERS=FALSE
## QUENCH_PARAMETERS permits you to alter the basic algorithm to
## perform selective "quenching," i.e., faster temperature cooling than
## permitted by the ASA algorithm. This can be very useful, e.g., to
## quench the system down to some region of interest, and then to perform
## proper annealing for the rest of the run.
#-DQUENCH_PARAMETERS=FALSE
## If QUENCH_COST is set to TRUE, the scale of the power of the
## temperature schedule used for the acceptance function can be altered in
## a similar fashion to that described above when QUENCH_PARAMETERS is set
## to TRUE.
#-DQUENCH_COST=FALSE
## When QUENCH_PARAMETERS is TRUE, if QUENCH_PARAMETERS_SCALE is TRUE,
## then the temperature scales and the temperature indexes are affected by
## User_Quench_Param_Scale[]. When QUENCH_PARAMETERS is TRUE, if
## QUENCH_PARAMETERS_SCALE is FALSE, only the temperature indexes are
## affected by User_Quench_Param_Scale[].
#-DQUENCH_PARAMETERS_SCALE=TRUE
## When QUENCH_COST is TRUE, if QUENCH_COST_SCALE is TRUE, then the
## temperature scale and the temperature index are affected by
## User_Quench_Cost_Scale[0]. When QUENCH_COST is TRUE, if
## QUENCH_COST_SCALE is FALSE, only the temperature index is affected by
## User_Quench_Cost_Scale[0].
#-DQUENCH_COST_SCALE=TRUE
## To use testing templates in the asa_usr.c and asa.c files, associated
## with several OPTIONS, set ASA_TEMPLATE to TRUE.
#-DASA_TEMPLATE=FALSE
## It can be useful to return additional information to the user
## module from the asa module. When OPTIONAL_DATA_DBL is set to TRUE, an
## additional pointer, *Asa_Data_Dbl, is available in DEFINES *OPTIONS to
## gather such data.
#-DOPTIONAL_DATA_DBL=FALSE
## It can be useful to return additional integer information to the
## user module from the asa module. When OPTIONAL_DATA_INT is set to
## TRUE, an additional pointer, *Asa_Data_Int, is available in DEFINES
## *OPTIONS to gather such data.
#-DOPTIONAL_DATA_INT=FALSE
## It can be useful to return/pass additional array information to the
## user module from/through the asa module. When OPTIONAL_DATA_PTR is set
## to TRUE, an additional pointer, *Asa_Data_Ptr, of type
## OPTIONAL_PTR_TYPE is available in DEFINES *OPTIONS to gather such data.
#-DOPTIONAL_DATA_PTR=FALSE
## The function used for the cost_function temperature schedule is of
## the form test_temperature in asa.c. You can define your own function
## of test_temperature adaptively in asa_usr.c in user_cost_schedule() (and
## in recur_user_cost_schedule() if SELF_OPTIMIZE is TRUE) by setting
## USER_COST_SCHEDULE to TRUE.
#-DUSER_COST_SCHEDULE=FALSE
## The standard Boltzmann probability distribution is used for the
## acceptance test. You can adaptively change this using Asymp_Exp_Param
## by setting USER_ACCEPT_ASYMP_EXP to TRUE.
#-DUSER_ACCEPT_ASYMP_EXP=FALSE
## The standard Boltzmann probability distribution is used for the
## acceptance test. You can change this by setting USER_ACCEPT_THRESHOLD
## to TRUE.
#-DUSER_ACCEPT_THRESHOLD=FALSE
## The standard Boltzmann probability distribution is used for the
## acceptance test. You can adaptively change this with your own function
## in asa_usr.c in user_acceptance_test() (and in
## recur_user_acceptance_test() if SELF_OPTIMIZE is TRUE) by setting
## USER_ACCEPTANCE_TEST to TRUE.
#-DUSER_ACCEPTANCE_TEST=FALSE
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -