barbzd

15 Reputation

3 Badges

5 years, 102 days

MaplePrimes Activity


These are replies submitted by barbzd

@tomleslie This has resolved the issue. Many thanks. 

@Kitonum the full code is very long , here is the problematic part : 

 

 result := DirectSearch:-Search(ChevalierWP, [sum(d[i], i = 1 .. 7) <= total], variables = [d = Vector(7)], assume = nonnegint,
   strategy = globalsearch, method = cdos, evaluationlimit = 10000, objectivetarget = 10^(-10));

thanks in advance for helping me on this. 


 

@acer 

 result := DirectSearch:-Search(ChevalierWP, [sum(d[i], i = 1 .. 7) <= total], variables = [d = Vector(7)], assume = nonnegint,
   strategy = globalsearch, method = cdos, evaluationlimit = 10000, objectivetarget = 10^(-10));

sorry my bad, as you can see I'm trying to do a global search. I have read the Direct help search and I have added the following options but I still have the same problem. Additionally when I add the option checksolution it'll generate the following error: 

Error, (in DirectSearch:-Search) invalid input: DirectSearch:-GlobalSearch expects value for keyword parameter variables to be of type {list(name), [name::'array'], [name::'rtable'], [name = 'array'], [name = 'rtable']}, but received [d = (Vector(7, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 0}))]

I have also treid and wrote this part of my code as follows :

 result := DirectSearch:-GlobalOptima(ChevalierWP, [sum(d[i], i = 1 .. 7) <= total], variables = [d = Vector(7)], assume = nonnegint,
   evaluationlimit = 10000, objectivetarget = 10^(-10));

but receive a similar error again : 

Error, (in Optimal) invalid input: DirectSearch:-GlobalOptima expects value for keyword parameter variables to be of type {list(name), [name::'array'], [name::'rtable'], [name = 'array'], [name = 'rtable']}, but received [d = (Vector(7, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 0}))]

Thank you so much in advance for helping me on this. 

Page 1 of 1