X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Foptimization%2Ftests%2Funit_tests%2Foptimbase%2Foptimbase_checkcostfun.dia.ref;h=283f278d1d60a3636d5c0e6ff9498e5e4f3f6849;hp=590511d8977b38d7e19ce96ce891f59b432b7002;hb=ba6c2ac59368d295410402c32cb2c1c438c0b521;hpb=5ade146fe536210219f5b1a81e1f43dec4fd1492 diff --git a/scilab/modules/optimization/tests/unit_tests/optimbase/optimbase_checkcostfun.dia.ref b/scilab/modules/optimization/tests/unit_tests/optimbase/optimbase_checkcostfun.dia.ref index 590511d..283f278 100644 --- a/scilab/modules/optimization/tests/unit_tests/optimbase/optimbase_checkcostfun.dia.ref +++ b/scilab/modules/optimization/tests/unit_tests/optimbase/optimbase_checkcostfun.dia.ref @@ -89,6 +89,7 @@ assert_checkerror(cmd,errmsg,[], "optimbase_checkcostfun" , "index" , 1 , 0 , 1) opt = optimbase_destroy(opt); // // Test with wrong non linear constraints f(x0,2) is not a row vector +// The cost function transposes the column vector. // function [ f , c , index ] = optimtestcase2 ( x , index ) f = [] @@ -112,8 +113,7 @@ opt = optimbase_configure(opt,"-numberofvariables",4); opt = optimbase_configure(opt,"-function",optimtestcase2); opt = optimbase_configure(opt,"-x0",[0.0 0.0 0.0 0.0]'); opt = optimbase_configure(opt,"-nbineqconst",3); -cmd = "opt = optimbase_checkcostfun(opt);"; -assert_checkerror(cmd,"%s: The matrix %s from costf(x0,%d) has %d rows, instead of %d.",[],"optimbase_checkcostfun","c",5,3,1); +opt = optimbase_checkcostfun(opt); opt = optimbase_destroy(opt); // // Test with wrong non linear constraints f(x0,2) is a row vector with 5 components instead of 3 @@ -145,6 +145,7 @@ assert_checkerror(cmd,"%s: The matrix %s from costf(x0,%d) has %d columns, inste opt = optimbase_destroy(opt); // // Test with wrong non linear constraints f(x0,3) is a column vector +// The cost function transposes the column vector. // function [ f , c , index ] = optimtestcase4 ( x , index ) f = [] @@ -168,8 +169,7 @@ opt = optimbase_configure(opt,"-numberofvariables",4); opt = optimbase_configure(opt,"-function",optimtestcase4); opt = optimbase_configure(opt,"-x0",[0.0 0.0 0.0 0.0]'); opt = optimbase_configure(opt,"-nbineqconst",3); -cmd = "opt = optimbase_checkcostfun(opt);"; -assert_checkerror(cmd,"%s: The matrix %s from costf(x0,%d) has %d rows, instead of %d.",[],"optimbase_checkcostfun","c",5,3,1); +opt = optimbase_checkcostfun(opt); opt = optimbase_destroy(opt); // // Test with wrong non linear constraints f(x0,3) is a row vector with 5 columns instead of 4 @@ -216,7 +216,7 @@ opt = optimbase_checkcostfun(opt); opt = optimbase_destroy(opt); // // Test with not correct rosenbrock function : g is a column vector instead of row vector -// +// The cost function transposes the column vector. function [ f , g , index ] = rosenbrock4 ( x , index ) f = 100.0 *(x(2)-x(1)^2)^2 + (1-x(1))^2; g(1) = - 400. * ( x(2) - x(1)**2 ) * x(1) -2. * ( 1. - x(1) ) @@ -227,6 +227,5 @@ opt = optimbase_configure(opt,"-numberofvariables",2); opt = optimbase_configure(opt,"-function", rosenbrock4 ); opt = optimbase_configure(opt,"-withderivatives",%t); opt = optimbase_configure(opt,"-x0",[-1.2 1.0].'); -cmd = "opt = optimbase_checkcostfun(opt);"; -assert_checkerror(cmd,"%s: The matrix %s from costf(x0,%d) has %d rows, instead of %d.",[],"optimbase_checkcostfun","g",3,2,1); +opt = optimbase_checkcostfun(opt); opt = optimbase_destroy(opt);