set c crops /corn, soybean, wheat/ ; alias (c,d); table var(c,d) variance coefficients corn soybean wheat corn 6662.7064 954.0056 185.9553 soybean 954.0056 254.7087 48.6759 wheat 185.9553 48.6759 75.9272 ; parameter avg(c) average return per acre / corn 212.329, soybean 119.560, wheat 103.555/; scalar iriska inverse of the risk aversion coefficient /1.1462E+05/; variables x(c) crop levels inc expected income sigma variance ce certainty equivalence; positive variable x; equations certeq certainty equivalence const1 total acreage constraint const2 expected income const3 variance equation; certeq.. inc - 1/iriska * sigma =e= ce; const1.. sum(c,x(c)) =l= 1280; const2.. sum(c,x(c)*avg(c)) =e= inc; const3.. sum((c,d),var(c,d)*x(c)*x(d)) =e= sigma; model port using /all/; solve port using nlp maximizing ce;