Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2018
1,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 25.60 KB | None | 0 0
  1. $title Farm Credit and Income Distribution Model (SARF,SEQ=49)
  2.  
  3. $onText
  4. This model evaluates the effects of credit pricing on farm
  5. production mix and technology choice and thus on employment
  6. and income distribution.
  7.  
  8.  
  9. Husain, T, and Inman, R, A Model for Estimating the Effects of Credit
  10. pricing on Farm level employment and income distribution. Tech. rep.,
  11. The World Bank, 1977.
  12.  
  13. Keywords: linear programming, credit pricing, income distribution, agricultural
  14.           economics, farm production
  15. $offText
  16.  
  17. $sTitle Set definitions
  18. Set
  19.    c  'crop commodities'
  20.       / wheat, soy-beans, maize-for, alfalfa, sugar-beet, cotton /
  21.    s  'cropping schedules'           / sch-1*sch-8               /
  22.    w  'irrigation levels'            / normal, stress-1*stress-3 /
  23.    t  'time periods (in fortnights)' / 01*24 /
  24.    g  'agricultural tasks'
  25.       / plough
  26.         disce
  27.         harrow
  28.         spray
  29.         drill
  30.         plant
  31.         fertilize    'spreading'
  32.         cultivate
  33.         beet-lift    'ing'
  34.         mow
  35.         windrow
  36.         bale
  37.         harvest-g    'grain harvesting'
  38.         harvest-f    'forage harvesting'
  39.         harvest-c    'cotton harvesting'
  40.         transport                        /
  41.    mn 'implements and power sources'     /
  42. *       power sources:
  43.         tractor-l    'large'
  44.         tractor-s    'small'
  45.         draft-unit   'pair of oxen'
  46.         self-prop    'self-propelled units'
  47.         manual       'operation'
  48. *       self-propelled units:
  49.         combine-h    'combine harvester'
  50.         forage-h     'forage harvester'
  51.         cotton-p     'self-propelled cotton picker'
  52. *       implements:
  53.         f-plow-6     '5 to 6 furrow plow'
  54.         f-plow-3     '3 furrow plow'
  55.         f-plow-1     '1 furrow plow'
  56.         harrow-o-d   'offset disc harrow'
  57.         harrow-s-t   'spike tooth harrow'
  58.         harrow-s     'small harrow'
  59.         sprayer-l    'large sprayer'
  60.         sprayer-s    'small sprayer'
  61.         drill        'for tractor use'
  62.         drill-s      'small drill'
  63.         planter      'precision planter'
  64.         planter-s    'small precision planter'
  65.         spreader-l   'large fertilizer spreader'
  66.         spreader-s   'small fertilizer spreader'
  67.         cult-l       'large cultivator'
  68.         cult-s       'small cultivator'
  69.         beet-lift    'er'
  70.         mower
  71.         baler
  72.         rake
  73.         trailer-4t   '4 ton trailer'
  74.         trailer-ht   'half ton trailer'
  75.         sprayer-k    'knapsack sprayer for manual operation' /
  76.    m(mn) 'implements'
  77.          / combine-h , forage-h  , cotton-p
  78.            f-plow-6  , f-plow-3  , f-plow-1
  79.            harrow-o-d, harrow-s-t, harrow-s
  80.            sprayer-l , sprayer-s , drill
  81.            drill-s   , planter   , planter-s
  82.            spreader-l, spreader-s, cult-l
  83.            cult-s    , beet-lift , mower
  84.            baler     , rake      , trailer-4t
  85.            trailer-ht, sprayer-k , manual     /
  86.    n(mn) 'power sources'
  87.          / tractor-l, tractor-s, draft-unit, self-prop, manual /
  88.    cposs(c,s)      'crop possibilities'
  89.    taskposs(g,t)   'task possibilities'
  90.    equipposs(mn,t) 'equipment use possibilities'
  91.    cc              'cost classifications in model'
  92.                    / misc-input, water, operating, wages, capital /;
  93.  
  94. $sTitle Data: Task and Technology Data
  95. Table equip(mn,*) 'equipment costs and operating costs'
  96. * cost  : purchase price (1000 rials)
  97. * life  : expected life for amortization of capital cost (years)
  98. * opcost: operating cost (rials / hour)
  99. * avail : hours of utilization available per fortnight (hours)
  100.                    cost  life  opcost  avail
  101.    tractor-l       1000     5     220    140
  102.    tractor-s        540     5     113    140
  103.    draft-unit       100     6      18    100
  104.    combine-h       1500     6     770    140
  105.    forage-h        1500    10    1310    140
  106.    cotton-p        4000     8     770     80
  107.    f-plow-6         140     5      38    140
  108.    f-plow-3         100    10      11    140
  109.    f-plow-1           3     3            100
  110.    harrow-o-d       200     5      54    140
  111.    harrow-s-t        35     8       5    140
  112.    harrow-s           3     3            100
  113.    sprayer-l        112     4      11    140
  114.    sprayer-s         11     3            100
  115.    drill            200     6      72    140
  116.    drill-s           13     3            100
  117.    planter          200     6      46    140
  118.    planter-s         20     3            100
  119.    spreader-l        27     3       5    140
  120.    spreader-s         3     3            100
  121.    cult-l           125     5      30    140
  122.    cult-s            13     3            100
  123.    beet-lift         30    10      25    140
  124.    mower             65     3      15    140
  125.    rake              50     4      12    140
  126.    baler            280     4      70    140
  127.    trailer-4t       180     5      28    140
  128.    trailer-ht        25     5            100
  129.    sprayer-k         11     2             84;
  130.  
  131. Table tech(g,mn,mn) 'task technologies (hours per ha)'
  132. * first index : agricultural task
  133. * second index: implement/tool
  134. * third index : power source
  135. * transport requirements are in hours per ton
  136.                           tractor-l  tractor-s  draft-unit  manual  self-prop
  137.    plough.f-plow-6             2
  138.    plough.f-plow-3             3          3
  139.    plough.f-plow-1                                      45
  140.    disce.harrow-o-d             .6
  141.    disce.harrow-s-t                       1
  142.    disce.harrow-s                                        6
  143.    harrow.harrow-s-t                      1.6
  144.    harrow.harrow-s                                       2
  145.    harrow.manual                                                50
  146.    spray.sprayer-l              .5         .5
  147.    spray.sprayer-s                                       8
  148.    spray.sprayer-k                                               8
  149.    drill.drill                  .5         .5
  150.    drill.drill-s                                         8
  151.    plant.planter               1.5        1.5
  152.    plant.planter-s                                      20
  153.    fertilize.spreader-l        4          4
  154.    fertilize.spreader-s                                  8
  155.    fertilize.manual                                             8
  156.    cultivate.cult-l             .5        1
  157.    cultivate.cult-s                                     20
  158.    cultivate.manual                                             50
  159.    harvest-g.combine-h                                                   1
  160.    harvest-f.forage-h                                                    1.25
  161.    harvest-c.manual                                            504
  162.    harvest-c.cotton-p                                                    1
  163.    beet-lift.beet-lift         2.5        2.5
  164.    beet-lift.manual                                            200
  165.    mow.mower                   1          1
  166.    windrow.rake                 .5         .5
  167.    bale.baler                   .8        2
  168.    transport.trailer-4t         .25        .25
  169.    transport.trailer-ht                                  4                   ;
  170.  
  171. $sTitle Crop Data
  172. Table cropdata(*,c)
  173. * 1. seed, fertilizer, herbicide, pesticide - cost in 1000 rials per ha
  174. * 2. crop-limit - maximum percentage of available land that can be planted in each crop: agrocomic constraint
  175. * 3. trans-adj - transport adustment: reflects different travel distances and waiting times
  176. * 4. price - 1000 rials per ton
  177. * 5. yield - normal yield in metric tons per ha
  178. * 6. water - normal requirements in 1000 cubic meters per ha
  179.                  wheat  soy-beans  maize-for  sugar-beet  alfalfa  cotton
  180.    seed          2.16        1.6        1.05         .9       .2     .375
  181.    fertilize     3.3         2.4        4.2         6.3      2.61   2.25
  182.    herbicide     1.395        .5         .5          .4       .32
  183.    pesticide                                         .4             1.8
  184.    crop-limit    1           1           .15        1         .25   1
  185.    trans-adj      .33         .67        .15         .43      .5    1
  186.    price        10          23.96       1.08        1.8      5     16.47
  187.    yield         3.5         2         60          35       12      3.5
  188.    water         6.44       15.83      11.11       16.83    22.55  14.37 ;
  189.  
  190. Table stress(*,w,c) 'water stress multiplier (proportion)'
  191.                      wheat  soy-beans  maize-for  sugar-beet  alfalfa  cotton
  192.    yield.normal       1          1          1           1        1       1
  193.    water.normal       1          1          1           1        1       1
  194.    yield.stress-1      .98        .95        .98         .94      .95     .96
  195.    water.stress-1      .9         .83        .9          .61      .83     .58
  196.    yield.stress-2      .94        .79        .94         .89      .79     .71
  197.    water.stress-2      .8         .55        .8          .38      .55     .25
  198.    yield.stress-3      .75        .53        .75         .83      .53
  199.    water.stress-3      .5         .28        .5          .23      .28        ;
  200.  
  201. Table  cs(c,*,s) 'time periods (fortnight) when cropping schedules start and end'
  202.                       sch-1  sch-2  sch-3  sch-4  sch-5  sch-6  sch-7  sch-8
  203.    wheat.start           13     14     15     16     17     17     17
  204.    wheat.end             11     12     13     13     13     11     11
  205.    soy-beans.start       23     23     23      1      2      5      6
  206.    soy-beans.end         16     16     16     17     17     17     16
  207.    maize-for.start       12     12     13     13     13     12     13
  208.    maize-for.end         19     20     19     20     20     20     20
  209.    alfalfa.start         23     24      1      2      3      4      5      6
  210.    alfalfa.end           19     19     19     19     19     19     19     19
  211.    sugar-beet.start      24      1      2      3      3      3
  212.    sugar-beet.end        21     21     21     22     22     23
  213.    cotton.start           3      4      5      6      6      3      5
  214.    cotton.end            16     17     17     17     19     20     16       ;
  215.  
  216. Table atask(c,g,s) 'time periods when a unit of agricultural task is to be performed (per ha)'
  217. * table atask specifies the time periods when various agricultural activities for each crop and according to the
  218. * schedule are required.  the first and last periods during which cultivation must take place are given.
  219.                                       sch-1  sch-2  sch-3  sch-4  sch-5  sch-6  sch-7  sch-8
  220.    wheat.plough                          13     14     15     16     17     17     17
  221.    wheat.disce                           14     15     16     17     18     17     18
  222.    wheat.(harrow,spray)                  18     19     19     20     20     18     18
  223.    wheat.fertilize                        6      7      7      7      7      6      6
  224.    wheat.drill                           19     20     21     21     21     19     19
  225.    wheat.(harvest-g,bale,transport)      11     12     13     13     13     11     11
  226.    soy-beans.plough                      23     23     23      1      2      5      6
  227.    soy-beans.(disce,harrow,spray)         4      5      6      4      4      6      6
  228.    soy-beans.drill                        7      7      7      8      8      8      7
  229.    soy-beans.cultivate                    9      9      9     10     10     10      9
  230.    soy-beans.fertilize                    5      6      6      5      5      6      6
  231.    soy-beans.(harvest-g,transport)       16     16     16     17     17     17     16
  232.    maize-for.disce                       12     12     13     13     13     12     13
  233.    maize-for.plant                       13     14     13     14     14     14     13
  234.    maize-for.spray                       14     15     14     15     16     15     14
  235.    maize-for.cultivate                   15     16     15     16     16     16     15
  236.    maize-for.fertilize                   16     17     16     17     16     16     16
  237.    maize-for.harvest-f                   19     20     19     20     20     20     19
  238.    maize-for.transport                   19     20     19     20     20     20     20
  239.    cotton.plough                          3      4      5      6      6      3      5
  240.    cotton.disce                           4      5      6      7      7      4      7
  241.    cotton.plant                           8      9      8      8      9      9      8
  242.    alfalfa.plough                        23     24      1      2      3      4      5      6
  243.    alfalfa.(disce,harrow)                 6      6      6      7      7      6      7      6
  244.    alfalfa.drill                          9      9      9      9     10     10     10     10
  245.    sugar-beet.plough                     24      1      2      3      3      3
  246.    sugar-beet.disce                       1      2      3      4      4      4
  247.    sugar-beet.plant                       4      4      4      5      5      6
  248.    sugar-beet.fertilize                   6      6      6      7      7      7              ;
  249.  
  250. Table btask(c,g,s,t) 'task requirements according to crop and schedule (per ha)'
  251.                                                     01     02    03    04    05    06    07    08
  252.    alfalfa.(fertilize,spray).(sch-1*sch-4)                                          1
  253.    alfalfa.(fertilize,spray).(sch-5*sch-8)                                                1
  254.    sugar-beet.harrow.sch-1                                        1                       1
  255.    sugar-beet.harrow.(sch-2*sch-4)                                      1                 1
  256.    sugar-beet.harrow.(sch-5,sch-6)                                            1           1
  257.    sugar-beet.cultivate.(sch-1*sch-3)                                               1           1
  258.    sugar-beet.cultivate.(sch-4,sch-5)                                                     1
  259.    sugar-beet.cultivate.sch-6                                                                   1
  260.    sugar-beet.spray.(sch-1,sch-3)                                 1
  261.    sugar-beet.spray.(sch-2,sch-4)                                       1
  262.    sugar-beet.spray.(sch-5,sch-6)                                             1
  263.  
  264.    +                                                09     10    11    12    13    14    15    16
  265.    alfalfa.(fertilize,spray).(sch-1*sch-8)                                    1     1           1
  266.    alfalfa.(mow,windrow,bale).(sch-1*sch-8)                             1           1     1
  267.    alfalfa.transport.(sch-1*sch-8)                                      0.2         0.2   0.2
  268.    sugar-beet.cultivate.(sch-4,sch-5)                1
  269.    sugar-beet.cultivate.sch-6                               1
  270.    sugar-beet.spray.(sch-1*sch-3)                    1      1     1                 1     1     1
  271.    sugar-beet.spray.(sch-4,sch-5)                           1     1     1     1           1     1
  272.    sugar-beet.spray.sch-6                                         1     1     1     1     1     1
  273.    cotton.cultivate.(sch-1*sch-7)                                 1     1
  274.    cotton.spray.(sch-1,sch-3,sch-4,sch-7)                   1     1     1     1     1     1
  275.    cotton.spray.sch-2                                             1     1     1     1     1     1
  276.    cotton.spray.sch-5                                       1     1     1     1                 1
  277.    cotton.spray.sch-6                                             1     1     1                 1
  278.    cotton.(harvest-c,transport).(sch-1,sch-7)                                                   1
  279.    cotton.(harvest-c,transport).(sch-3,sch-4)                                                   0.5
  280.  
  281.    +                                                17     18    19    20    21    22    23   24
  282.    alfalfa.(fertilize,spray).(sch-1*sch-8)                  1
  283.    alfalfa.(mow,windrow,bale).(sch-1*sch-8)          1            1
  284.    alfalfa.transport.(sch-1*sch-8)                   0.2          0.2
  285.    sugar-beet.(beet-lift,transport).(sch-1*sch-3)                       .5    .5
  286.    sugar-beet.(beet-lift,transport).(sch-4,sch-5)                             .5    .5
  287.    sugar-beet.(beet-lift,transport).sch-6                                           .5    .5
  288.    cotton.spray.sch-5                                       1
  289.    cotton.spray.sch-6                                       1     1
  290.    cotton.(harvest-c,transport).sch-2                1
  291.    cotton.(harvest-c,transport).(sch-3,sch-4)        0.5
  292.    cotton.(harvest-c,transport).sch-5                0.34   0.33  0.33
  293.    cotton.(harvest-c,transport).sch-6                 .25    .25   .25  .25                        ;
  294.  
  295. Table lreq(c,s,t) 'labor requirements (hours per fortnight)'
  296.                                          01    02    03     04     05    06    07    08
  297.    wheat.(sch-1,sch-6,sch-7)                                              2
  298.    wheat.(sch-2*sch-5)                                                          2
  299.    soy-beans.(sch-1,sch-4,sch-5)                                   20
  300.    soy-beans.(sch-2,sch-3,sch-6,sch-7)                                   20
  301.    sugar-beet.(sch-1*sch-3)                                              26           6
  302.    sugar-beet.(sch-4,sch-5)                                                    26
  303.    sugar-beet.sch-6                                                                  26
  304.  
  305.    +                                     09    10    11     12     13    14    15    16
  306.    wheat.(sch-1,sch-6,sch-7)                          2
  307.    wheat.sch-2                                               2
  308.    wheat.(sch-3*sch-5)                                              2
  309.    soy-beans.(sch-1*sch-3,sch-7)                                                      1
  310.    maize-for.(sch-1,sch-3,sch-5*sch-7)                                                8
  311.    sugar-beet.(sch-4,sch-5)               6
  312.    sugar-beet.sch-6                            6
  313.    cotton.(sch-1,sch-7)                        1.3   11.05  11.05   1.3   1.3   1.3  11.7
  314.    cotton.sch-2                                      11.05  11.05   1.3   1.3   1.3   1.3
  315.    cotton.(sch-3,sch-4)                        1.3   11.05  11.05   1.3   1.3   1.3  5.85
  316.    cotton.sch-5                                1.3   11.05  11.05   1.3               1.3
  317.    cotton.sch-6                                      11.05  11.05   1.3               1.3
  318.  
  319.    +                                     17    18    19      20     21    22    23    24
  320.    soy-beans.(sch-4*sch-6)                1
  321.    maize-for.(sch-2,sch-4)                8
  322.    sugar-beet.(sch-1*sch-3)                                16.5   16.5
  323.    sugar-beet.(sch-4,sch-5)                                       16.5  16.5
  324.    sugar-beet.sch-6                                                     16.5  16.5
  325.    cotton.sch-2                          11.7
  326.    cotton.(sch-3,sch-4)                   5.85
  327.    cotton.sch-5                           3.9   5.2   3.9
  328.    cotton.sch-6                           2.93  4.23  4.23  2.93                         ;
  329.  
  330. Scalar
  331.    rho       'interest rate'                                    /     .04  /
  332.    land      'farm size                                  (ha)'  / 1600     /
  333.    lcost     'labor cost             (1000 rials per man-day)'  /     .135 /
  334.    watercost 'water cost (rials per 1000 cubic meters per ha)'  /     .267 /
  335.    hrtoday   'hours in a man-day'                               /    6     /;
  336.  
  337. Parameter
  338.    oc(g,mn,mn)   'operating costs                                        (1000 rials per ha)'
  339.    avail(mn)     'equipment avaialbility                (hours of utilization per fortnight)'
  340.    life(mn)      'expected life of equipment                                         (years)'
  341.    crf(mn)       'capital recovery factor'
  342.    cap(mn)       'amortized capital cost                                        (1000 rials)'
  343.    pmisc(c)      'cost of inputs - seed pesticide herbicide & fertilizer (1000 rials per ha)'
  344.    pcrop(c)      'price of agricultural commodities                     (1000 rials per ton)'
  345.    yield(c,w)    'crop yields along yield-water curve                   (metric tons per ha)'
  346.    water(c,w)    'water requirements along yield-water curve      (1000 cubic meters per ha)'
  347.    length(c,s)   'length of cropping season for crop under schedule             (fortnights)'
  348.    luse(c,t,s)   'land use possibilities'
  349.    treq(g,t,c,s) 'agricultural tasks requirements'
  350.    agrol(c)      'agronomic constraints                                                 (ha)';
  351.  
  352. oc(g,m,n)  = (equip(m,"opcost") + equip(n,"opcost"))*tech(g,m,n)/1000;
  353. avail(mn)  = equip(mn,"avail");
  354. life(mn)   = equip(mn,"life");
  355. pmisc(c)   = cropdata("seed",c) + cropdata("fertilize",c) + cropdata("pesticide",c) + cropdata("herbicide",c);
  356. pcrop(c)   = cropdata("price",c);
  357. yield(c,w) = cropdata("yield",c)*stress("yield",w,c);
  358. water(c,w) = cropdata("water",c)*stress("water",w,c);
  359. agrol(c)   = land*cropdata("crop-limit",c);
  360.  
  361. crf(mn)$equip(mn,"life") = rho*(1 + rho)**equip(mn,"life")/((1 + rho)**equip(mn,"life") - 1);
  362. cap(mn) = crf(mn)*equip(mn,"cost");
  363.  
  364. length(c,s)$cs(c,"start",s) = mod(card(t) + cs(c,"end",s) - cs(c,"start",s),card(t)) + 1;
  365. luse(c,t++(cs(c,"start",s)-1),s) = 1$(ord(t) <= length(c,s));
  366.  
  367. treq(g,t,c,s) = 1$(atask(c,g,s) = ord(t)) + btask(c,g,s,t);
  368. treq("transport",t,c,s) = treq("transport",t,c,s)*cropdata("trans-adj",c)*yield(c,"normal");
  369.  
  370. cposs(c,s)    = yes$length(c,s);
  371. taskposs(g,t) = sum((c,s), yes$treq(g,t,c,s));
  372.  
  373. * special adjustments for cotton picking:
  374. Parameter
  375.    tadj(g) 'extra tasks required for mechanical cotton picking (units per ha)' / spray 1 /
  376.    loss(c) 'product loss from mechanical cotton picking';
  377.  
  378. loss("cotton")      = .2*yield("cotton","normal");
  379. taskposs("spray",t) = taskposs("spray",t) + taskposs("harvest-c",t);
  380.  
  381. equipposs(m,t) = yes$(sum((g,n)$taskposs(g,t), tech(g,m,n))  <> 0);
  382. equipposs(n,t) = yes$(sum((g,m)$equipposs(m,t), tech(g,m,n)) <> 0);
  383. equipposs("self-prop",t) = no;
  384. equipposs("manual",t)    = no;
  385.  
  386. display lreq , cposs, taskposs, equipposs, oc   , avail, life, pmisc, cap
  387.         pcrop, loss , yield   , water    ,length, luse , treq, crf;
  388.  
  389. $sTitle Model Definition
  390. Variable
  391.    xcrop(c,s)      'cropping schedules                                      (ha)'
  392.    xwater(c,w)     'cropping by irrigation level                            (ha)'
  393.    awater          'annual water requirements             (million cubic meters)'
  394.    task(g,t,mn,mn) 'agricultural tasks by technology                        (ha)'
  395.    sales(c)        'sales of agricultural commodities                     (tons)'
  396.    equipp(mn)      'equipment purchases                                  (units)'
  397.    emply(t)        'employment                                        (man-days)'
  398.    revenue         'from crop sales                                 (1000 rials)'
  399.    cost(cc)        'cost of cropping activities                     (1000 rials)'
  400.    profit          'objective function                              (1000 rials)';
  401.  
  402. Positive Variable xcrop, xwater, task, sales, equipp, emply, revenue, cost;
  403.  
  404. Equation
  405.    cbal(c)         'commodity balance                                     (tons)'
  406.    tbal(g,t)       'task balance                                            (ha)'
  407.    cropd(c)        'crop-water balance                                      (ha)'
  408.    waterd          'annual water requirement definition   (million cubic meters)'
  409.    agroc(c)        'agronomic constraints                                   (ha)'
  410.    landc(t)        'land constraints                                        (ha)'
  411.    labor(t)        'labor requirements                                (man-days)'
  412.    equipb1(mn,t)   'equipment balance for implements                      (unit)'
  413.    equipb2(mn,t)   'equipment balance for power sources                   (unit)'
  414.    arev            'accounting: revenue                             (1000 rials)'
  415.    acost1          'accounting: cost of miscellaneous inputs        (1000 rials)'
  416.    acost2          'accounting: cost of water                       (1000 rials)'
  417.    acost3          'accounting: operating cost                      (1000 rials)'
  418.    acost4          'accounting: capital charges                     (1000 rials)'
  419.    acost5          'accounting: cost of labor                       (1000 rials)'
  420.    obj             'objective function                              (1000 rials)';
  421.  
  422. cbal(c)..
  423.    sales(c) =e= sum(w, yield(c,w)*xwater(c,w))
  424.              -  loss(c)*sum(t$taskposs("harvest-c",t), task("harvest-c",t,"cotton-p","self-prop"));
  425.  
  426. tbal(g,t)$taskposs(g,t)..
  427.    sum((c,s)$cposs(c,s), treq(g,t,c,s)*xcrop(c,s)) =e= sum((m,n)$tech(g,m,n), task(g,t,m,n))
  428.                                                     -  tadj(g)*task("harvest-c",t,"cotton-p","self-prop");
  429.  
  430. cropd(c)..  sum(s$cposs(c,s), xcrop(c,s)) =e= sum(w$yield(c,w), xwater(c,w));
  431.  
  432. waterd..    awater =e= sum((c,w), water(c,w)*xwater(c,w))/1000;
  433.  
  434. agroc(c)..  sum(s$cposs(c,s), xcrop(c,s)) =l= agrol(c);
  435.  
  436. landc(t)..  sum((c,s)$cposs(c,s), luse(c,t,s)*xcrop(c,s)) =l= land;
  437.  
  438. labor(t)..  sum((c,s)$cposs(c,s), lreq(c,s,t)*xcrop(c,s))
  439.          +  sum((g,m,n)$taskposs(g,t), tech(g,m,n)*task(g,t,m,n))
  440.         =l= hrtoday*emply(t);
  441.  
  442. equipb1(m,t)$equipposs(m,t)..
  443.    sum((g,n)$taskposs(g,t), tech(g,m,n)*task(g,t,m,n)) =l= avail(m)*equipp(m);
  444.  
  445. equipb2(n,t)$equipposs(n,t)..
  446.    sum((g,m)$taskposs(g,t), tech(g,m,n)*task(g,t,m,n)) =l= avail(n)*equipp(n);
  447.  
  448. arev..   revenue =e= sum(c, pcrop(c)*sales(c));
  449.  
  450. acost1.. cost("misc-input") =e= sum(c, pmisc(c)*sum(s$cposs(c,s), xcrop(c,s)));
  451.  
  452. acost2.. cost("water") =e= watercost*awater;
  453.  
  454. acost3.. cost("operating") =e= sum((g,t,m,n)$taskposs(g,t), oc(g,m,n)*task(g,t,m,n));
  455.  
  456. acost4.. cost("capital") =e= sum(mn, cap(mn)*equipp(mn));
  457.  
  458. acost5.. cost("wages")   =e= lcost*sum(t, emply(t));
  459.  
  460. obj..    profit =e= revenue - sum(cc, cost(cc));
  461.  
  462. Model iran / all /;
  463.  
  464. sales.lo("wheat") = 875;
  465. awater.up         =  21.73;
  466.  
  467. option iterLim = 5000;
  468.  
  469. solve iran maximizing profit using lp;
  470.  
  471. display xcrop.l, xwater.l;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement