MCPcopy Create free account
hub / github.com/cvanaret/Uno / objective_function

Function objective_function

interfaces/C/example/example_hs015.c:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "uno/Uno_C_API.h"
6
7uno_int objective_function(uno_int /*number_variables*/, const double* x, double* objective_value, void* /*user_data*/) {
8 *objective_value = 100.*pow(x[1] - pow(x[0], 2.), 2.) + pow(1. - x[0], 2.);
9 return 0;
10}
11
12uno_int constraint_functions(uno_int /*number_variables*/, uno_int /*number_constraints*/, const double* x,
13 double* constraint_values, void* /*user_data*/) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected