如何生成含有14x10矩阵只有1和0的所有可能的组合 [英] how to generate all possible combinations of a 14x10 matrix containing only 1's and 0's

查看:129
本文介绍了如何生成含有14x10矩阵只有1和0的所有可能的组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个问题,一个解决方案将需要每一个14x10矩阵,它可以进行长达1和0的输入...我怎样才能生成这些,这样我可以输入每一个可能的14x10矩阵成另一个函数?谢谢!

I'm working on a problem and one solution would require an input of every 14x10 matrix that is possible to be made up of 1's and 0's... how can I generate these so that I can input every possible 14x10 matrix into another function? Thank you!

新增3月21日:它看起来像我没有适当的话我的职务。抱歉。我试图做的是优化的10个不同生产单元的输出(因为不同的速度和停机时间量)几个场景。我的目标是把停机时间块最小化生产的某一天到一天的基础上的差异。停机时间和频率的每个单元的被允许的量给出。我目前正在评估三个星期的周期,每三周每个生产单元取下来的时间一定量的意义。我是问计算机确定单元将向下基于线条下来只有一次,每3周,并在日常生产的差最小的可能的约束可采取的顺序。我的第一个方法是使用Excel(我尝试了上述描述),并没有工作(没有惊喜那里)...其中1 - 运行,0-关闭,这些相加时,计算产量。计算出的生产从一组最高日产量减去。然后,这些差异进行了比较,从周一到周二,周二,周三,等去了三个星期的时间框架,并利用求解最小化。我的下一个方法是写一个Matlab code,其中输入是一个宽容(组允许的变化一天到一天)。有没有已经这样做了,或一种方法来做到这一点最简单的程序?它看起来很简单,但我仍然通过不同的方式去了解这种思维。任何有识之士将是非常美联社preciated。

Added March 21: It looks like I didn't word my post appropriately. Sorry. What I'm trying to do is optimize the output of 10 different production units (given different speeds and amounts of downtime) for several scenarios. My goal is to place blocks of downtime to minimized the differences in production on a day-to-day basis. The amount of downtime and frequency each unit is allowed is given. I am currently trying to evaluate a three week cycle, meaning every three weeks each production unit is taken down for a given amount of hours. I was asking the computer to determine the order the units would be taken down based on the constraint that the lines come down only once every 3 weeks and the difference in daily production is the smallest possible. My first approach was to use Excel (as I tried to describe above) and it didn't work (no suprise there)... where 1- running, 0- off and when these are summed to calculate production. The calculated production is subtracted from a set max daily production. Then, these differences were compared going from Mon-Tues, Tues-Wed, etc for a three week time frame and minimized using solver. My next approach was to write a Matlab code where the input was a tolerance (set allowed variation day-to-day). Is there a program that already does this or an approach to do this easiest? It seems simple enough, but I'm still thinking through the different ways to go about this. Any insight would be much appreciated.

推荐答案

生成1的每一个可能的矩阵和0的 14 * 10 将产生 2 ** 140 矩阵。我不相信你会对这还不够寿命。我不知道,如果太阳仍然照耀完成之前。这就是为什么它不可能产生所有这些矩阵。你必须寻找其他的解决方案,这看起来像一个暴力。

Generating Every possible matrix of 1's and 0's for 14*10 would generate 2**140 matrixes. I don't believe you would have enough lifetime for this. I don't know, if the sun would still shine before you finish that. This is why it is impossible to generate all those matrices. You must look for some other solution, this looks like a brute force.

这篇关于如何生成含有14x10矩阵只有1和0的所有可能的组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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