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.
Hello, I am interested to study following report: "Mott MacDonald, water balance computation for the Sultanate of Oman. Final report, Submitted to the Ministry of Regional Municipalities and Water...
18 June 2023 2,340 2 View
I was working on a nanotube by 280 atoms and the level of calculation is B3LYP/3-21G.
08 June 2021 3,510 4 View
It is well known that you can not help yourself by reviewing a manuscript (written by yourself) immediately. There is a need for a distance to promote the quality of reviewing. Please share your...
03 May 2021 7,796 9 View
I am curious about the applications of one of my research interests, AI, learning in the other majors. Please guide me about the applications of this field that you have encountered so far.
11 April 2021 9,840 7 View
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,449 15 View
Dear all, In vasp, we can use either finite displacement method (IBRION 5/6) or DFTP (IBRION7/8) to perform vibrational spectroscopy. I am aware that currently vdw correction cannot be applied...
18 January 2021 7,673 3 View
We found some scientific misconduct in published articles.
03 January 2021 1,003 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 6,123 5 View
Public law و Private law and criminal law as well as international and ...
31 December 2020 7,979 4 View
]n the case of software or virtual networks that are provided internationally and are almost exclusive and are usually supported by major world powers, it is necessary to accept a number of...
31 December 2020 9,725 4 View
Hi, I'm currently working on a project where I need to plot the atom-projected band structure using GPAW. I've been able to calculate the band structure for my material, but I'm having trouble...
07 August 2024 269 3 View
Visual Studio Code (VS Code) has become a popular choice among developers for several reasons: 1. **Free and Open Source**: VS Code is free to use and open source, making it accessible to...
07 August 2024 7,013 4 View
I attempted to make a privately uploaded text public but a window appeared that said an error occurred. There was no explanation provided as to why there was an error or what might be done to...
05 August 2024 8,025 7 View
I am new to Micromechanics and having similar problem with understanding the implementation of the formula's. I would appreciate if anyone can guide me on how to go about getting a scalar value...
30 July 2024 969 0 View
DOS version.
29 July 2024 6,064 1 View
Please, what is the memory consumption of the Matlab function quad tree decomposition procedure [S = qtdecomp(I)] with respect to the input set I?
27 July 2024 5,455 2 View
I need a reliable source or an example supported by excel sheet to understand Fuzzy Vikor?
27 July 2024 5,916 1 View
Hello, I am a research scholar currently working on a project involving image segmentation, and I am interested in using differential evolution for this purpose . I would greatly appreciate it if...
25 July 2024 9,926 1 View
Hi all, My lab has Thermo Scientific™ Invitrogen™ EVOS™ FL Auto 2 Imaging System, and I was wondering if I will be able to use it with whole blood, whilst focusing on platelets? The idea would...
24 July 2024 9,337 3 View
The Louvain method – named after the University of Louvain where Blondel et al. developed the algorithm – finds communities by optimizing modularity locally for every node’s neighborhood, then...
23 July 2024 6,659 0 View