如何使用R绘制多元优化的约束以找到可行区域

时间:2018-10-23 06:45:31

标签: r optimization

我是使用R进行优化的新手。我使用lpSolveAPI进行优化。我在Windows 10中使用R-3.5.1。我的目标函数和使用伪数据的约束看起来像正在关注

/* Objective function */
max: +13.82 C1 +17.25 C2 +7.01 C3 +5.11 C4 +18.12 C5 +11.33 C6
 +12.14 C7 +9.14 C8 +8.11 C9 +21.12 C10 +18.21 C11 +12.05 C12;

/* Constraints */
-C1 +0.651 C13 +0.349 C25 = 0;
-C2 +0.752 C14 +0.248 C26 = 0;
-C3 +0.787 C15 +0.213 C27 = 0;
-C4 +0.795 C16 +0.205 C28 = 0;
-C5 +0.757 C17 +0.243 C29 = 0;
-C6 +0.773 C18 +0.227 C30 = 0;
-C7 +0.894 C19 +0.106 C31 = 0;
-C8 +0.912 C20 +0.088 C32 = 0;
-C9 +0.875 C21 +0.125 C33 = 0;
-C10 +0.77 C22 +0.33 C34 = 0;
-C11 +0.891 C23 +0.109 C35 = 0;
-C12 +0.843 C24 +0.157 C36 = 0;
-C13 +C25 >= 0.0789;
-C14 +C26 >= 0.0125;
-C15 +C27 >= 0.0236;
-C16 +C28 >= 0.0128;
-C17 +C29 >= -0.0554;
-C18 +C30 >= 0.0196;
-C19 +C31 >= 0.0237;
-C20 +C32 >= 0.0247;
-C21 +C33 >= 0.0571;
-C22 +C34 >= -0.0702;
-C23 +C35 >= 0.0564;
-C24 +C36 >= 0.0465;
+C13 >= 1.75;
+C14 >= 3.64;
+C15 >= 2.32145;
+C16 >= 0.75348;
+C17 >= 0.873;
+C18 >= 2.71987;
+C19 >= 0.843681;
+C20 >= 3.88234150;
+C21 >= 0.4857231;
+C22 >= 4.19756;
+C23 >= 2.2890176;
+C24 >= 3.123456;
+C25 >= 5.3212456;
+C26 >= 2.9186043;
+C27 >= 4.3461789;
+C28 >= 0.125843;
+C29 >= 3.0985879;
+C30 >= 4.12987646;
+C31 >= 3.126578489;
+C32 >= 4.35678906543;
+C33 >= 2.8167097565;
+C34 >= 4.41234568;
+C35 >= 4.41890675;
+C36 >= 6.58490123657;
+C13 <= 9.0198765;
+C14 <= 8.67858792;
+C15 <= 1.9807695043;
+C16 <= 9.09897865;
+C17 <= 2.41056798;
+C18 <= 2.3587657;
+C19 <= 0.991122886;
+C20 <= 4.0980768;
+C21 <= 4.5698756;
+C22 <= 1.98456756;
+C23 <= 1.51746645;
+C24 <= 3.654789676;
+C25 <= 2.12455434;
+C26 <= 2.11987654;
+C27 <= 1.567654321;
+C28 <= 1.256787908;
+C29 <= 2.415365432;
+C30 <= 2.9189764532;
+C31 <= 2.12398656434;
+C32 <= 4.7654733321;
+C33 <= 2.1198765432;
+C34 <= 2.8909876532;
+C35 <= 1.9187987634;
+C36 <= 1.87645679012;

我想在R中绘制约束的可行区域。您能帮我吗? 抱歉,我无法与您共享数据,因为它是客户数据。

0 个答案:

没有答案