Hi,
I'm trying to use Adaptive Simulated annealing(ASA) developed by Lester Ingber at C++ in MATLAB. To do that I'm using ASAMIN which is MATLAB gateway to ASA.
I have some problem .Has anyone done ASAMIN in matlab?
Aparna Sathya Murthy
Please allow me more explain.
Accually, I want to run ASA package (Adaptive simulated annealing algorithm) in matlab. For this I used ASAMIN, a MATLAB gateway to ASA.
I used its manual (page14 of the fulltext01.pdf that is attached).
Based on that:
I saved the content of ASA package and ASAMIN package in a folder called "asamin" and saved it in C driver.
I wrote following code in matlab:
mex asamin.c asa.c -DUSER_ACCEPTANCE_TEST#TRUE DUSER_ASA_OUT#TRUE-DDBL_MIN#2.2250738585072014e-308
and run it. Matlab made following error:
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
Error using mex
asamin.c
C:\asamin\asamin.c(44) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
C:\asamin\asamin.c(57) : warning C4244: '=' : conversion from 'double' to 'long', possible loss of data
C:\asamin\asamin.c(69) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of
data
C:\asamin\asamin.c(230) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
C:\asamin\asamin.c(237) : error C2065: 'DBL_MIN' : undeclared identifier
C:\asamin\asamin.c(318) : error C2065: 'DBL_MIN' : undeclared identifier
C:\asamin\asamin.c(330) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
C:\asamin\asamin.c(331) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
C:\asamin\asamin.c(412) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
c:\asamin\asa_usr_asa.h(504) : see declaration of 'USER_DEFINES'
C:\asamin\asamin.c(412) : error C2168: 'strcpy' : too few actual parameters for intrinsic function
C:\asamin\asamin.c(457) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
C:\asamin\asamin.c(463) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
C:\asamin\asamin.c(463) : error C2198: 'mexMakeMemoryPersistent' : too few arguments for call
C:\asamin\asamin.c(467) : warning C4113: 'void (__cdecl *)(double,long *,USER_DEFINES *)' differs in
parameter lists from 'void (__cdecl *)(double,double *,double *,long *,const void *)'
C:\asamin\asamin.c(478) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\asamin\asamin.c(505) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\asamin\asamin.c(554) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
C:\asamin\asamin.c(554) : error C2198: 'set_string_to_option' : too few arguments for call
C:\asamin\asamin.c(558) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
C:\asamin\asamin.c(838) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\asamin\asamin.c(864) : warning C4267: '=' : conversion from 'size_t' to 'long', possible loss of data
C:\asamin\asamin.c(889) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
C:\asamin\asamin.c(935) : warning C4090: '=' : different 'const' qualifiers
C:\asamin\asamin.c(955) : warning C4090: '=' : different 'const' qualifiers
C:\asamin\asamin.c(965) : warning C4113: 'double (__cdecl *)()' differs in parameter lists from 'double
(__cdecl *)(double *,double *,double *,double *,double *,long *,int *,int *,int *,USER_DEFINES *)'
C:\asamin\asamin.c(1013) : error C2039: 'Asa_Out_File' : is not a member of 'USER_DEFINES'
C:\asamin\asamin.c(1013) : error C2198: 'mxFree' : too few arguments for call
I search about that in Mathworks site and found almost a similar case. i try it but it don't worked for me:
https://www.mathworks.com/matlabcentral/answers/323248-problem-using-adaptive-simulated-annealing-asa-with-asamin-gateway?s_tid=prof_contriblnk
Finally i wrote my code as following:
K>> mex CXXFLAGS="$CXXFLAGS -D DDBL_MIN=2.2250738585072014e-308" -DUSER_ACCEPTANCE_TEST -DUSER_ASA_OUT ....
mex asamin.c asa.c -DUSER_ACCEPTANCE_TEST -DUSER_ASA_OUT-DDBL_MIN=2.2250738585072014e-308
that made this error:
C:\asamin\mex not found; check that you are in the correct current folder, and check the
spelling of 'C:\asamin\mex'.
I attached a figure of the code.
If it possible, please see it.
I want more researchers to see my works. What websites like research gate, linked in, publon or Google scholar do you know?
20 January 2021 9,225 15 View
We found some scientific misconduct in published articles.
03 January 2021 719 5 View
We have an accepted paper in a journal. the journal publishes once each four months. Now, we are in 2021, and the issue of December 2020 has not been published yet. Have you experienced a similar...
01 January 2021 5,901 5 View
How can the use of artificial intelligence and decision support systems in the legal field in a way that is more user-friendly? What can be the disadvantages of these systems?
31 December 2020 9,041 3 View
almost 10 days ago, we received an email indicating that our manuscript is accepted by the journal and wanted us to send the original file (from the editorial assistant). Now, after 10 days we...
16 December 2020 7,046 20 View
If I want to edit the graphs (aesthetic aspect) what software/website is your suggestion?
16 November 2020 8,208 6 View
I know there are some exclusive journal suggesters like Wiley Journal Finder (https://journalfinder.wiley.com/search?type=match) and Springer Journal Suggester. But, I am looking for a much more...
16 November 2020 7,325 4 View
I need to simulate faraday effect
10 October 2020 2,649 3 View
what are the mathematical formulation?
27 September 2020 9,838 7 View
what are types of boundary condition for simulating of pollution transport in Mt3dms of GMS software? I made a transport model in GMS but i dont put any boundary condition in my model and just...
16 July 2019 8,484 3 View
Results of single-case research designs (i.e., n-of-1 trials) are often evaluated by visually inspecting the time-series graph and computing quantitative indices. A question our research team is...
03 March 2021 687 1 View
Hi Community, I'm facing the issue of integration/compiling a new routing protocol in a WSN simulator. The final goal is to successfully add, configure this routing protocol in hardware devices...
01 March 2021 9,332 6 View
Dear Researchers I am trying to perform a PIL simulation using STM32F4 Discovery board and comunication serial USB TO TTL. During simulation I receive the following timeout error: An error...
01 March 2021 2,327 1 View
To dear Researchers, I was analyzing a series of concentration for estimation of Real-Time PCR efficiency. The concentration was 1:10. I used MS-excel to evaluate Slope. The result of slope was -8...
01 March 2021 8,683 4 View
Hi everyone, I would like to ask how I can download BibExcel software for MacOs? There are some links which are supported by Windows but I could not find it for Mac. or is there any other software...
01 March 2021 652 1 View
The following code (see 1st 2 images attached) is used to produce PID controller values that are designed to control the system (G). The code finds the PID controller values (noted as k) by using...
28 February 2021 6,560 14 View
I have input and output data set for "ANFIS modeling in MATLAB", and I am getting some negative predicted values of output in testing. However, the predicted values of output in training are...
28 February 2021 3,459 3 View
Hi all, I'm doing a transient simulation of flow past a rectangular cylinder close to the free surface. As far as I'm concerned, the common practice is to discard the initial stages of the...
25 February 2021 1,348 3 View
I am required to learn about Flyback converters and I got stuck not knowing to full design of the power supply flyback converter Based USB Charger Model using Simulink, especially the design model...
25 February 2021 5,435 2 View
I do need the Matlab code of Fractal Discrete Cosine Transform (FDCT). Can anyone who has already implement this code, help me with the implementation of this transform?
24 February 2021 5,602 2 View