<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 04/08/2018 à 21:54, Claus Futtrup a
écrit :<br>
</div>
<blockquote
cite="mid:8a976ed1-5b45-0cf6-b5d3-bd10883e2c52@gmail.com"
type="cite">Hi there
<br>
<br>
Is there anyone who could help me with the CMA-ES optimization
toolbox for Scilab 6?
<br>
<br>
I wasn't successful in creating a functioning toolbox for Scilab 5
in the first place.
<br>
</blockquote>
<br>
Yet, you have published some binaries...<br>
<br>
What are the problems?<br>
Since there is no unit test, we could expect that examples work. But
they don't.<br>
And they can't. Examples:<br>
<ul>
<li>cma_ask, cma_new: the examples include<br>
</li>
<ul>
<li>a call to cma_stop(), but there is no page for it. =>
Please document it, or remove it from the example..</li>
<li>some calls to undefined fitfun()...</li>
</ul>
<li>cma_optim:</li>
<ul>
<li>the first line uses getf(), that was removed from Scilab
5.3.0 (2010-12-16..) << 5.5<br>
</li>
<li>again, fitfun is called without being defined. Now we
understand its meaning. <br>
</li>
</ul>
<li>cma_tell:<span class="scilabid"></span></li>
<ul>
<li><span class="scilabid">y</span><span class="scilabopenclose">(</span><span
class="scilabid">i</span><span class="scilabopenclose">)</span>
<span class="scilaboperator">=</span> <span class="scilabid">costf</span><span
class="scilabopenclose">(</span><span class="scilabid">X</span><span
class="scilabopenclose">(</span><span class="scilabid">i</span><span
class="scilabopenclose">))</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// <font color="#3366ff">costf
needs to be defined ==> ??</font></span></li>
</ul>
</ul>
If there are no unit tests, not a single complete runnable example,
no code up-to-date with at least Scilab 5.4 (for which the first
release was published), your question is not just about getting help
to port the module from Scilab 5.4 to 5.5 and 6.0...<br>
<br>
About the macros: some advices to make the code usable on Scilab 6.0
(and 5):<br>
Most of functions are defined in a single file: cma.sci. In Scilab
6, only the first function of the file (or the one having the name
of the file) is public. Other ones are private, and can be called
only by the public one.<br>
So, in pratical, <br>
<ul>
<li>split the file cma.sci in as many files .sci as needed.
internal functions (not documented) that are shared by several
separate (public or internal) functions must also be defined
separately.</li>
</ul>
<p>Cheers<br>
Samuel<br>
</p>
<p><br>
</p>
</body>
</html>