CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Algorithm Ecofarm

    For the course 'Applications in operations research' we have to solve a case. This is the case:

    Suppose you want to make a career switch and start a biological farm, where you would like to grow a large range of vegetables. You first search for a piece of land perfect for its purpose and, after some market research, you decide which vegetables and how much of each kind of vegetable you will produce. At that point in time, you have to decide where you will sow the different plants and you will notice that the operations research course you followed in a previous live comes in handy. Given that you want to be ecological, there are certain rules to be followed. You will divide your land into different patches. One patch can only be used for vegetables that belong to the same family, e.g. cabbages, greens, carrots,…are different families. Depending on the family, the required fertilization of the soil differs. Reserving one patch for one family, prevents over-fertilization of the soil. Further, every year, the use of the patches needs to be changed in order to prevent diseases to survive and over-utilization of the soil, without the use of poison.
    The resulting problem is the following. You are given a number of patches; each patch has a given size. Further, you have a set of vegetables, for each vegetable you know the family it belongs to and the amount you want to grow. For each combination of patch and vegetable you are given a score, representing the suitability of the patch for the vegetable. This score depends on what has grown on the patch the previous year, the amount of sunshine, etc. The goal is to assign the vegetables to the patches, such that only vegetables of the same family are together on a patch and such that the total suitability is maximized.

    First we have to find a mathematical model consisting of the objective function and constraints. After we found that we need to find a specific algorithm in order to get a possible solution. I was thinking, since we need the highest possible score, first to take the highest score, then find another vegetable (from the same family) with the second highest score (if size isn't too big for the patch, otherwise take vegetable with 3rd highest score etc.), if vegetables have same score, take the one with the lowest size requirements, the more vegetables that can be added to the patch, the higher the score we will get.

    What do you think? Am I on the correct way?

  2. #2
    Join Date
    May 2009
    Posts
    2,413

    Re: Algorithm Ecofarm

    Quote Originally Posted by VanDerGijp View Post
    What do you think? Am I on the correct way?
    Well, you seem to try an ad-hoc strategy but I think you should use a more formal approach applying what you've learned in the course. The goal is to identify the problem as a standard problem or try to mold it into one, because then you can solve it directly using a standard algorithm. The exercise mentions "assign" and I think you should consider that a hint.
    Last edited by nuzzle; November 7th, 2012 at 03:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured