具有阶跃函数的目标函数的优化 [英] The Optimization of an Objective Function with Step Functions

查看:254
本文介绍了具有阶跃函数的目标函数的优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经问过此问题,但回答不是很令人满意.所以我再次在这里问:

I've asked this question at Math SE, but the response is not very satisfactory. So I asked here again:

我有一个线性不等式和等式约束的优化问题:

I have an optimization problem with linear inequalities and equalities constraint:

A*x<=b 
Aeq*x=beq

问题在于目标函数是由一系列Heaviside阶跃函数的总和组成的,

The problem is that the objective function is composed of a summation of a series of Heaviside step functions,

这是目标函数的伪代码:

Here's the pseudo code for the objective function:

function f(k, c, x)
  ffunction =0;
  for i=0;i<k.row.length;i++
     smallF=0
     for j=0; j<k.column.length; j++
      smallF+= k.row[i]*k.column[j]*x[j]+c[j]
     end 
     ffunction += u(smallF)
  end
 f=ffunction 
end


function u(x)
  if(x>0)
   return 1
  else
   return 0
  end
end

我的建议是将阶跃函数近似为平滑函数,并为此目的使用非线性优化.但是MATLAB工具箱中有什么可以让我解决此问题而无需进行平滑的函数转换的吗?

The suggestion I got is to approximate the step function as a smooth function and use nonlinear optimization for this purpose. But is there anything in MATLAB toolbox that allows me to solve this without doing the smooth function conversion?

推荐答案

可以使用混合整数编程求解器精确地解决此问题.我在

This problem can be solved exactly using a mixed-integer programming solver. I explain the details in my answer to your Math SE post ; summarizing, you need to introduce a binary variable and a linear inequality for each term in the objective function involving a Heaviside step function.

这篇关于具有阶跃函数的目标函数的优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆