本文介绍了CPLEX的双重模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本问题。我在C ++中使用Cplex,并尝试通过它来实现优化程序。但是,我有一个基本问题。

I have an essential problem. I use Cplex in C++ and I try to implement my optimization programs by it; however, I have an essential problem.

我想找到我的程序的对偶。如何在Cplex for C ++中找到可以做到这一点的构造?

I want to find dual of my program. How can I find some constructs in Cplex for C++ that do it?

推荐答案

我不确定这是否是您要的,但是(引用文档):

I'm not entirely sure if this is what you're asking for, but the presolve dual setting (quoting the documentation):

可以使用C ++ API进行设置,如下所示:

With the C++ API, this can be set, like so:

cplex.setParam(IloCplex::Param::Preprocessing::Dual, 1);

与:

另一方面,如果您想在求解模型后查询对偶值,则可以使用方法。

If, on the other hand, you want to query dual values after solving a model, you can use the getDuals method.

这篇关于CPLEX的双重模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 22:33