本文介绍了无法使用Microsoft Solver Foundation解决二次目标函数和整数变量约束问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标记行中所提到的,我正在尝试建模一个问题,其中我有二次目标函数(试图最小化风险回报率)对于给定的参数lambda。 (lambda * w * Covar * w_transpose - Mean * w)。

So as mentioned in the tag line , I am trying to model a problem where I have Quadratic objective function(trying to minimize the risk return profile ) for a given parameter lambda. (lambda*w* Covar*w_transpose - Mean *w).

我在约束中有一些整数变量来建模绝对投资组合周转。我试图用InteriorPointSolver对问题进行建模但是InteriorPointSolver似乎没有实现SetIntegrality函数。

I have some integer variables in the constraints to model for the absolute portfolio turnover .I tried to model the problem with InteriorPointSolver but SetIntegrality function does not seem to be implemented for InteriorPointSolver.

然后我尝试使用Simplex方法模拟问题,但调试器捕获异常,我应该使用InteriorPointSolver

Then I tried to model the problem with Simplex method but Debugger catch exception that I should use InteriorPointSolver

我正在使用3.0.1.10599版本求解器并在4.0.30319运行时环境C#环境中运行它。

I am using 3.0.1.10599 version solver and running it on 4.0.30319 runtime enviornment C# environment.

关于如何建模问题的任何输入

Any inputs as to how to model the problem

谢谢

推荐答案

InteriorPointSolver支持具有实值变量的二次或线性编程模型。 SimplexSolver支持具有实数或整数值变量的线性编程模型。所以两者都不适合你。

The InteriorPointSolver supports quadratic or linear programming models with real-valued variables. The SimplexSolver supports linear programming models with real- or integer-valued variables. So neither will work for you.

Nate


这篇关于无法使用Microsoft Solver Foundation解决二次目标函数和整数变量约束问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 22:45