[Scilab-users] Can't convert old diagram (problem in version)
leohpaz
pazleonardoh at gmail.com
Fri Aug 4 23:55:28 CEST 2017
Hi,
I'm running a genetic algorithm to optmize a function using Scilab and Xcos,
but this error keeps showing up. Actually, it will still happen even if I
just keep on running the diagram repeatedly without the genetic algorithm.
If it helps, my code is:
//
----------------------------------------------------------------------------------------------------------------
clear; clc;
function f=teste(x)
exec(SET_TIME FUNCTION PATH)
loadXcosLibs(); loadScicos();
importXcosDiagram(DIAGRAM PATH);
typeof(scs_m);
Context.S= 20;
Context.tau = x(1);
Context.zeta = x(2);
scicos_simulate(scs_m,Context);
result = [A.time,A.values];
f = set_time(result,95);
endfunction
PopSize = 100;
Proba_cross = 0.5;
Proba_mut = 0.3;
NbGen = 10;
NbCouples = 100;
Log = %T;
nb_disp = 50; // Nb point to display from the optimal population
pressure = 0.1;
ga_params = init_param();
ga_params = add_param(ga_params,'dimension',2);
//tau,zeta
ga_params = add_param(ga_params,'minbound',[0,0]);
ga_params = add_param(ga_params,'maxbound',[10,1]);
[pop_opt, fobj_pop_opt, pop_init, fobj_pop_init] = optim_moga(teste,
PopSize,NbGen, Proba_mut, Proba_cross, Log, ga_params);
//
----------------------------------------------------------------------------------------------------------------
where set_time is a function that I've created that works fine by itself and
A is the matrix created by the block "To Workspace" in Xcos. Thoughts on
that? Thanks in advace.
--
View this message in context: http://mailinglists.scilab.org/Can-t-convert-old-diagram-problem-in-version-tp4036822.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list