Plot 为Mathematica中的分枝定界问题绘制一组不等式

Plot 为Mathematica中的分枝定界问题绘制一组不等式,plot,wolfram-mathematica,branch-and-bound,Plot,Wolfram Mathematica,Branch And Bound,我正在研究整数2变量线性问题中分枝定界算法的行为。 我偶尔使用Wolfram Alpha绘制图形,但现在我需要一个更健壮的选项Mathematica。 我需要在R2空间(x和y大于0)上绘制一组不等式的可行区域,不等式如下: 2*x+4*y您要查找的函数是RegionPlot: RegionPlot[ 2 x + 4 y <= 12 && 6 x + 2 y <= 27 && x <= 4 && x >= 0 &&

我正在研究整数2变量线性问题中分枝定界算法的行为。 我偶尔使用Wolfram Alpha绘制图形,但现在我需要一个更健壮的选项Mathematica。 我需要在R2空间(x和y大于0)上绘制一组不等式的可行区域,不等式如下:


2*x+4*y您要查找的函数是
RegionPlot

RegionPlot[
 2 x + 4 y <= 12 && 6 x + 2 y <= 27 && x <= 4 && x >= 0 && y >= 0, {x,
   0, 5}, {y, 0, 5}]
要绘制不等式,只需执行以下操作:

IntegerRegionPlot[
 2 x + 4 y <= 12 && 6 x + 2 y <= 27 && x <= 4 && x >= 0 && y >= 0, {0,
   5}, {0, 5}]
IntegerRegionPlot[

2 x+4 y噢。谢谢!还有,我应该怎么做才能强制所有整数点和一个特定点?!@alfablac:附加代码只在整数点显示真值和假值。我与你说的稍有不同,从这里开始使用另一个问题,但你对regionplot命令的回答是必不可少的。谢谢!欢迎这样做。这个问题不在一个问题中适合该网站的格式。太笼统了。你能展示一下你尝试过的内容吗?你遇到了什么错误?
IntegerRegionPlot[
 2 x + 4 y <= 12 && 6 x + 2 y <= 27 && x <= 4 && x >= 0 && y >= 0, {0,
   5}, {0, 5}]