当前位置: 首页>>代码示例>>C++>>正文


C++ SmartPtr::AddNumberOption方法代码示例

本文整理汇总了C++中SmartPtr::AddNumberOption方法的典型用法代码示例。如果您正苦于以下问题:C++ SmartPtr::AddNumberOption方法的具体用法?C++ SmartPtr::AddNumberOption怎么用?C++ SmartPtr::AddNumberOption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SmartPtr的用法示例。


在下文中一共展示了SmartPtr::AddNumberOption方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RegisterOptions

void StandardScalingBase::RegisterOptions(
   SmartPtr<RegisteredOptions> roptions)
{
   roptions->AddNumberOption("obj_scaling_factor", "Scaling factor for the objective function.", 1.,
      "This option sets a scaling factor for the objective function. "
         "The scaling is seen internally by Ipopt but the unscaled objective is "
         "reported in the console output. "
         "If additional scaling parameters are computed "
         "(e.g. user-scaling or gradient-based), both factors are multiplied. "
         "If this value is chosen to be negative, Ipopt will "
         "maximize the objective function instead of minimizing it.");
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例2: RegisterOptions

 void WarmStartIterateInitializer::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
 {
   roptions->AddLowerBoundedNumberOption(
     "warm_start_bound_push",
     "same as bound_push for the regular initializer.",
     0.0, true, 1e-3);
   roptions->AddBoundedNumberOption(
     "warm_start_bound_frac",
     "same as bound_frac for the regular initializer.",
     0.0, true, 0.5, false, 1e-3);
   roptions->AddLowerBoundedNumberOption(
     "warm_start_slack_bound_push",
     "same as slack_bound_push for the regular initializer.",
     0.0, true, 1e-3);
   roptions->AddBoundedNumberOption(
     "warm_start_slack_bound_frac",
     "same as slack_bound_frac for the regular initializer.",
     0.0, true, 0.5, false, 1e-3);
   roptions->AddLowerBoundedNumberOption(
     "warm_start_mult_bound_push",
     "same as mult_bound_push for the regular initializer.",
     0.0, true, 1e-3);
   roptions->AddNumberOption(
     "warm_start_mult_init_max",
     "Maximum initial value for the equality multipliers.",
     1e6);
   roptions->AddStringOption2(
     "warm_start_entire_iterate",
     "Tells algorithm whether to use the GetWarmStartIterate method in the NLP.",
     "no",
     "no", "call GetStartingPoint in the NLP",
     "yes", "call GetWarmStartIterate in the NLP",
     "");
   roptions->SetRegisteringCategory("Uncategorized");
   roptions->AddNumberOption(
     "warm_start_target_mu",
     "Unsupported!",
     0e-3);
 }
开发者ID:ChinaQuants,项目名称:Ipopt,代码行数:39,代码来源:IpWarmStartIterateInitializer.cpp

示例3: RegisterOptions

 void MumpsSolverInterface::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
 {
   roptions->AddBoundedNumberOption(
     "mumps_pivtol",
     "Pivot tolerance for the linear solver MUMPS.",
     0, false, 1, false, 1e-6,
     "A smaller number pivots for sparsity, a larger number pivots for "
     "stability.  This option is only available if Ipopt has been compiled "
     "with MUMPS.");
   roptions->AddBoundedNumberOption(
     "mumps_pivtolmax",
     "Maximum pivot tolerance for the linear solver MUMPS.",
     0, false, 1, false, 0.1,
     "Ipopt may increase pivtol as high as pivtolmax to get a more accurate "
     "solution to the linear system.  This option is only available if "
     "Ipopt has been compiled with MUMPS.");
   roptions->AddLowerBoundedIntegerOption(
     "mumps_mem_percent",
     "Percentage increase in the estimated working space for MUMPS.",
     0, 1000,
     "In MUMPS when significant extra fill-in is caused by numerical "
     "pivoting, larger values of mumps_mem_percent may help use the "
     "workspace more efficiently.  On the other hand, if memory requirement "
     "are too large at the very beginning of the optimization, choosing a "
     "much smaller value for this option, such as 5, might reduce memory "
     "requirements.");
   roptions->AddBoundedIntegerOption(
     "mumps_permuting_scaling",
     "Controls permuting and scaling in MUMPS",
     0, 7, 7,
     "This is ICNTL(6) in MUMPS.");
   roptions->AddBoundedIntegerOption(
     "mumps_pivot_order",
     "Controls pivot order in MUMPS",
     0, 7, 7,
     "This is ICNTL(7) in MUMPS.");
   roptions->AddBoundedIntegerOption(
     "mumps_scaling",
     "Controls scaling in MUMPS",
     -2, 77, 77,
     "This is ICNTL(8) in MUMPS.");
   roptions->AddNumberOption(
     "mumps_dep_tol",
     "Pivot threshold for detection of linearly dependent constraints in MUMPS.",
     0.0,
     "When MUMPS is used to determine linearly dependent constraints, this "
     "is determines the threshold for a pivot to be considered zero.  This "
     "is CNTL(3) in MUMPS.");
 }
开发者ID:aimanqais,项目名称:gerardus,代码行数:49,代码来源:IpMumpsSolverInterface.cpp


注:本文中的SmartPtr::AddNumberOption方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。