Strukturalanmagan masalalarni yechish prinsiplari


Download 58.57 Kb.
Sana13.01.2020
Hajmi58.57 Kb.

Mavzu;Strukturalanmagan masalalarni yechish prinsiplari

Misol:Shahar rahbariyati jamoat transportlaridan zarar ko’ra boshladi. Ushbu muammoni yechish variantlarini baholash uchun 4 ta eksportan iborat komissiya tuzildi.



Quydagi variantlar keltirilgan.

  1. Transport solig’ini oshirish.

  2. Qatnovlar sonini yo’nalish bo’yicha kamaytirish.

  3. Yo’l haqii oshirish.

  4. Jamoat transportlarini(metro, avtobus , ford) hajmini kengaytirish.

m=4va n=4 holati uchun afzallik metodi yordamida maqsadlar og’irligini topamiz.

  1. Boshlang’ich afzalliklar matritsasi:

Ej/Zj

Z1

Z2

Z3

Z4

E1




8/12

3/12

1

E2

4/12




7/12

6/12

E3

9/12

5/12




3/12

E4

11/12

6/12

9/12






Ej/Zj

Z1

Z2

Z3

Z4

E1




7/12

1

3/12

E2

5/12




5/12

7/12

E3

0

7/12




2/12

E4

9/12

5/12

10/12






Ej/Zj

Z1

Z2

Z3

Z4

E1




9/12

1

2/12

E2

3/12




6/12

8/12

E3

0

6/12




1/12

E4

10/12

4/12

11/12






Ej/Zj

Z1

Z2

Z3

Z4

E1




/12

1

3/12

E2

5/12




5/12

7/12

E3

0

7/12




2/12

E4

9/12

5/12

10/12




#include

#include

using namespace std;

int main(){

float Z1[4][4]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};

float Z2[4][4]={0,1/30,1/10,0,0,1/30,1/10,0,0,1/30,1/10,0,0,1/30,1/10,0};

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

cin>>Z1[i][j];

}

}



cout<<"Z1"<

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

cout<

}

cout<

}

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

cin>>Z2[i][j];

}

}

cout<<"Z2"<

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

cout<

}

cout<

}

float f[2][4] = {0,0,0,0,0,0,0,0};

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

f[0][i]+=Z1[i][j];

f[1][i]+= Z2[i][j];

}

}

float Q[2][4];



for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

Q[0][j]=f[0][j]/30;

Q[1][j]= f[1][j]/30;

}

}

float W[4]={0,0,0,0};



for(int j=0;j<4;j++){

W[j] = Q[0][j]+Q[0][j];

cout<<"W["<

}


return 0 ;

}


Do'stlaringiz bilan baham:


Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2019
ma'muriyatiga murojaat qiling