Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let x_L = [1.0, 1.0, 1.0, 1.0]
- let x_U = [5.0, 5.0, 5.0, 5.0]
- proc eval_f_12805296(n`gensym12805297: Index; x`gensym12805298: ptr Number;
- new_x`gensym12805299: Bool;
- obj_value`gensym12805300: ptr Number;
- user_data`gensym12805301: UserDataPtr): Bool {.cdecl, exportc.} =
- result =
- ## Callback function for evaluating objective function
- let x = cast[ptr UncheckedArray[Number]](x`gensym12805298)
- obj_value`gensym12805300[] = x[0] * x[3] * (x[0] + x[1] + x[2]) + x[2]
- 1
Advertisement
Add Comment
Please, Sign In to add comment