MCPcopy Create free account
hub / github.com/Arash-codedev/openGA / eval_solution

Function eval_solution

examples/mo-1/example_mo1.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40bool eval_solution(
41 const MySolution& p,
42 MyMiddleCost &c)
43{
44 double x=p.x;
45 double y=p.y;
46 // the middle comupations of cost:
47 c.cost_A=log(1.0+x*sqrt(x*y));
48 c.cost_B=98.0-100.0*(1.0-1.0/(1.0+y*sqrt(x*y)));
49 return true; // genes are accepted
50}
51
52MySolution mutate(
53 const MySolution& X_base,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected