# problem with genetic algorithm contain on linear inequality constraints

1 view (last 30 days)
tahseen alshmary on 9 Mar 2019
Commented: tahseen alshmary on 11 Mar 2019
dear sir
can any one help me with this problem in genetic algorithm
the alarm is
output =
struct with fields:
problemtype: 'linearconstraints'
rngstate: [1×1 struct]
generations: 0
funccount: 0
message: 'Could not find a feasible initial point.'
maxconstraint: []
population =
[]
scores =
[]
Elapsed time is 0.068054 seconds.
Index exceeds matrix dimensions.
the code is
%To minimize our fitness function using the ga function, we need to pass in a function handle to the fitness function as well as specifying the number of variables as the second argument. Lower and upper bounds are provided as LB and UB respectively. In addition, we also need to pass in a function handle to the nonlinear constraint function.
tic
clear
clc
ObjectiveFunction = @simple_fitness;
nvars = 100; % Number of variables
LB = 0.05*ones(1,100); % Lower bound for (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 ...........x100)
UB = 1.1*ones (1,100); % Upper bound for (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 ..........x100)
A=zeros(406,100); b=zeros(406,1);
A(1,1)=+7.0976; A(1,4)=-14.0392; b(1)=-0.2; %first row
A(2,2)=+3.5366; A(2,6)=-5.8898; b(2)=-0.2; %second row
A(3,2)=-5.9183; A(3,3)=+4.7836; b(3)=-0.2; %third row
A(4,4)=+6.5678; b(4)=-0.2; %fourth row
A(5,1)=-11.4142; A(5,5)=+4.0069; b(5)=-0.2; %fifth row
A(6,6)=+4.1739; A(6,12)=-5.8996; b(6)=-0.2; %sixth row
A(7,5)=-5.6869; A(7,7)=+3.3839; b(7)=-0.2; %seventh row
A(8,7)=+3.3839; A(8,12)=-5.8996; b(8)=-0.2; %eighth row
A(9,8)=+4.2305; A(9,9)=-6.1631; b(9)=-0.2; %nighth row
A(10,5)=-5.6869; A(10,9)=+3.3839; b(10)=-0.2; %tenth row
A(11,9)=++3.3839; A(11,12)=-5.8996; b(11)=-0.2; %eleventh row
A(12,7)=-6.1631; A(12,10)=+4.2305; b(12)=-0.2; %tweleventh row
A(13,5)=-5.6869; A(13,11)=+4.1049; b(13)=-0.2; %thirteenth row
A(14,12)=+3.0558; A(14,14)=-7.1774; b(14)=-0.2; %fourteenth row
A(15,11)=-7.3650; A(15,13)=+3.0153; b(15)=-0.2; %fiveteenth row
A(16,14)=+2.3903; A(16,39)=-3.4890; b(16)=-0.2; %sixteenth row
A(17,14)=+2.3903; A(17,41)=-3.4890; b(17)=-0.2; %seventennth row
A(18,14)=+2.3903; A(18,57)=-10.3674;b(18)=-0.2; %eighteenth row
A(19,15)=+2.5469; A(19,17)=-3.2833; b(19)=-0.2; %nighnteenth row
A(20,15)=+2.5469; A(20,19)=-64.8305;b(20)=-0.2; %twinty row
A(21,16)=+2.4238; A(21,22)=-3.3946; b(21)=-0.2; %twinty one row
A(22,16)=+2.4238; A(22,55)=-5.0166; b(22)=-0.2; %twenty two row
A(23,17)=+2.5191; A(23,45)=-2.6620; b(23)=-0.2; %twenty three row
A(24,16)=-3.3318; A(24,18)=+2.6079; b(24)=-0.2; %twenty four row
A(25,18)=+2.6079; A(25,19)=-64.8305;b(25)=-0.2; %twenty five row
A(26,19)=+9.4415; A(26,68)=0; b(26)=-0.2; %twenty six row
A(27,16)=-3.3318; A(27,20)=+2.2440; b(27)=-0.2; %twenty seven row
A(28,17)=-3.2833; A(28,20)=+2.2440; b(28)=-0.2; %twenty eight row
A(29,15)=-3.4529; A(29,21)=+2.4373; b(29)=-0.2; %twenty nine row
A(30,21)=+2.4373; A(30,55)=-5.0166; b(30)=-0.2; %thirty row
A(31,22)=+1.9621; A(31,23)=-3.1372; b(31)=-0.2; %thirty one row
A(32,22)=+1.9621; A(32,25)=-3.1372; b(32)=-0.2; %thirty two row
A(33,22)=+1.9621; A(33,27)=-3.7362; b(33)=-0.2; %thirty three row
A(34,22)=+1.9621; A(34,30)=-6.7158; b(34)=-0.2; %thirty four row
A(35,23)=+1.9703; A(35,26)=-3.4825; b(35)=-0.2; %thirty five row
A(36,23)=+1.9703; A(36,48)=-3.6876; b(36)=-0.2; %thirty six row
A(37,23)=+1.9703; A(37,50)=-3.6876; b(37)=-0.2; %thirty seven row
A(38,24)=+2.0532; A(38,25)=-3.1372; b(38)=-0.2; %thirty eight row
A(39,24)=+2.0532; A(39,27)=-3.7362; b(39)=-0.2; %thirty nine row
A(40,24)=+2.0532; A(40,30)=-6.7158; b(40)=-0.2; %forty row
A(41,24)=-3.4825; A(41,25)=+1.9703; b(41)=-0.2; %forty one row
A(42,25)=+1.9703; A(42,48)=-3.6876; b(42)=-0.2; %forty two row
A(43,25)=+1.9703; A(43,50)=-3.6876; b(43)=-0.2; %forty three row
A(44,23)=-3.1372; A(44,26)=+2.0532; b(44)=-0.2; %forty four row
A(45,26)=+2.0532; A(45,27)=-3.7362; b(45)=-0.2; %forty five row
A(46,26)=+2.0532; A(46,30)=-6.7158; b(46)=-0.2; %forty six row
A(47,27)=+2.2324; A(47,70)=-4.2100; b(47)=-0.2; %forty seven row
A(48,27)=+2.2324; A(48,72)=-4.6162; b(48)=-0.2; %forty eight row
A(49,27)=+2.2324; A(49,74)=-4.6162; b(49)=-0.2; %forty nine row
A(50,21)=-4.0018; A(50,28)=+1.9757; b(50)=-0.2; %fifty row
A(51,23)=-3.1372; A(51,28)=+1.9757; b(51)=-0.2; %fifty one row
A(52,25)=-3.1372; A(52,28)=+1.9757; b(52)=-0.2; %fifty two row
A(53,28)=+1.9757; A(53,30)=-6.7158; b(53)=-0.2; %fifty three row
A(54,21)=-4.0018; A(54,29)=+1.9306; b(54)=-0.2; %fifty four row
A(55,23)=-3.1372; A(55,29)=+1.9306; b(55)=-0.2; %fifty five row
A(56,25)=-3.1372; A(56,29)=+1.9306; b(56)=-0.2; %fifty six row
A(57,27)=-3.7362; A(57,29)=+1.9306; b(57)=-0.2; %fifty seven row
A(58,30)=+2.3931; A(58,77)=-5.5574; b(58)=-0.2; %fifty eight row
A(59,30)=+2.3931; A(59,79)=-5.6824; b(59)=-0.2; %fifty nine row
A(60,30)=+2.3931; A(60,81)=-18.2525;b(60)=-0.2; %sixty row
A(61,30)=+2.3931; A(61,83)=-7.2767; b(61)=-0.2; %sixty one row
A(62,31)=+2.1379; A(62,34)=-3.2909; b(62)=-0.2; %sixty two row
A(63,31)=+2.1379; A(63,43)=-3.9942; b(63)=-0.2; %sixty three row
A(64,31)=+2.1379; A(64,46)=-3.5612; b(64)=-0.2; %sixty four row
A(65,32)=+2.0626; A(65,33)=-3.6476; b(65)=-0.2; %sixty five row
A(66,32)=+2.0626; A(66,36)=-3.5199; b(66)=-0.2; %sixty six row
A(67,32)=+2.0626; A(67,38)=-3.5199; b(67)=-0.2; %sixty seven row
A(68,32)=+2.0626; A(68,40)=-8.7575; b(68)=-0.2; %sixty eight row
A(69,32)=+2.0626; A(69,42)=-8.7575; b(69)=-0.2; %sixty nine row
A(70,32)=-3.2909; A(70,33)=+2.1379; b(70)=-0.2; %seventy row
A(71,33)=+2.1379; A(71,43)=-3.9942; b(71)=-0.2; %seventy one row
A(72,33)=+2.1379; A(72,46)=-3.5612; b(72)=-0.2; %seventy two row
A(73,31)=-3.6476; A(73,34)=+2.0626; b(73)=-0.2; %seventy three row
A(74,34)=+2.0626; A(74,36)=-3.5199; b(74)=-0.2; %seventy four row
A(75,34)=+2.0626; A(75,38)=-3.5199; b(75)=-0.2; %seventy five row
A(76,34)=+2.0626; A(76,40)=-8.7575; b(76)=-0.2; %seventy six row
A(77,34)=+2.0626; A(77,42)=-8.7575; b(77)=-0.2; %seventy seven row
A(78,31)=-3.6476; A(78,35)=+2.0508; b(78)=-0.2; %seventy eight row
A(79,33)=-3.6476; A(79,35)=+2.0508; b(79)=-0.2; %seventy nine row
A(80,35)=+2.0508; A(80,40)=-8.7575; b(80)=-0.2; %eighty row
A(81,35)=+2.0508; A(81,42)=-8.7575; b(81)=-0.2; %eighty one row
A(82,36)=+1.9682; A(82,37)=-3.7831; b(82)=-0.2; %eighty two row
A(83,36)=+1.9682; A(83,47)=-3.5405; b(83)=-0.2; %eighty three row
A(84,36)=+1.9682; A(84,49)=-3.5405; b(84)=-0.2; %eighty four row
A(85,36)=+1.9682; A(85,51)=-5.3385; b(85)=-0.2; %eighty five row
A(86,36)=+1.9682; A(86,53)=-5.7513; b(86)=-0.2; %eighty six row
A(87,31)=-3.6476; A(87,37)=+2.0508; b(87)=-0.2; %eighty seven row
A(88,33)=-3.6476; A(88,37)=+2.0508; b(88)=-0.2; %eighty eight row
A(89,36)=-3.5199; A(89,37)=+2.0508; b(89)=-0.2; %eighty nine row
A(90,37)=+2.0508; A(90,40)=-8.7575; b(90)=-0.2; %ninety row
A(91,37)=+2.0508; A(91,42)=-8.7575; b(91)=-0.2; %ninety one row
A(92,35)=-3.7831; A(92,38)=+1.9682; b(92)=-0.2; %ninety two row
A(93,38)=+1.9682; A(93,47)=-3.5405; b(93)=-0.2; %ninety three row
A(94,38)=+1.9682; A(94,49)=-3.5405; b(94)=-0.2; %ninety four row
A(95,38)=+1.9682; A(95,51)=-5.3385; b(95)=-0.2; %ninety five row
A(96,38)=+1.9682; A(96,53)=-5.7513; b(96)=-0.2; %ninety six row
A(97,31)=-3.6476; A(97,39)=+1.9509; b(97)=-0.2; %ninety seven row
A(98,33)=-3.6476; A(98,39)=+1.9509; b(98)=-0.2; %ninety eight row
A(99,36)=-3.5199; A(99,39)=+1.9509; b(99)=-0.2; %ninety nine row
A(100,38)=-3.5199;A(100,39)=+1.9509;b(100)=-0.2; %one hunderd row
A(101,39)=+1.9509;A(101,42)=-8.7575;b(101)=-0.2; %one hundered one row
A(102,13)=-8.1317;A(102,40)=+2.7096;b(102)=-0.2; %one hundered two row
A(103,40)=+2.7096;A(103,41)=-3.4890;b(103)=-0.2; %one hundered three row
A(104,40)=+2.7096;A(104,57)=-10.3674;b(104)=-0.2; %one hundered four row
A(105,31)=-3.6476;A(105,41)=+1.9509;b(105)=-0.2; %one hundered five row
A(106,33)=-3.6476;A(106,41)=+1.9509;b(106)=-0.2; %one hundered six row
A(107,36)=-3.5199;A(107,41)=+1.9509;b(107)=-0.2; %one hundered seven row
A(108,38)=-3.5199;A(108,41)=+1.9509;b(108)=-0.2; %one hundered eight row
A(109,40)=-8.7575;A(109,41)=+1.9509;b(109)=-0.2; %one hundered nine row
A(110,13)=-8.1317;A(110,42)=+2.7096;b(110)=-0.2; %one hundered ten row
A(111,39)=-3.4890;A(111,42)=+2.7096;b(111)=-0.2; %one hundered eleven row
A(112,42)=+2.7096;A(112,57)=-10.3674;b(112)=-0.2; %one hundered twelve row
A(113,43)=+3.8182;b(113)=-0.2; %one hundered thrteen row
A(114,32)=-3.2909;A(114,44)=+2.0502;b(114)=-0.2; %one hundered fourteen row
A(115,34)=-3.2909;A(115,44)=+2.0502;b(115)=-0.2; %one hundered fifteen row
A(116,44)=+2.0502;A(116,46)=-3.5612;b(116)=-0.2; %one hundered sixteen row
A(117,32)=-3.2909;A(117,45)=+2.1055;b(117)=-0.2; %one hundered seventeen row
A(118,34)=-3.2909;A(118,45)=+2.1055;b(118)=-0.2; %one hundered eigteen row
A(119,43)=-3.9942;A(119,45)=+2.1055;b(119)=-0.2; %one hundered ninteen row
A(120,18)=-3.3708;A(120,46)=+3.0223;b(120)=-0.2; %one hundered twenty row
A(121,24)=-3.4825;A(121,47)=+1.9565;b(121)=-0.2; %one hundered twenty 0ne row
A(122,26)=-3.4825;A(122,47)=+1.9565;b(122)=-0.2; %one hundered twenty two row
A(123,47)=+1.9565;A(123,50)=-3.6876;b(123)=-0.2; %one hundered twenty three row
A(124,35)=-3.7831;A(124,48)=+2.0049;b(124)=-0.2; %one hundered twenty four row
A(125,37)=-3.7831;A(125,48)=+2.0049;b(125)=-0.2; %one hundered twenty five row
A(126,48)=+2.0049;A(126,49)=-3.5405;b(126)=-0.2; %one hundered twenty six row
A(127,48)=+2.0049;A(127,51)=-5.3385;b(127)=-0.2; %one hundered twenty seven row
A(128,48)=+2.0049;A(128,53)=-5.7513;b(128)=-0.2; %one hundered twenty eight row
A(129,24)=-3.4825;A(129,49)=+1.9565;b(129)=-0.2; %one hundered twenty nine row
A(130,26)=-3.4825;A(130,49)=+1.9565;b(130)=-0.2; %one hundered thrity row
A(131,48)=-3.6876;A(131,49)=+1.9565;b(131)=-0.2; %one hundered thirty one row
A(132,35)=-3.7831;A(132,50)=+2.0049;b(132)=-0.2; %one hundered thirty two row
A(133,37)=-3.7831;A(133,50)=+2.0049;b(133)=-0.2; %one hundered thirty three row
A(134,47)=-3.5405;A(134,50)=+2.0049;b(134)=-0.2; %one hundered thirty four row
A(135,50)=+2.0049;A(135,51)=-5.3385;b(135)=-0.2; %one hundered thirty five row
A(136,50)=+2.0049;A(136,53)=-5.7513;b(136)=-0.2; %one hundered thirty six row
A(137,51)=+2.1366;A(137,54)=-5.2081;b(137)=-0.2; %one hundered thirty seven row
A(138,51)=+2.1366;A(138,60)=-7.6202;b(138)=-0.2; %one hundered thirty eight row
A(139,51)=+2.1366;A(139,62)=-6.9872;b(139)=-0.2; %one hundered thirty nine row
A(140,35)=-3.7831;A(140,52)=+1.9232;b(140)=-0.2; %one hundered forty row
A(141,37)=-3.7831;A(141,52)=+1.9232;b(141)=-0.2; %one hundered forty one row
A(142,47)=-3.5405;A(142,52)=+1.9232;b(142)=-0.2; %one hundered forty two row
A(143,49)=-3.5405;A(143,52)=+1.9232;b(143)=-0.2; %one hundered forty three row
A(144,52)=+1.9232;A(144,53)=-5.7513;b(144)=-0.2; %one hundered forty four row
A(145,52)=-4.8671;A(145,53)=+2.1262;b(145)=-0.2; %one hundered forty five row
A(146,53)=+2.1262;A(146,60)=-7.6202;b(146)=-0.2; %one hundered forty six row
A(147,53)=+2.1262;A(147,62)=-6.9872;b(147)=-0.2; %one hundered forty seven row
A(148,35)=-3.7831;A(148,54)=+1.9179;b(148)=-0.2; %one hundered forty eight row
A(149,37)=-3.7831;A(149,54)=+1.9179;b(149)=-0.2; %one hundered forty nine row
A(150,47)=-3.5405;A(150,54)=+1.9179;b(150)=-0.2; %one hundered fifity row
A(151,49)=-3.5405;A(151,54)=+1.9179;b(151)=-0.2; %one hundered fifty one row
A(152,51)=-5.3385;A(152,54)=+1.9179;b(152)=-0.2; %one hundered fifty two row
A(153,55)=+2.2441;A(153,69)=-2.3087;b(153)=-0.2; %one hundered fifty three row
A(154,15)=-3.4529;A(154,56)=+2.2710;b(154)=-0.2; %one hundered fifty four row
A(155,22)=-3.3946;A(155,56)=+2.2710;b(155)=-0.2; %one hundered fifty five row
A(156,57)=+5.9721;b(156)=-0.2; %one hundered fifty six row
A(157,13)=-8.1317;A(157,58)=+2.3979;b(157)=-0.2; %one hundered fifty seven row
A(158,39)=-3.4890;A(158,58)=+2.3979;b(158)=-0.2; %one hundered fifty eight row
A(159,41)=-3.4890;A(159,58)=+2.3979;b(159)=-0.2; %one hundered fifty nine row
A(160,52)=-4.8671;A(160,59)=+2.0913;b(160)=-0.2; %one hundered sixity row
A(161,54)=-5.2081;A(161,59)=+2.0913;b(161)=-0.2; %one hundered sixity one row
A(162,62)=-6.9872;A(162,59)=+2.0913;b(162)=-0.2; %one hundered sixity two row
A(163,60)=+2.6913;A(163,61)=-4.4203;b(163)=-0.2; %one hundered sixity three row
A(164,60)=+2.6913;A(164,63)=-8.1201;b(164)=-0.2; %one hundered sixity four row
A(165,65)=-11.2605;A(165,60)=+2.6913;b(165)=-0.2; %one hundered sixity five row
A(166,52)=-4.8671;A(166,61)=+2.0968;b(166)=-0.2; %one hundered sixity six row
A(167,54)=-5.2081;A(167,61)=+2.0968;b(167)=-0.2; %one hundered sixity seven row
A(168,60)=-7.6202;A(168,61)=+2.0968;b(168)=-0.2; %one hundered sixity eight row
A(169,59)=-4.6680;A(169,62)=+2.7242;b(169)=-0.2; %one hundered sixity nine row
A(170,62)=+2.7242;A(170,63)=-8.1201;b(170)=-0.2; %one hundered seventy row
A(171,62)=+2.7242;A(171,65)=-11.2605;b(171)=-0.2; %one hundered seventy one row
A(172,63)=+2.4921;A(172,84)=-7.0670;b(172)=-0.2; %one hundered sventy two row
A(173,63)=+2.4921;A(173,86)=-6.3283;b(173)=-0.2; %one hundered seventy three row
A(174,59)=-4.6680;A(174,64)=+2.5701;b(174)=-0.2; %one hundered seventy four row
A(175,61)=-4.4203;A(175,64)=+2.5701;b(175)=-0.2; %one hundered seventy five row
A(176,64)=+2.5701;A(176,65)=-11.2605;b(176)=-0.2; %one hundered seventy six row
A(177,65)=+3.4983;A(177,88)=-5.6032;b(177)=-0.2; %one hundered seventy seven row
A(178,59)=-4.6680;A(178,66)=+2.5363;b(178)=-0.2; %one hundered seventy eight row
A(179,61)=-4.4203;A(179,66)=+2.5363;b(179)=-0.2; %one hundered seventy nine row
A(180,63)=-8.1201;A(180,66)=+2.5363;b(180)=-0.2; %one hundered eighty row
A(181,67)=+4.6938;A(181,20)=-9.1333;b(181)=-0.2; %one hundered eighty one row
A(182,28)=-3.4252;A(182,69)=+2.1568;b(182)=-0.2; %one hundered eighty two row
A(183,69)=+2.1568;A(183,72)=-4.6162;b(183)=-0.2; %one hundered eighty three row
A(184,69)=+2.1568;A(184,74)=-4.6162;b(184)=-0.2; %one hundered eighty four row
A(185,65)=-5.1702;A(185,70)=+4.0198;b(185)=-0.2; %one hundered eighty five row
A(186,28)=-3.4252;A(186,71)=+2.1366;b(186)=-0.2; %one hundered eighty six row
A(187,70)=-4.2100;A(187,71)=+2.1366;b(187)=-0.2; %one hundered eighty seven row
A(188,71)=+2.1366;A(188,74)=-4.6162;b(188)=-0.2; %one hundered eighty eight row
A(189,72)=+2.3284;A(189,73)=-3.8108;b(189)=-0.2; %one hundered eighty nine row
A(190,72)=+2.3284;A(190,75)=-4.2686;b(190)=-0.2; %one hundered ninty row
A(191,72)=+2.3284;A(191,78)=-5.9702;b(191)=-0.2; %one hundered ninty one row
A(192,28)=-3.4252;A(192,73)=+2.1366;b(192)=-0.2; %one hundered ninty two row
A(193,70)=-4.2100;A(193,73)=+2.1366;b(193)=-0.2; %one hundered ninty three row
A(194,72)=-4.6162;A(194,73)=+2.1366;b(194)=-0.2; %one hundered ninty four row
A(195,71)=-3.8108;A(195,74)=+2.3284;b(195)=-0.2; %one hundered ninty five row
A(196,74)=+2.3284;A(196,75)=-4.2686;b(196)=-0.2; %one hundered ninty six row
A(197,74)=+2.3284;A(197,78)=-5.9702;b(197)=-0.2; %one hundered ninty seven row
A(198,75)=+3.1522;A(198,80)=-5.1540;b(198)=-0.2; %one hundered ninty eight row
A(199,71)=-3.8108;A(199,76)=+2.2839;b(199)=-0.2; %one hundered ninty nine row
A(200,73)=-3.8108;A(200,76)=+2.2839;b(200)=-0.2; %two hundered row
A(201,76)=+2.2839;A(201,78)=-5.9702;b(201)=-0.2; %two hundered one row
A(202,71)=-3.8108;A(202,77)=+2.1980;b(202)=-0.2; %two hundered two row
A(203,73)=-3.8108;A(203,77)=+2.1980;b(203)=-0.2; %two hundered three row
A(204,75)=-4.2686;A(204,77)=+2.1980;b(204)=-0.2; %two hundered four row
A(205,29)=-5.8141;A(205,78)=+2.3528;b(205)=-0.2; %two hundered five row
A(206,78)=+2.3528;A(206,79)=-5.6824;b(206)=-0.2; %two hundered six row
A(207,78)=+2.3528;A(207,81)=-18.2525;b(207)=-0.2; %two hundered seven row
A(208,78)=+2.3528;A(208,83)=-7.2767;b(208)=-0.2; %two hundered eight row
A(209,76)=-3.2570;A(209,79)=+2.6189;b(209)=-0.2; %two hundered nine row
A(210,29)=-5.8141;A(210,80)=+2.3485;b(210)=-0.2; %two hundered ten row
A(211,77)=-5.5574;A(211,80)=+2.3485;b(211)=-0.2; %two hundered eleven row
A(212,80)=+2.3485;A(212,81)=-18.2525;b(212)=-0.2; %two hundered tweleve row
A(213,80)=+2.3485;A(213,83)=-7.2767;b(213)=-0.2; %two hundered thirteen row
A(214,81)=+15.3399;b(214)=-0.2; %two hundered fourteen row
A(215,29)=-5.8141; A(215,82)=+2.3086;b(215)=-0.2; %two hundered fifteen row
A(216,77)=-5.5574; A(216,82)=+2.3086;b(216)=-0.2; %two hundered sixteen row
A(217,79)=-5.6824; A(217,82)=+2.3086;b(217)=-0.2; %two hundered seventeen row
A(218,82)=+2.3086; A(218,83)=-7.2767;b(218)=-0.2; %two hundered eighteen row
A(219,83)=+2.5137; A(219,64)=-8.2504;b(219)=-0.2; %two hundered ninteen row
A(220,83)=+2.5137; A(220,86)=-6.3283;b(220)=-0.2; %two hundered twenty row
A(221,29)=-5.8141; A(221,84)=+2.3593;b(221)=-0.2; %two hundered twenty one row
A(222,77)=-5.5574; A(222,84)=+2.3593;b(222)=-0.2; %two hundered twenty two row
A(223,79)=-5.6824; A(223,84)=+2.3593;b(223)=-0.2; %two hundered twenty three row
A(224,81)=-18.2525;A(224,84)=+2.3593;b(224)=-0.2; %two hundered twenty four row
A(225,64)=-8.2504; A(225,85)=+2.5020;b(225)=-0.2; %two hundered twenty five row
A(226,84)=-7.0670; A(226,85)=+2.5020;b(226)=-0.2; %two hundered twenty six row
A(227,86)=+2.3824; A(227,89)=-7.8429;b(227)=-0.2; %two hundered twenty seven row
A(228,86)=+2.3824; A(228,96)=-4.0030;b(228)=-0.2; %two hundered twenty eight row
A(229,66)=-9.0943; A(229,87)=+2.3824;b(229)=-0.2; %two hundered twenty nine row
A(230,88)=+3.5837; A(230,91)=-4.2457;b(230)=-0.2; %two hundered thirty row
A(231,89)=+7.7521;b(231)=-0.2; %two hundered thirty one row
A(232,85)=-6.4746; A(232,90)=+2.3587;b(232)=-0.2; %two hundered thirty two row
A(233,90)=+2.3587; A(233,96)=-4.0030;b(233)=-0.2; %two hundered thirty three row
A(234,91)=+2.9206; A(234,94)=-3.7203;b(234)=-0.2; %two hundered thirty four row
A(235,87)=-6.0008; A(235,92)=+4.3354;b(235)=-0.2; %two hundered thirty five row
A(236,92)=-5.8341; A(236,93)=+3.4461;b(236)=-0.2; %two hundered thirty six row
A(237,94)=+2.4113; A(237,95)=-4.0897;b(237)=-0.2; %two hundered thirty seven row
A(238,94)=+2.4113; A(238,98)=-4.4124;b(238)=-0.2; %two hundered thirty eight row
A(239,85)=-6.4746; A(239,95)=+2.5340;b(239)=-0.2; %two hundered thirty nine row
A(240,89)=-7.8429; A(240,95)=+2.5340;b(240)=-0.2; %two hundered forty row
A(241,93)=-4.7628; A(241,96)=+2.4394;b(241)=-0.2; %two hundered forty one row
A(242,96)=+2.4394; A(242,98)=-4.4124;b(242)=-0.2; %two hundered forty two row
A(243,93)=-4.7628; A(243,97)=+2.4386;b(243)=-0.2; %two hundered forty three row
A(244,95)=-4.0897; A(244,97)=+2.4386;b(244)=-0.2; %two hundered forty four row
A(245,98)=+3.7901; A(245,99)=-5.2386;b(245)=-0.2; %two hundered forty five row
A(246,99)=+5.1272;b(246)=-0.2; %two hundered forty six row
A(247,97)=-3.0768; A(247,100)=+2.7392;b(247)=-0.2; %two hundered forty seven row
A(248,1)=+11.4142; A(248,4)=- 54.2640;b(248)=-0.2; %two hundered forty eight row
A(249,2)=+5.9183; A(249,6)=-17.3135; b(249)=-0.2; %two hundered forty nine row
A(250,2)=-16.3763; A(250,3)=+9.9391; b(250)=-0.2; %two hundered fifty row
A(251,4)=+14.0392; b(251)=-0.2; %two hundered fifty one row
A(252,1)=-64.4577; A(252,5)=+5.6869; b(252)=-0.2; %two hundered fifty two row
A(253,6)=+5.8898; A(253,12)=-9.9638; b(253)=-0.2; %two hundered fifty three row
A(254,5)=-6.0463; A(254,7)=+6.1631; b(254)=-0.2; %two hundered fifty four row
A(255,7)=+6.1631; A(255,12)=-6.2885; b(255)=-0.2; %two hundered fifty five row
A(256,5)=-6.0463; A(256,9)=+6.1631; b(256)=-0.2; %two hundered fifty six row
A(257,9)=+6.1631; A(257,12)=-6.2885; b(257)=-0.2; %two hundered fifty seven row
A(258,5)=-14.4893; A(258,11)=+7.3650; b(258)=-0.2; %two hundered fifty eight row
A(259,14)=+7.1774; A(259,39)=-80.5447;b(259)=-0.2; %two hundered fifty nine row
A(260,14)=+7.1774; A(260,41)=-80.5447;b(260)=-0.2; %two hundered sixty row
A(261,15)=+3.4529; A(261,17)=-5.1208; b(261)=-0.2; %two hundered sixty one row
A(262,16)=+3.3318; A(262,22)=-5.6890; b(262)=-0.2; %two hundered sixty two row
A(263,16)=+3.3318; A(263,55)=-10.6917;b(263)=-0.2; %two hundered sixty three row
A(264,17)=+3.2833; A(264,45)=-3.5403; b(264)=-0.2; %two hundered sixty four row
A(265,16)=-4.7977; A(265,18)=+3.3708; b(265)=-0.2; %two hundered sixty five row
A(266,19)=+64.8305;A(266,68)=0; b(266)=-0.2; %two hundered sixty six row
A(267,15)=-7.0580; A(267,21)=+4.0018; b(267)=-0.2; %two hundered sixty seven row
A(268,22)=+3.3946; A(268,23)=-7.9820; b(268)=-0.2; %two hundered sixty eight row
A(269,22)=+3.3946; A(269,25)=-7.9820; b(269)=-0.2; %two hundered sixty nine row
A(270,23)=+3.1372; A(270,48)=-4.4242; b(270)=-0.2; %two hundered seventy row
A(271,23)=+3.1372; A(271,50)=-4.4242; b(271)=-0.2; %two hundered seventy one row
A(272,24)=+3.4825; A(272,27)=-4.2686; b(272)=-0.2; %two hundered seventy two row
A(273,24)=+3.4825; A(273,30)=-8.5721; b(273)=-0.2; %two hundered seventy three row
A(274,25)=+3.1372; A(274,48)=-4.4242; b(274)=-0.2; %two hundered seventy four row
A(275,25)=+3.1372; A(275,50)=-4.4242; b(275)=-0.2; %two hundered seventy five row
A(276,26)=+3.4825; A(276,27)=-4.2686; b(276)=-0.2; %two hundered seventy six row
A(277,26)=+3.4825; A(277,30)=-8.5721; b(277)=-0.2; %two hundered seventy seven row
A(278,27)=+3.7362; A(278,72)=-17.2758;b(278)=-0.2; %two hundered seventy eight row
A(279,27)=+3.7362; A(279,74)=-17.2758;b(279)=-0.2; %two hundered seventy nine row
A(280,23)=-6.6031; A(280,28)=+3.4252; b(280)=-0.2; %two hundered eighty row
A(281,25)=-6.6031; A(281,28)=+3.4252; b(281)=-0.2; %two hundered eighty one row
A(282,23)=-20.8267;A(282,29)=+5.8141; b(282)=-0.2; %two hundered eighty two row
A(283,25)=-20.8267;A(283,29)=+5.8141; b(283)=-0.2; %two hundered eighty three row
A(284,31)=+3.6476; A(284,43)=-4.4421; b(284)=-0.2; %two hundered eighty four row
A(285,31)=+3.6476; A(285,46)=-3.9872; b(285)=-0.2; %two hundered eighty five row
A(286,32)=+3.2909; A(286,36)=-3.9972; b(286)=-0.2; %two hundered eighty six row
A(287,32)=+3.2909; A(287,38)=-3.9972; b(287)=-0.2; %two hundered eighty seven row
A(288,32)=+3.2909; A(288,40)=-12.0029;b(288)=-0.2; %two hundered eighty eight row
A(289,32)=+3.2909; A(289,42)=-12.0029;b(289)=-0.2; %two hundered eighty nine row
A(290,33)=+3.6476; A(290,43)=-4.4421; b(290)=-0.2; %two hundered ninety row
A(291,33)=+3.6476; A(291,46)=-3.9872; b(291)=-0.2; %two hundered ninety one row
A(292,34)=+3.2909; A(292,36)=-3.9985; b(292)=-0.2; %two hundered ninety two row
A(293,34)=+3.2909; A(293,38)=-3.9985; b(293)=-0.2; %two hundered ninety three row
A(294,34)=+3.2909; A(294,40)=-12.0029;b(294)=-0.2; %two hundered ninety four row
A(295,34)=+3.2909; A(295,42)=-12.0029;b(295)=-0.2; %two hundered ninety five row
A(296,31)=-5.0417; A(296,35)=+3.7831; b(296)=-0.2; %two hundered ninety six row
A(297,33)=-5.0417; A(297,35)=+3.7831; b(297)=-0.2; %two hundered ninety seven row
A(298,35)=+3.7831; A(298,40)=-20.3333;b(298)=-0.2; %two hundered ninety eight row
A(299,35)=+3.7831; A(299,42)=-20.3333;b(299)=-0.2; %two hundered ninety nine row
A(300,36)=+3.5199; A(300,47)=-5.1580; b(300)=-0.2; %three hundered row
A(301,36)=+3.5199; A(301,49)=-5.1580; b(301)=-0.2; %three hundered one row
A(302,36)=+3.5199; A(302,51)=-9.1471; b(302)=-0.2; %three hundered two row
A(303,36)=+3.5199; A(303,53)=-10.4119;b(303)=-0.2; %three hundered three row
A(304,31)=-5.0417; A(304,37)=+3.7831; b(304)=-0.2; %three hundered four row
A(305,33)=-5.0417; A(305,37)=+3.7831; b(305)=-0.2; %three hundered five row
A(306,37)=+3.7831; A(306,40)=-20.3333;b(306)=-0.2; %three hundered six row
A(307,37)=+3.7831; A(307,42)=-20.3333;b(307)=-0.2; %three hundered seven row
A(308,38)=+3.5199; A(308,47)=-5.1580; b(308)=-0.2; %three hundered eight row
A(309,38)=+3.5199; A(309,49)=-5.1580; b(309)=-0.2; %three hundered nine row
A(310,38)=+3.5199; A(310,51)=-9.1471; b(310)=-0.2; %three hundered ten row
A(311,38)=+3.5199; A(311,53)=-10.4119;b(311)=-0.2; %three hundered eleven row
A(312,31)=-6.0182; A(312,39)=+3.4890; b(312)=-0.2; %three hundered twelev row
A(313,33)=-6.0182; A(313,39)=+3.4890; b(313)=-0.2; %three hundered thirteen row
A(314,36)=-5.6830; A(314,39)=+3.4890; b(314)=-0.2; %three hundered fourteen row
A(315,38)=-5.6830; A(315,39)=+3.4890; b(315)=-0.2; %three hundered fifteen row
A(316,13)=-10.2486;A(316,40)=+8.7575; b(316)=-0.2; %three hundered sixteen row
A(317,40)=+8.7575; A(317,57)=-14.0512;b(317)=-0.2; %three hundered seventeen row
A(318,31)=-6.0182; A(318,41)=+3.4890; b(318)=-0.2; %three hundered eighteen row
A(319,33)=-6.0182; A(319,41)=+3.4890; b(319)=-0.2; %three hundered nineteen row
A(320,36)=-5.6830; A(320,41)=+3.4890; b(320)=-0.2; %three hundered twenty row
A(321,38)=-5.6830; A(321,41)=+3.4890; b(321)=-0.2; %three hundered twenty one row
A(322,13)=-10.2486;A(322,42)=+8.7575; b(322)=-0.2; %three hundered twenty two row
A(323,42)=+8.7575; A(323,57)=-14.0512;b(323)=-0.2; %three hundered twenty three row
A(324,43)=+3.9942; b(324)=-0.2; %three hundered twenty four row
A(325,32)=-3.8815; A(325,44)=+2.2708; b(325)=-0.2; %three hundered twenty five row
A(326,34)=-3.8815; A(326,44)=+2.2708; b(326)=-0.2; %three hundered twenty six row
A(327,44)=+2.2708; A(327,46)=-4.2607; b(327)=-0.2; %three hundered twenty seven row
A(328,32)=-4.8908; A(328,45)=+26.8298;b(328)=-0.2; %three hundered twenty eight row
A(329,34)=-4.8908; A(329,45)=+26.8298;b(329)=-0.2; %three hundered twenty night row
A(330,43)=-6.3255; A(330,45)=+26.8298;b(330)=-0.2; %three hundered therity row
A(331,18)=-4.0854; A(331,46)=+3.5612; b(331)=-0.2; %three hundered therity one row
A(332,24)=-5.1517; A(332,47)=+3.5405; b(332)=-0.2; %three hundered therity two row
A(333,26)=-5.1517; A(333,47)=+3.5405; b(333)=-0.2; %three hundered therity three row
A(334,35)=-5.6191; A(334,48)=+3.6876; b(334)=-0.2; %three hundered therity four row
A(335,37)=-5.6191; A(335,48)=+3.6876; b(335)=-0.2; %three hundered therity five row
A(336,48)=+3.6876; A(336,51)=-8.7937; b(336)=-0.2; %three hundered therity six row
A(337,48)=+3.6876; A(337,53)=-9.9569; b(337)=-0.2; %three hundered therity seven row
A(338,24)=-5.1517; A(338,49)=+3.5405; b(338)=-0.2; %three hundered therity eight row
A(339,26)=-5.1517; A(339,49)=+3.5405; b(339)=-0.2; %three hundered therity nine row
A(340,35)=-5.6191; A(340,50)=+3.6876; b(340)=-0.2; %three hundered forty row
A(341,37)=-5.6191; A(341,50)=+3.6876; b(341)=-0.2; %three hundered forty one row
A(342,50)=+3.6876; A(342,51)=-8.7937; b(342)=-0.2; %three hundered forty two row
A(343,50)=+3.6876; A(343,53)=-9.9569; b(343)=-0.2; %three hundered forty three row
A(344,35)=-14.5607;A(344,52)=+4.8671; b(344)=-0.2; %three hundered forty four row
A(345,37)=-14.5607;A(345,52)=+4.8671; b(345)=-0.2; %three hundered forty five row
A(346,47)=-11.7617;A(346,52)=+4.8671; b(346)=-0.2; %three hundered forty six row
A(347,49)=-11.7617;A(347,52)=+4.8671; b(347)=-0.2; %three hundered forty seven row
A(348,35)=-14.5607;A(348,54)=+5.2081; b(348)=-0.2; %three hundered forty eight row
A(349,37)=-14.5607;A(349,54)=+5.2081; b(349)=-0.2; %three hundered forty nine row
A(350,47)=-11.7617;A(350,54)=+5.2081; b(350)=-0.2; %three hundered fifty row
A(351,49)=-11.7617;A(351,54)=+5.2081; b(351)=-0.2; %three hundered fifty one row
A(352,55)=+5.0166; A(352,69)=-5.5603; b(352)=-0.2; %three hundered fifty two row
A(353,15)=-9.6581; A(353,56)=+5.0620; b(353)=-0.2; %three hundered fifty three row
A(354,57)=+10.3674;b(354)=-0.2; %three hundered fifty four row
A(355,39)=-14.1808;A(355,58)=+5.0723; b(355)=-0.2; %three hundered fifty five row
A(356,41)=-14.1808;A(356,58)=+5.0723; b(356)=-0.2; %three hundered fifty six row
A(357,52)=-13.9448;A(357,59)=+4.6680; b(357)=-0.2; %three hundered fifty seven row
A(358,54)=-17.1136;A(358,59)=+4.6680; b(358)=-0.2; %three hundered fifty eight row
A(359,60)=+7.6202; A(359,63)=-16.1691;b(359)=-0.2; %three hundered fifty nine row
A(360,60)=+7.6202; A(360,65)=-34.5195;b(360)=-0.2; %three hundered sixty row
A(361,52)=-13.9448;A(361,61)=+4.4203; b(361)=-0.2; %three hundered sixty one row
A(362,54)=-17.1136;A(362,61)=+4.4203; b(362)=-0.2; %three hundered sixity two row
A(363,62)=+6.9872; A(363,63)=-16.1691;b(363)=-0.2; %three hundered sixity three row
A(364,62)=+6.9872; A(364,65)=-34.5195;b(364)=-0.2; %three hundered sixty four row
A(365,20)=-65.5901;A(365,67)=+8.5120; b(365)=-0.2; %three hundered sixty five row
A(366,28)=-3.8453; A(366,69)=+2.3087; b(366)=-0.2; %three hundered sixty six row
A(367,69)=+2.3087; A(367,72)=-5.3198; b(367)=-0.2; %three hundered sixty seven row
A(368,69)=+2.3087; A(368,74)=-5.3198; b(368)=-0.2; %three hundered sixty eight row
A(369,56)=-5.4138; A(369,70)=+4.2100; b(369)=-0.2; %three hundered sixty nine row
A(370,28)=-4.5644; A(370,71)=+3.8108; b(370)=-0.2; %three hundered seventy row
A(371,70)=-5.8994; A(371,71)=+3.8108; b(371)=-0.2; %three hundered seventy one row
A(372,72)=+4.6162; A(372,75)=-5.4035; b(372)=-0.2; %three hundered seventy two row
A(373,72)=+4.6162; A(373,78)=-8.8247; b(373)=-0.2; %three hundered seventy three row
A(374,28)=-4.5644; A(374,73)=+3.8108; b(374)=-0.2; %three hundered seventy four row
A(375,70)=-5.8994; A(375,73)=+3.8108; b(375)=-0.2; %three hundered seventy five row
A(376,74)=+4.6162; A(376,75)=-5.4035; b(376)=-0.2; %three hundered seventy six row
A(377,74)=+4.6162; A(377,78)=-8.8247; b(377)=-0.2; %three hundered seventy seven row
A(378,75)=+4.2686; A(378,80)=-13.6766;b(378)=-0.2; %three hundered seventy eight row
A(379,71)=-6.8305; A(379,76)=+3.2570; b(379)=-0.2; %three hundered seventy nine row
A(380,73)=-6.8305; A(380,76)=+3.2570; b(380)=-0.2; %three hundered eighty row
A(381,71)=-14.2831;A(381,77)=+5.5574; b(381)=-0.2; %three hundered eighty one row
A(382,73)=-14.2831;A(382,77)=+5.5574; b(382)=-0.2; %three hundered eighty two row
A(383,76)=-30.4432;A(383,79)=+5.6824; b(383)=-0.2; %three hundered eighty three row
A(384,81)=+18.2525;b(384)=-0.2; %three hundered eighty four row
A(385,29)=-12.7593;A(385,82)=+2.9746; b(385)=-0.2; %three hundered eighty five row
A(386,77)=-11.5964;A(386,82)=+2.9746; b(386)=-0.2; %three hundered eighty six row
A(387,79)=-12.1496;A(387,82)=+2.9746; b(387)=-0.2; %three hundered eighty seven row
A(388,82)=+2.9746; A(388,83)=-22.6351;b(388)=-0.2; %three hundered eighty eight row
A(389,66)=-45.6938;A(389,87)=+6.0008; b(389)=-0.2; %three hundered eighty nine row
A(390,88)=+5.6032; A(390,91)=-7.3800; b(390)=-0.2; %three hundered ninety row
A(391,89)=+7.8429; b(391)=-0.2; %three hundered ninety one row
A(392,85)=-7.0892; A(392,90)=+2.4386; b(392)=-0.2; %three hundered ninety two row
A(393,90)=+2.4386; A(393,96)=-4.2332; b(393)=-0.2; %three hundered ninety three row
A(394,91)=+4.2457; A(394,94)=-6.1382; b(394)=-0.2; %three hundered ninety four row
A(395,87)=-9.2736; A(395,92)=+5.8341; b(395)=-0.2; %three hundered ninety five row
A(396,92)=-10.8547;A(396,93)=+4.7628; b(396)=-0.2; %three hundered ninety six row
A(397,94)=+3.7203; A(397,95)=-9.8562; b(397)=-0.2; %three hundered ninety seven row
A(398,94)=+3.7203; A(398,98)=-11.8314;b(398)=-0.2; %three hundered ninety eight row
A(399,85)=-132.3465;A(399,95)=+4.0897;b(399)=-0.2; %three hundered ninety nine row
A(400,93)=-18.8671;A(400,96)=+4.0030; b(400)=-0.2; %four hundered row
A(401,96)=+4.0030; A(401,98)=-14.1240;b(401)=-0.2; %four hundered one row
A(402,93)=-7.8632; A(402,97)=+3.0768; b(402)=-0.2; %four hundered two row
A(403,95)=- 6.1983;A(403,97)=+3.0768; b(403)=-0.2; %four hundered three row
A(404,98)=+4.4124; A(404,99)=-6.4912; b(404)=-0.2; %four hundered four row
A(405,99)=+5.2386; b(405)=-0.2; %four hundered five row
A(406,97)=-3.2039; A(406,100)=+2.8401;b(406)=-0.2; %four hundered six row
Aeq=[];
beq=[];
nonlcon=[];
IntCon=[];
rng default % For reproducibility
options=gaoptimset('plotfcns',{'gaplotgenealogy','gaplotselection', 'gaplotbestf' ,@gaplotscorediversity});
options= gaoptimset(options,'Tolfun',1e-6,'TolCon',1e-3,'stallGenlimit',50);
options=gaoptimset(options,'PopulationSize',200);
options=gaoptimset(options,'PopulationType','doubleVector');
options=gaoptimset(options,'CrossoverFcn',{@crossoverarithmetic});
options=gaoptimset(options,'Display', 'iter');
[x,fval,exitflag,output,population,scores] = ga(ObjectiveFunction,nvars,A,b,Aeq,beq,LB,UB,nonlcon,IntCon,options)
Walter Roberson on 9 Mar 2019
It was unable to find even one point that met the constraints.

Walter Roberson on 9 Mar 2019
Your A matrix is rank 99 rather than rank 100. Column 68 is all zero. You probably have a contradiction buried in the conditions.
tahseen alshmary on 11 Mar 2019
yes it is true
okay can you try to solve problem only with these inequality constraints .please
simple_fitness
function y = simple_fitness(x)
y =(7.0976*x(1)+3.5366*x(2)+4.7836*x(3)+ 6.5678*x(4)+4.0069*x(5)+4.1739*x(6)+3.3839*x(7)+4.2305*x(8)+3.3839*x(9)+4.2305*x(10)+4.1049*x(11)+3.0558*x(12)+3.0153*x(13)+ 2.3903*x(14)+...
2.5469*x(15)+2.4238*x(16)+ 2.5191*x(17)+ 2.6079*x(18)+9.4415*x(19)+ 2.2440*x(20)+2.4373*x(21)+1.9621*x(22)+1.9703*x(23)+2.0532*x(24)+1.9703*x(25)+2.0532*x(26)+2.2324*x(27)+ 1.9757*x(28)+...
1.9306*x(29)+2.3931*x(30)+2.1379*x(31)+2.0626*x(32)+2.1379*x(33)+2.0626*x(34)+2.0508*x(35)+1.9682*x(36)+2.0508*x(37)+1.9682*x(38)+1.9509*x(39)+2.7096*x(40)+1.9509*x(41)+2.7096*x(42)+...
3.8182*x(43)+2.0502*x(44)+2.1055*x(45)+3.0223*x(46)+1.9565*x(47)+2.0049*x(48)+1.9565*x(49)+2.0049*x(50)+2.1366*x(51)+1.9232*x(52)+2.1262*x(53)+1.9179*x(54)+2.2441*x(55)+2.2710*x(56)+...
5.9721*x(57)+2.3979*x(58)+2.0913*x(59)+2.6913*x(60)+2.0968*x(61)+2.7242*x(62)+2.4921*x(63)+2.5701*x(64)+3.4983*x(65)+2.5363*x(66)+4.6938*x(67)+0*x(68)+2.1568*x(69)+ 4.0198*x(70)+...
2.1366*x(71)+2.3284*x(72)+2.1366*x(73)+2.3284*x(74)+3.1522*x(75)+2.2839*x(76)+2.1980*x(77)+2.3528*x(78)+2.6189*x(79)+2.3485*x(80)+15.3399*x(81)+2.3086*x(82)+2.5137*x(83)+2.3593*x(84)+...
2.5020*x(85)+2.3824*x(86)+3.9031*x(87)+3.5837*x(88)+7.7521*x(89)+2.3587*x(90)+2.9206*x(91)+4.3354*x(92)+3.4461*x(93)+2.4113*x(94)+2.5340*x(95)+2.4394*x(96)+2.4386*x(97)+3.7901*x(98)+...
5.1272*x(99)+2.7392*x(100));
end
%To minimize our fitness function using the ga function, we need to pass in a function handle to the fitness function as well as specifying the number of variables as the second argument. Lower and upper bounds are provided as LB and UB respectively. In addition, we also need to pass in a function handle to the nonlinear constraint function.
tic
clear
clc
ObjectiveFunction = @simple_fitness;
nvars = 100; % Number of variables
LB = 0.05*ones(1,100); % Lower bound for (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 ...........x100)
UB = 1.1*ones (1,100); % Upper bound for (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 ..........x100)
A=zeros(248,100); b=zeros(248,1);
A(1,1)=+7.0976; A(1,4)=-14.0392; b(1)=-0.2; %first row
A(2,2)=+3.5366; A(2,6)=-5.8898; b(2)=-0.2; %second row
A(3,2)=-5.9183; A(3,3)=+4.7836; b(3)=-0.2; %third row
A(4,4)=+6.5678; b(4)=-0.2; %fourth row
A(5,1)=-11.4142; A(5,5)=+4.0069; b(5)=-0.2; %fifth row
A(6,6)=+4.1739; A(6,12)=-5.8996; b(6)=-0.2; %sixth row
A(7,5)=-5.6869; A(7,7)=+3.3839; b(7)=-0.2; %seventh row
A(8,7)=+3.3839; A(8,12)=-5.8996; b(8)=-0.2; %eighth row
A(9,8)=+4.2305; A(9,9)=-6.1631; b(9)=-0.2; %nighth row
A(10,5)=-5.6869; A(10,9)=+3.3839; b(10)=-0.2; %tenth row
A(11,9)=++3.3839; A(11,12)=-5.8996; b(11)=-0.2; %eleventh row
A(12,7)=-6.1631; A(12,10)=+4.2305; b(12)=-0.2; %tweleventh row
A(13,5)=-5.6869; A(13,11)=+4.1049; b(13)=-0.2; %thirteenth row
A(14,12)=+3.0558; A(14,14)=-7.1774; b(14)=-0.2; %fourteenth row
A(15,11)=-7.3650; A(15,13)=+3.0153; b(15)=-0.2; %fiveteenth row
A(16,14)=+2.3903; A(16,39)=-3.4890; b(16)=-0.2; %sixteenth row
A(17,14)=+2.3903; A(17,41)=-3.4890; b(17)=-0.2; %seventennth row
A(18,14)=+2.3903; A(18,57)=-10.3674;b(18)=-0.2; %eighteenth row
A(19,15)=+2.5469; A(19,17)=-3.2833; b(19)=-0.2; %nighnteenth row
A(20,15)=+2.5469; A(20,19)=-64.8305;b(20)=-0.2; %twinty row
A(21,16)=+2.4238; A(21,22)=-3.3946; b(21)=-0.2; %twinty one row
A(22,16)=+2.4238; A(22,55)=-5.0166; b(22)=-0.2; %twenty two row
A(23,17)=+2.5191; A(23,45)=-2.6620; b(23)=-0.2; %twenty three row
A(24,16)=-3.3318; A(24,18)=+2.6079; b(24)=-0.2; %twenty four row
A(25,18)=+2.6079; A(25,19)=-64.8305;b(25)=-0.2; %twenty five row
A(26,19)=+9.4415; A(26,68)=0; b(26)=-0.2; %twenty six row
A(27,16)=-3.3318; A(27,20)=+2.2440; b(27)=-0.2; %twenty seven row
A(28,17)=-3.2833; A(28,20)=+2.2440; b(28)=-0.2; %twenty eight row
A(29,15)=-3.4529; A(29,21)=+2.4373; b(29)=-0.2; %twenty nine row
A(30,21)=+2.4373; A(30,55)=-5.0166; b(30)=-0.2; %thirty row
A(31,22)=+1.9621; A(31,23)=-3.1372; b(31)=-0.2; %thirty one row
A(32,22)=+1.9621; A(32,25)=-3.1372; b(32)=-0.2; %thirty two row
A(33,22)=+1.9621; A(33,27)=-3.7362; b(33)=-0.2; %thirty three row
A(34,22)=+1.9621; A(34,30)=-6.7158; b(34)=-0.2; %thirty four row
A(35,23)=+1.9703; A(35,26)=-3.4825; b(35)=-0.2; %thirty five row
A(36,23)=+1.9703; A(36,48)=-3.6876; b(36)=-0.2; %thirty six row
A(37,23)=+1.9703; A(37,50)=-3.6876; b(37)=-0.2; %thirty seven row
A(38,24)=+2.0532; A(38,25)=-3.1372; b(38)=-0.2; %thirty eight row
A(39,24)=+2.0532; A(39,27)=-3.7362; b(39)=-0.2; %thirty nine row
A(40,24)=+2.0532; A(40,30)=-6.7158; b(40)=-0.2; %forty row
A(41,24)=-3.4825; A(41,25)=+1.9703; b(41)=-0.2; %forty one row
A(42,25)=+1.9703; A(42,48)=-3.6876; b(42)=-0.2; %forty two row
A(43,25)=+1.9703; A(43,50)=-3.6876; b(43)=-0.2; %forty three row
A(44,23)=-3.1372; A(44,26)=+2.0532; b(44)=-0.2; %forty four row
A(45,26)=+2.0532; A(45,27)=-3.7362; b(45)=-0.2; %forty five row
A(46,26)=+2.0532; A(46,30)=-6.7158; b(46)=-0.2; %forty six row
A(47,27)=+2.2324; A(47,70)=-4.2100; b(47)=-0.2; %forty seven row
A(48,27)=+2.2324; A(48,72)=-4.6162; b(48)=-0.2; %forty eight row
A(49,27)=+2.2324; A(49,74)=-4.6162; b(49)=-0.2; %forty nine row
A(50,21)=-4.0018; A(50,28)=+1.9757; b(50)=-0.2; %fifty row
A(51,23)=-3.1372; A(51,28)=+1.9757; b(51)=-0.2; %fifty one row
A(52,25)=-3.1372; A(52,28)=+1.9757; b(52)=-0.2; %fifty two row
A(53,28)=+1.9757; A(53,30)=-6.7158; b(53)=-0.2; %fifty three row
A(54,21)=-4.0018; A(54,29)=+1.9306; b(54)=-0.2; %fifty four row
A(55,23)=-3.1372; A(55,29)=+1.9306; b(55)=-0.2; %fifty five row
A(56,25)=-3.1372; A(56,29)=+1.9306; b(56)=-0.2; %fifty six row
A(57,27)=-3.7362; A(57,29)=+1.9306; b(57)=-0.2; %fifty seven row
A(58,30)=+2.3931; A(58,77)=-5.5574; b(58)=-0.2; %fifty eight row
A(59,30)=+2.3931; A(59,79)=-5.6824; b(59)=-0.2; %fifty nine row
A(60,30)=+2.3931; A(60,81)=-18.2525;b(60)=-0.2; %sixty row
A(61,30)=+2.3931; A(61,83)=-7.2767; b(61)=-0.2; %sixty one row
A(62,31)=+2.1379; A(62,34)=-3.2909; b(62)=-0.2; %sixty two row
A(63,31)=+2.1379; A(63,43)=-3.9942; b(63)=-0.2; %sixty three row
A(64,31)=+2.1379; A(64,46)=-3.5612; b(64)=-0.2; %sixty four row
A(65,32)=+2.0626; A(65,33)=-3.6476; b(65)=-0.2; %sixty five row
A(66,32)=+2.0626; A(66,36)=-3.5199; b(66)=-0.2; %sixty six row
A(67,32)=+2.0626; A(67,38)=-3.5199; b(67)=-0.2; %sixty seven row
A(68,32)=+2.0626; A(68,40)=-8.7575; b(68)=-0.2; %sixty eight row
A(69,32)=+2.0626; A(69,42)=-8.7575; b(69)=-0.2; %sixty nine row
A(70,32)=-3.2909; A(70,33)=+2.1379; b(70)=-0.2; %seventy row
A(71,33)=+2.1379; A(71,43)=-3.9942; b(71)=-0.2; %seventy one row
A(72,33)=+2.1379; A(72,46)=-3.5612; b(72)=-0.2; %seventy two row
A(73,31)=-3.6476; A(73,34)=+2.0626; b(73)=-0.2; %seventy three row
A(74,34)=+2.0626; A(74,36)=-3.5199; b(74)=-0.2; %seventy four row
A(75,34)=+2.0626; A(75,38)=-3.5199; b(75)=-0.2; %seventy five row
A(76,34)=+2.0626; A(76,40)=-8.7575; b(76)=-0.2; %seventy six row
A(77,34)=+2.0626; A(77,42)=-8.7575; b(77)=-0.2; %seventy seven row
A(78,31)=-3.6476; A(78,35)=+2.0508; b(78)=-0.2; %seventy eight row
A(79,33)=-3.6476; A(79,35)=+2.0508; b(79)=-0.2; %seventy nine row
A(80,35)=+2.0508; A(80,40)=-8.7575; b(80)=-0.2; %eighty row
A(81,35)=+2.0508; A(81,42)=-8.7575; b(81)=-0.2; %eighty one row
A(82,36)=+1.9682; A(82,37)=-3.7831; b(82)=-0.2; %eighty two row
A(83,36)=+1.9682; A(83,47)=-3.5405; b(83)=-0.2; %eighty three row
A(84,36)=+1.9682; A(84,49)=-3.5405; b(84)=-0.2; %eighty four row
A(85,36)=+1.9682; A(85,51)=-5.3385; b(85)=-0.2; %eighty five row
A(86,36)=+1.9682; A(86,53)=-5.7513; b(86)=-0.2; %eighty six row
A(87,31)=-3.6476; A(87,37)=+2.0508; b(87)=-0.2; %eighty seven row
A(88,33)=-3.6476; A(88,37)=+2.0508; b(88)=-0.2; %eighty eight row
A(89,36)=-3.5199; A(89,37)=+2.0508; b(89)=-0.2; %eighty nine row
A(90,37)=+2.0508; A(90,40)=-8.7575; b(90)=-0.2; %ninety row
A(91,37)=+2.0508; A(91,42)=-8.7575; b(91)=-0.2; %ninety one row
A(92,35)=-3.7831; A(92,38)=+1.9682; b(92)=-0.2; %ninety two row
A(93,38)=+1.9682; A(93,47)=-3.5405; b(93)=-0.2; %ninety three row
A(94,38)=+1.9682; A(94,49)=-3.5405; b(94)=-0.2; %ninety four row
A(95,38)=+1.9682; A(95,51)=-5.3385; b(95)=-0.2; %ninety five row
A(96,38)=+1.9682; A(96,53)=-5.7513; b(96)=-0.2; %ninety six row
A(97,31)=-3.6476; A(97,39)=+1.9509; b(97)=-0.2; %ninety seven row
A(98,33)=-3.6476; A(98,39)=+1.9509; b(98)=-0.2; %ninety eight row
A(99,36)=-3.5199; A(99,39)=+1.9509; b(99)=-0.2; %ninety nine row
A(100,38)=-3.5199;A(100,39)=+1.9509;b(100)=-0.2; %one hunderd row
A(101,39)=+1.9509;A(101,42)=-8.7575;b(101)=-0.2; %one hundered one row
A(102,13)=-8.1317;A(102,40)=+2.7096;b(102)=-0.2; %one hundered two row
A(103,40)=+2.7096;A(103,41)=-3.4890;b(103)=-0.2; %one hundered three row
A(104,40)=+2.7096;A(104,57)=-10.3674;b(104)=-0.2; %one hundered four row
A(105,31)=-3.6476;A(105,41)=+1.9509;b(105)=-0.2; %one hundered five row
A(106,33)=-3.6476;A(106,41)=+1.9509;b(106)=-0.2; %one hundered six row
A(107,36)=-3.5199;A(107,41)=+1.9509;b(107)=-0.2; %one hundered seven row
A(108,38)=-3.5199;A(108,41)=+1.9509;b(108)=-0.2; %one hundered eight row
A(109,40)=-8.7575;A(109,41)=+1.9509;b(109)=-0.2; %one hundered nine row
A(110,13)=-8.1317;A(110,42)=+2.7096;b(110)=-0.2; %one hundered ten row
A(111,39)=-3.4890;A(111,42)=+2.7096;b(111)=-0.2; %one hundered eleven row
A(112,42)=+2.7096;A(112,57)=-10.3674;b(112)=-0.2; %one hundered twelve row
A(113,43)=+3.8182;b(113)=-0.2; %one hundered thrteen row
A(114,32)=-3.2909;A(114,44)=+2.0502;b(114)=-0.2; %one hundered fourteen row
A(115,34)=-3.2909;A(115,44)=+2.0502;b(115)=-0.2; %one hundered fifteen row
A(116,44)=+2.0502;A(116,46)=-3.5612;b(116)=-0.2; %one hundered sixteen row
A(117,32)=-3.2909;A(117,45)=+2.1055;b(117)=-0.2; %one hundered seventeen row
A(118,34)=-3.2909;A(118,45)=+2.1055;b(118)=-0.2; %one hundered eigteen row
A(119,43)=-3.9942;A(119,45)=+2.1055;b(119)=-0.2; %one hundered ninteen row
A(120,18)=-3.3708;A(120,46)=+3.0223;b(120)=-0.2; %one hundered twenty row
A(121,24)=-3.4825;A(121,47)=+1.9565;b(121)=-0.2; %one hundered twenty 0ne row
A(122,26)=-3.4825;A(122,47)=+1.9565;b(122)=-0.2; %one hundered twenty two row
A(123,47)=+1.9565;A(123,50)=-3.6876;b(123)=-0.2; %one hundered twenty three row
A(124,35)=-3.7831;A(124,48)=+2.0049;b(124)=-0.2; %one hundered twenty four row
A(125,37)=-3.7831;A(125,48)=+2.0049;b(125)=-0.2; %one hundered twenty five row
A(126,48)=+2.0049;A(126,49)=-3.5405;b(126)=-0.2; %one hundered twenty six row
A(127,48)=+2.0049;A(127,51)=-5.3385;b(127)=-0.2; %one hundered twenty seven row
A(128,48)=+2.0049;A(128,53)=-5.7513;b(128)=-0.2; %one hundered twenty eight row
A(129,24)=-3.4825;A(129,49)=+1.9565;b(129)=-0.2; %one hundered twenty nine row
A(130,26)=-3.4825;A(130,49)=+1.9565;b(130)=-0.2; %one hundered thrity row
A(131,48)=-3.6876;A(131,49)=+1.9565;b(131)=-0.2; %one hundered thirty one row
A(132,35)=-3.7831;A(132,50)=+2.0049;b(132)=-0.2; %one hundered thirty two row
A(133,37)=-3.7831;A(133,50)=+2.0049;b(133)=-0.2; %one hundered thirty three row
A(134,47)=-3.5405;A(134,50)=+2.0049;b(134)=-0.2; %one hundered thirty four row
A(135,50)=+2.0049;A(135,51)=-5.3385;b(135)=-0.2; %one hundered thirty five row
A(136,50)=+2.0049;A(136,53)=-5.7513;b(136)=-0.2; %one hundered thirty six row
A(137,51)=+2.1366;A(137,54)=-5.2081;b(137)=-0.2; %one hundered thirty seven row
A(138,51)=+2.1366;A(138,60)=-7.6202;b(138)=-0.2; %one hundered thirty eight row
A(139,51)=+2.1366;A(139,62)=-6.9872;b(139)=-0.2; %one hundered thirty nine row
A(140,35)=-3.7831;A(140,52)=+1.9232;b(140)=-0.2; %one hundered forty row
A(141,37)=-3.7831;A(141,52)=+1.9232;b(141)=-0.2; %one hundered forty one row
A(142,47)=-3.5405;A(142,52)=+1.9232;b(142)=-0.2; %one hundered forty two row
A(143,49)=-3.5405;A(143,52)=+1.9232;b(143)=-0.2; %one hundered forty three row
A(144,52)=+1.9232;A(144,53)=-5.7513;b(144)=-0.2; %one hundered forty four row
A(145,52)=-4.8671;A(145,53)=+2.1262;b(145)=-0.2; %one hundered forty five row
A(146,53)=+2.1262;A(146,60)=-7.6202;b(146)=-0.2; %one hundered forty six row
A(147,53)=+2.1262;A(147,62)=-6.9872;b(147)=-0.2; %one hundered forty seven row
A(148,35)=-3.7831;A(148,54)=+1.9179;b(148)=-0.2; %one hundered forty eight row
A(149,37)=-3.7831;A(149,54)=+1.9179;b(149)=-0.2; %one hundered forty nine row
A(150,47)=-3.5405;A(150,54)=+1.9179;b(150)=-0.2; %one hundered fifity row
A(151,49)=-3.5405;A(151,54)=+1.9179;b(151)=-0.2; %one hundered fifty one row
A(152,51)=-5.3385;A(152,54)=+1.9179;b(152)=-0.2; %one hundered fifty two row
A(153,55)=+2.2441;A(153,69)=-2.3087;b(153)=-0.2; %one hundered fifty three row
A(154,15)=-3.4529;A(154,56)=+2.2710;b(154)=-0.2; %one hundered fifty four row
A(155,22)=-3.3946;A(155,56)=+2.2710;b(155)=-0.2; %one hundered fifty five row
A(156,57)=+5.9721;b(156)=-0.2; %one hundered fifty six row
A(157,13)=-8.1317;A(157,58)=+2.3979;b(157)=-0.2; %one hundered fifty seven row
A(158,39)=-3.4890;A(158,58)=+2.3979;b(158)=-0.2; %one hundered fifty eight row
A(159,41)=-3.4890;A(159,58)=+2.3979;b(159)=-0.2; %one hundered fifty nine row
A(160,52)=-4.8671;A(160,59)=+2.0913;b(160)=-0.2; %one hundered sixity row
A(161,54)=-5.2081;A(161,59)=+2.0913;b(161)=-0.2; %one hundered sixity one row
A(162,62)=-6.9872;A(162,59)=+2.0913;b(162)=-0.2; %one hundered sixity two row
A(163,60)=+2.6913;A(163,61)=-4.4203;b(163)=-0.2; %one hundered sixity three row
A(164,60)=+2.6913;A(164,63)=-8.1201;b(164)=-0.2; %one hundered sixity four row
A(165,65)=-11.2605;A(165,60)=+2.6913;b(165)=-0.2; %one hundered sixity five row
A(166,52)=-4.8671;A(166,61)=+2.0968;b(166)=-0.2; %one hundered sixity six row
A(167,54)=-5.2081;A(167,61)=+2.0968;b(167)=-0.2; %one hundered sixity seven row
A(168,60)=-7.6202;A(168,61)=+2.0968;b(168)=-0.2; %one hundered sixity eight row
A(169,59)=-4.6680;A(169,62)=+2.7242;b(169)=-0.2; %one hundered sixity nine row
A(170,62)=+2.7242;A(170,63)=-8.1201;b(170)=-0.2; %one hundered seventy row
A(171,62)=+2.7242;A(171,65)=-11.2605;b(171)=-0.2; %one hundered seventy one row
A(172,63)=+2.4921;A(172,84)=-7.0670;b(172)=-0.2; %one hundered sventy two row
A(173,63)=+2.4921;A(173,86)=-6.3283;b(173)=-0.2; %one hundered seventy three row
A(174,59)=-4.6680;A(174,64)=+2.5701;b(174)=-0.2; %one hundered seventy four row
A(175,61)=-4.4203;A(175,64)=+2.5701;b(175)=-0.2; %one hundered seventy five row
A(176,64)=+2.5701;A(176,65)=-11.2605;b(176)=-0.2; %one hundered seventy six row
A(177,65)=+3.4983;A(177,88)=-5.6032;b(177)=-0.2; %one hundered seventy seven row
A(178,59)=-4.6680;A(178,66)=+2.5363;b(178)=-0.2; %one hundered seventy eight row
A(179,61)=-4.4203;A(179,66)=+2.5363;b(179)=-0.2; %one hundered seventy nine row
A(180,63)=-8.1201;A(180,66)=+2.5363;b(180)=-0.2; %one hundered eighty row
A(181,67)=+4.6938;A(181,20)=-9.1333;b(181)=-0.2; %one hundered eighty one row
A(182,28)=-3.4252;A(182,69)=+2.1568;b(182)=-0.2; %one hundered eighty two row
A(183,69)=+2.1568;A(183,72)=-4.6162;b(183)=-0.2; %one hundered eighty three row
A(184,69)=+2.1568;A(184,74)=-4.6162;b(184)=-0.2; %one hundered eighty four row
A(185,65)=-5.1702;A(185,70)=+4.0198;b(185)=-0.2; %one hundered eighty five row
A(186,28)=-3.4252;A(186,71)=+2.1366;b(186)=-0.2; %one hundered eighty six row
A(187,70)=-4.2100;A(187,71)=+2.1366;b(187)=-0.2; %one hundered eighty seven row
A(188,71)=+2.1366;A(188,74)=-4.6162;b(188)=-0.2; %one hundered eighty eight row
A(189,72)=+2.3284;A(189,73)=-3.8108;b(189)=-0.2; %one hundered eighty nine row
A(190,72)=+2.3284;A(190,75)=-4.2686;b(190)=-0.2; %one hundered ninty row
A(191,72)=+2.3284;A(191,78)=-5.9702;b(191)=-0.2; %one hundered ninty one row
A(192,28)=-3.4252;A(192,73)=+2.1366;b(192)=-0.2; %one hundered ninty two row
A(193,70)=-4.2100;A(193,73)=+2.1366;b(193)=-0.2; %one hundered ninty three row
A(194,72)=-4.6162;A(194,73)=+2.1366;b(194)=-0.2; %one hundered ninty four row
A(195,71)=-3.8108;A(195,74)=+2.3284;b(195)=-0.2; %one hundered ninty five row
A(196,74)=+2.3284;A(196,75)=-4.2686;b(196)=-0.2; %one hundered ninty six row
A(197,74)=+2.3284;A(197,78)=-5.9702;b(197)=-0.2; %one hundered ninty seven row
A(198,75)=+3.1522;A(198,80)=-5.1540;b(198)=-0.2; %one hundered ninty eight row
A(199,71)=-3.8108;A(199,76)=+2.2839;b(199)=-0.2; %one hundered ninty nine row
A(200,73)=-3.8108;A(200,76)=+2.2839;b(200)=-0.2; %two hundered row
A(201,76)=+2.2839;A(201,78)=-5.9702;b(201)=-0.2; %two hundered one row
A(202,71)=-3.8108;A(202,77)=+2.1980;b(202)=-0.2; %two hundered two row
A(203,73)=-3.8108;A(203,77)=+2.1980;b(203)=-0.2; %two hundered three row
A(204,75)=-4.2686;A(204,77)=+2.1980;b(204)=-0.2; %two hundered four row
A(205,29)=-5.8141;A(205,78)=+2.3528;b(205)=-0.2; %two hundered five row
A(206,78)=+2.3528;A(206,79)=-5.6824;b(206)=-0.2; %two hundered six row
A(207,78)=+2.3528;A(207,81)=-18.2525;b(207)=-0.2; %two hundered seven row
A(208,78)=+2.3528;A(208,83)=-7.2767;b(208)=-0.2; %two hundered eight row
A(209,76)=-3.2570;A(209,79)=+2.6189;b(209)=-0.2; %two hundered nine row
A(210,29)=-5.8141;A(210,80)=+2.3485;b(210)=-0.2; %two hundered ten row
A(211,77)=-5.5574;A(211,80)=+2.3485;b(211)=-0.2; %two hundered eleven row
A(212,80)=+2.3485;A(212,81)=-18.2525;b(212)=-0.2; %two hundered tweleve row
A(213,80)=+2.3485;A(213,83)=-7.2767;b(213)=-0.2; %two hundered thirteen row
A(214,81)=+15.3399;b(214)=-0.2; %two hundered fourteen row
A(215,29)=-5.8141; A(215,82)=+2.3086;b(215)=-0.2; %two hundered fifteen row
A(216,77)=-5.5574; A(216,82)=+2.3086;b(216)=-0.2; %two hundered sixteen row
A(217,79)=-5.6824; A(217,82)=+2.3086;b(217)=-0.2; %two hundered seventeen row
A(218,82)=+2.3086; A(218,83)=-7.2767;b(218)=-0.2; %two hundered eighteen row
A(219,83)=+2.5137; A(219,64)=-8.2504;b(219)=-0.2; %two hundered ninteen row
A(220,83)=+2.5137; A(220,86)=-6.3283;b(220)=-0.2; %two hundered twenty row
A(221,29)=-5.8141; A(221,84)=+2.3593;b(221)=-0.2; %two hundered twenty one row
A(222,77)=-5.5574; A(222,84)=+2.3593;b(222)=-0.2; %two hundered twenty two row
A(223,79)=-5.6824; A(223,84)=+2.3593;b(223)=-0.2; %two hundered twenty three row
A(224,81)=-18.2525;A(224,84)=+2.3593;b(224)=-0.2; %two hundered twenty four row
A(225,64)=-8.2504; A(225,85)=+2.5020;b(225)=-0.2; %two hundered twenty five row
A(226,84)=-7.0670; A(226,85)=+2.5020;b(226)=-0.2; %two hundered twenty six row
A(227,86)=+2.3824; A(227,89)=-7.8429;b(227)=-0.2; %two hundered twenty seven row
A(228,86)=+2.3824; A(228,96)=-4.0030;b(228)=-0.2; %two hundered twenty eight row
A(229,66)=-9.0943; A(229,87)=+2.3824;b(229)=-0.2; %two hundered twenty nine row
A(230,88)=+3.5837; A(230,91)=-4.2457;b(230)=-0.2; %two hundered thirty row
A(231,89)=+7.7521;b(231)=-0.2; %two hundered thirty one row
A(232,85)=-6.4746; A(232,90)=+2.3587;b(232)=-0.2; %two hundered thirty two row
A(233,90)=+2.3587; A(233,96)=-4.0030;b(233)=-0.2; %two hundered thirty three row
A(234,91)=+2.9206; A(234,94)=-3.7203;b(234)=-0.2; %two hundered thirty four row
A(235,87)=-6.0008; A(235,92)=+4.3354;b(235)=-0.2; %two hundered thirty five row
A(236,92)=-5.8341; A(236,93)=+3.4461;b(236)=-0.2; %two hundered thirty six row
A(237,94)=+2.4113; A(237,95)=-4.0897;b(237)=-0.2; %two hundered thirty seven row
A(238,94)=+2.4113; A(238,98)=-4.4124;b(238)=-0.2; %two hundered thirty eight row
A(239,85)=-6.4746; A(239,95)=+2.5340;b(239)=-0.2; %two hundered thirty nine row
A(240,89)=-7.8429; A(240,95)=+2.5340;b(240)=-0.2; %two hundered forty row
A(241,93)=-4.7628; A(241,96)=+2.4394;b(241)=-0.2; %two hundered forty one row
A(242,96)=+2.4394; A(242,98)=-4.4124;b(242)=-0.2; %two hundered forty two row
A(243,93)=-4.7628; A(243,97)=+2.4386;b(243)=-0.2; %two hundered forty three row
A(244,95)=-4.0897; A(244,97)=+2.4386;b(244)=-0.2; %two hundered forty four row
A(245,98)=+3.7901; A(245,99)=-5.2386;b(245)=-0.2; %two hundered forty five row
A(246,99)=+5.1272;b(246)=-0.2; %two hundered forty six row
A(247,97)=-3.0768; A(247,100)=+2.7392;b(247)=-0.2; %two hundered forty seven row
A(248,68)=0;b(248)=-0.2; %two hundered forty eight row
Aeq=[];
beq=[];
nonlcon=[];
IntCon=[];
rng default % For reproducibility
options=gaoptimset('plotfcns',{'gaplotgenealogy','gaplotselection', 'gaplotbestf' ,@gaplotscorediversity});
options= gaoptimset(options,'Tolfun',1e-6,'TolCon',1e-3,'stallGenlimit',50);
options=gaoptimset(options,'PopulationSize',200);
options=gaoptimset(options,'PopulationType','doubleVector');
options=gaoptimset(options,'CrossoverFcn',{@crossoverarithmetic});
options=gaoptimset(options,'Display', 'iter');
[x,fval,exitflag,output,population,scores] = ga(ObjectiveFunction,nvars,A,b,Aeq,beq,LB,UB,nonlcon,IntCon,options)
toc

John D'Errico on 9 Mar 2019
Edited: John D'Errico on 9 Mar 2019
In general, this is a really bad way to create ANY matrix. Why? Because the probability of a typo approaches 100%. I do not know how it is that you created those coefficients, so it is difficult to suggest how to do things better. Perhaps you want to learn about tools like sparse to build a matrix, or sub2ind, or even accumarray. All of those numbers and indices came from some place.
find(~sum(~~A,1))
ans =
68
find(~sum(~~A,2))
ans =
0×1 empty double column vector
So column 68 is all zero. That means the only constraints on variable x(68) are the bound constraints. There are no empty rows.
Does a feasible solution to the constraint system exist at all? We can test this using linprog.
linprog(ones(100,1),A,b)
Problem is unbounded.
ans =
[]
So if I ignore the bound constraints, it looks like there might conceivably be solutions. (Actually, I think there will not be any anyway, but that seems irrelevant to chase down.)
But when I add in the bound constraints, things get more difficult.
linprog(ones(100,1),A,b,[],[],LB,UB)
No feasible solution found.
Linprog stopped because no point satisfies the constraints.
ans =
[]
I'll postulate you made a typing error when you build A or b. Or possibly you just made an error of mind, creating them in a way that no solution exists.

tahseen alshmary on 10 Mar 2019
dear all
can you propose any solution for problem? please
it is very important
tahseen alshmary on 10 Mar 2019

R2017b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by