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

Function constraints

interfaces/Python/example/example_hs015.py:12–14  ·  view source on GitHub ↗
(x, constraint_values)

Source from the content-addressed store, hash-verified

10 return 100.*(x[1] - x[0]**2)**2 + (1. - x[0])**2
11
12def constraints(x, constraint_values):
13 # the modeler should throw an exception if the function cannot be evaluated
14 constraint_values[:] = [x[0]*x[1], x[0] + x[1]**2]
15
16def objective_gradient(x, gradient):
17 # the modeler should throw an exception if the function cannot be evaluated

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected