private AddIpoptIntOption ( |
||
ipopt_problem | ||
keyword | string | |
val | int | |
return | IpoptBoolType |
public void Setup() { _hs037 = new HS037(); _instance = IpoptAdapter.CreateIpoptProblem(_hs037._n, _hs037._x_L, _hs037._x_U, _hs037._m, _hs037._g_L, _hs037._g_U, _hs037._nele_jac, _hs037._nele_hess, IpoptIndexStyle.C, _hs037.eval_f, _hs037.eval_g, _hs037.eval_grad_f, _hs037.eval_jac_g, _hs037.eval_h); IpoptAdapter.AddIpoptStrOption(_instance, "hessian_approximation", "limited-memory"); IpoptAdapter.AddIpoptIntOption(_instance, "limited_memory_max_history", 5); }
/// <summary> /// Function for adding an integer option. /// </summary> /// <param name="keyword">Name of option</param> /// <param name="val">Integer value of option</param> /// <returns>true if setting option succeeded, false if the option could not be set (e.g., if keyword is unknown)</returns> public bool AddOption(string keyword, int val) { return(IsInitialized && IpoptAdapter.AddIpoptIntOption(m_problem, keyword, val) == IpoptBoolType.True); }