线性规划2

来源:互联网 发布:基础地理信息数据下载 编辑:程序博客网 时间:2024/06/06 09:18

Assignment Question :

Background Question Descripitopn:

Now assigned i people do the j works ,and every people must and only do the one work , the spended unit time is cij , record the least time is min

min=i=1nj=1ncijxijNotes:if assignedxij equals 1if no assigned xij equals 0

If assigned the 1st people do the 1st work ,the unit time: c11 ,x11 equals 1

If assigned the 2st people do the 1st work,the unit time:c21,and at the same time ,because the 1st work has been done ,so the xi1(i2) equals 0

Similarly:

If assigned the 1st people do the 2st work ,the unit time:c12 ,and at the same time ,because the 1st peolple has been assigned work,so the x1j(j2) equals 0

so the constraint condition(约束条件) is :

j=1n=1i=1n=1

*So The Math Module is

min=i=1nj=1ncijxijst.:ni=1cij=1nj=1xij=1xij=0 or 1

Economic Examples:

资产:property 资金:funding 收益:profit 风险:risk  损失率:loss rate  分散:dispersion  交易:trade  给定:given  购买:purchasing 存款:deposit  

Question Description:

Now there are n kinds of property in the market can be choosen ,will use the total funding is M invest in a period . And the n kinds of proterty purchase

si will get average profit is ri ,the risk loss rate is qi ,the investment is more dispersion and the totall risk is less ,the total risk is can be measured with the biggest risk in the si .

When purchase si ,will pay trade fee ,(fee trade is pi) ,when purchase fee is no more than given ui ,trade fee is ui .Additionally , the deposit rate is r0 in the bank ,have no trade fee and risk.

If n is 4,the below table show the related datas ( table 1)

table 1

si ri(%) qi pi ui s1 28 2.5 1 103 s2 21 1.5 2 198 s3 23 5.5 4.5 52 s4 25 2.6 6.5 40

Try design a scheme , use the given funding M ,choseily purchase kinds of sior save in the bank, sunch that pure profit is max.

Symbol Rules:

si: the i_st invest event .like stock(股票) ,bond (债券)

ri,pi,qi:the average income of si ;trade fee rate ;risk rate

ui:si trade fee

r0:bank rate

xi: investment funding of project si

a: investment risk level

Q: total income

Basically Assumption:

  1. Assume M equals 1 so that calculate conventionally;
  2. The investment is more dispersive , the total is less
  3. The total risk is measured with the biggest in the si
  4. n kinds of si is independent
  5. r0 is fixed
  6. pure income and total risk is only influenced by ri pi qi

Math Module Set Up:

1.Total Risk:

total risk=max{qixi|i=1,2,3...n}

2.Purchase si tarde fee:
tarde fee:={pixi,xi>uipiui,xiui

​ So if purchase si,the pure income will be:(ripi)xi

3.The aim of module is the pure income will be max,and the toatal risk will be min:

Aimfunction:{maxni=0ripiximin{max{qixi}}ST.:{ni=0(1+pi)xi=Mxi0,  i=0,1,2,...n

4.

(1).Module 1: Fix risk level a,such that income will be max:

maxi=0n(ripi)xist.{qixiani=0(1+pi)xi=M,  xi0,  i=0,1,2...n

(2).Module 2: If investor hope the total income will be at least k ,such that total risk will be min:
st.{ni=0ripixikni=0(1+pi)xi=M,  xi0,1,2...n

(3).Module 3 Investor hope find a satisfied result considering of income and risk loss at the same time , so we assign the risk and income weighting s and 1s ,(0<s1) ,s is called investment coefficient
min s{max{qixi}}(1s)i=0n(ripi)xist.i=0n(1+pi)xi=M,  xi0,  i=0,1,2,...n

%%The Modeule 1 of Matlab Mdule Solution:clc,cleara=0;hold onwhile a<0.05c=[-0.05,-0.27,-0.19,-0.185,-0.185];A=[zeros(4,1),diag([0.025,0.015,0.055,0.026])];b=a*ones(4,1);Aeq=[1,1.01,1.02,1.045,1.065];beq=1;LB=zeros(5,1);[x,Q]=linprog(c,A,b,Aeq,beq,LB);Q=-Q;plot(a,Q,'*r');a=a+0.001;endxlabel('a'),ylabel('Q')
原创粉丝点击