标签: python python-3.x python-2.7 numpy
我有一个表,其中的示例值如下: The total sum of all the values in Column T1 should always be 300. The values of Column A are constant and never change. The Values of Column B always lies between 1 and 2. The values in column T2 is product of T1, A and B.
Now I want to substitute new values in T1 and B such that the total sum of values in T1 remains 300, Column B dose'nt change from before and new values are substituted in column B such that Total sum of Column T2 is maximum. Below is a random example:
我是否可以编写一个自动的python脚本,以保持T1的总计为300,B中的值发生变化,但始终在1到2之间,以使T2列的总和最大的假设?