文件名称:caipianwenti
介绍说明--下载内容均来自于网络,请自行研究使用
根据参考答案中的模型,本程序分别对K1、K2、K3、K4型彩票进行求解,并对n、m的各种组合进行循环。求解时,首先计算当前n、m的各奖项获奖概率,然后随机生成多个初始值,调用fmincon函数寻找目标函数的最小值(原目标函数要求极大,但fmincon是寻找极小,故令原目标函数乘以(-1),寻找新目标函数的极小值),最后比较各种类型彩票的求解结果,输出对应最大的原目标函数的解。-The answer in the reference model, this procedure separately K1, K2, K3, K4-type lottery is solved, and n, m various combinations of loop. Solution, the first calculation of the current n, m the probability of winning each prize, and then randomly generate multiple initial values, called fmincon function to find the minimum objective function (objective function requires the original great, but fmincon is to find a very small, so that original objective function is multiplied by (-1), to find a new minimum objective function value), and finally compare the results for solving various types of lottery, the output corresponding to the maximum of the original objective function of the solution.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cpiao.m
main.m
nonlcon.m
calculate_probability.m
main.m
nonlcon.m
calculate_probability.m