移动目标的二分搜索

问题描述 投票:0回答:0

我正在尝试计算随时间变化的系统输出的乘数。基于某些指标 M 的最新值(假设 M 在 (0,1) 中),我想将乘数“推”向一个方向或另一个方向。乘数是有界的,必须在区间 [a, b] 内。

我目前是这样实现的:

mult = (a+b)/2
system = System()
M = system.M() # the most recent value of the metric for the system
eps = system.allowed_M_epsilon()
while True:
  system.evolve()
  latest_M = system.M()
  if latest_M > M + eps:
    mult = (mult + b) / 2
  if latest_M < M - eps:
    mult = (mult + a) / 2
  M = latest_M

我的问题是,假设系统是非线性的并且不利于建模,是否有“更好”的方法来计算这个乘数?

乘数调整控制器的输出,控制器试图优化度量 M 的值。

controller binary-search-tree
© www.soinside.com 2019 - 2024. All rights reserved.