Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Not enough precision for nutrition info?

Help
2011-11-14
2013-05-14
  • Andy Graybeal
    Andy Graybeal
    2011-11-14

    We would like to use your program at our restaurant to get nutritional information and you helped us out before in the past with the same general issue.  Our issue is a little different this time around, we assume at least. Generally speaking, we can nest recipes within recipes and get proper nutritional information.  The specific issue we are running into is when our first recipe's serving size is very large and the amount we are putting into the second recipe is fairly small.  The amount of precision we get doesn't end up giving us the correct nutrition info.  Maybe there is rounding problem or not enough precision and throwing the nutritional info off somehow.  I don't know, i'm guessing.

    We are using Ubuntu 11.10 and Gourmet 0.15.9 (if it would be helpful we can switch to whichever o/s, gourmet version that you want)

    We tried 2 sets of 3 recipes.

    For example, if we have a recipe with 320 servings and use 1.5 servings of that recipe in another recipe it appears to not work correctly.  But if we keep it simple with a small number servings, ie the recipe has 2 servings and we have 1 serving of that recipe into a second, nesting the three recipes seems to work fine.

    Our first set of three recipes are:  "brine", "brined jalapenos" and "soup".  These are real recipes we use in the house.

    There's 2 "brine" recipes worth of "brine" added in the "brined jalapenos" recipe.  The "brined Jalepenos" recipe makes 320 servings. and there's 1.5 servings of the "brined jalapenos" recipe in the "soup" recipe (which means there's indirectly "brine" in soup, too).  The soup recipe totals to 24 servings.

    We are estimating that we should have about 1 calorie from "brined jalapenos" per serving of soup, but it says there's 58.

    We added 'brine' and 'brined jalepenos' to the nutritional database hoping this would help but it didn't seem to.

    The second set of three recipes is: "flour and water", "salt and onions", and "onion gravy"  - this is a nonsense recipe for test purposes only.  We are putting the "flour and water" recipe into the "salt and onion" recipe, which then goes into the "onion gravy" recipe.

    We were changing the serving size of 'salt and onions' from 320 to 2 as a way to test.  When the 'salt and onions' recipe serving size was 2 and 1 serving was added to the 'onion gravy' recipe everything worked.  But when the serving size for 'salt and onions' was 320 and we added 1.5 servings to the 'onion gravy' the nutritional information was incorrect.

    As I think back, maybe we made it a more complicated than it should have been, and simply focused on two recipes.. changing the serving size from 320 to 2.

    Another thing, I'm noticing that when we exported this and re-imported it, it didn't keep the nutritional information. I see the setting "Include nutritional information in print-outs and exports" was checked when we exported it.  I'm sad that you won't be able to see the nutritional information I'm talking about.

    Thanks for all your help.

    Andy

     
  • Andy Graybeal
    Andy Graybeal
    2011-11-16

    I forgot to add the recipes, realized it when I was in bed last night!

    Here is the contents of michandy.xml, the exported db from the recipes, so you can experiment with them.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE gourmetDoc>
    <gourmetDoc>
    <recipe id="1">
    <title>
    Brine
    </title>
    <yields>
    16 cups
    </yields>
    <ingredient-list>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    gallon
    </unit>
    <item>
    White Vinegar
    </item>
    <key>
    White Vinegar
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    c
    </unit>
    <item>
    Kosher Salt
    </item>
    <key>
    Kosher Salt
    </key>
    </ingredient>
    </ingredient-list>
    </recipe>
    <recipe id="2">
    <title>
    Brined Jalapenos
    </title>
    <yields>
    320 servings
    </yields>
    <ingredient-list>
    <ingref amount="2" refid="1">
    Brine
    </ingref>
    <ingredient>
    <amount>
    28
    </amount>
    <unit>
    lbs
    </unit>
    <item>
    Jalapenos
    </item>
    <key>
    Jalapenos
    </key>
    </ingredient>
    </ingredient-list>
    </recipe>
    <recipe id="5">
    <title>
    Flour &amp; Water
    </title>
    <yields>
    20 servings
    </yields>
    <ingredient-list>
    <ingredient>
    <amount>
    10
    </amount>
    <unit>
    c
    </unit>
    <item>
    flour
    </item>
    <key>
    flour
    </key>
    </ingredient>
    <ingredient>
    <amount>
    10
    </amount>
    <unit>
    c
    </unit>
    <item>
    water
    </item>
    <key>
    water
    </key>
    </ingredient>
    </ingredient-list>
    </recipe>
    <recipe id="7">
    <title>
    Onion Gravy
    </title>
    <yields>
    10 servings
    </yields>
    <ingredient-list>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    gal
    </unit>
    <item>
    milk
    </item>
    <key>
    milk
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    lb
    </unit>
    <item>
    butter
    </item>
    <key>
    butter
    </key>
    </ingredient>
    <ingref amount="0" refid="6">
    Salt &amp; Onion
    </ingref>
    </ingredient-list>
    </recipe>
    <recipe id="6">
    <title>
    Salt &amp; Onion
    </title>
    <yields>
    320 servings
    </yields>
    <ingredient-list>
    <ingredient>
    <amount>
    10
    </amount>
    <unit>
    c
    </unit>
    <item>
    onion
    </item>
    <key>
    onion
    </key>
    </ingredient>
    <ingredient>
    <amount>
    10
    </amount>
    <unit>
    c
    </unit>
    <item>
    salt
    </item>
    <key>
    salt
    </key>
    </ingredient>
    <ingref amount="1" refid="5">
    Flour &amp; Water
    </ingref>
    </ingredient-list>
    </recipe>
    <recipe id="3">
    <title>
    Soup
    </title>
    <yields>
    24 servings
    </yields>
    <ingredient-list>
    <ingredient>
    <amount>
    4
    </amount>
    <unit>
    qt
    </unit>
    <item>
    Water
    </item>
    <key>
    Water
    </key>
    </ingredient>
    <ingredient>
    <amount>
    27
    </amount>
    <unit>
    oz
    </unit>
    <item>
    Coconut Milk
    </item>
    <key>
    Coconut Milk
    </key>
    </ingredient>
    <ingredient>
    <amount>
    2
    </amount>
    <unit>
    c
    </unit>
    <item>
    Black Beans, cooked
    </item>
    <key>
    Black Beans, cooked
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    c
    </unit>
    <item>
    Carrot
    </item>
    <key>
    Carrot
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    c
    </unit>
    <item>
    Onion
    </item>
    <key>
    Onion
    </key>
    </ingredient>
    <ingredient>
    <amount>
    2
    </amount>
    <unit>
    Tbs
    </unit>
    <item>
    Olive Oil
    </item>
    <key>
    Olive Oil
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1/2
    </amount>
    <unit>
    c
    </unit>
    <item>
    Vegetable Stock
    </item>
    <key>
    Vegetable Stock
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <item>
    Lime
    </item>
    <key>
    Lime
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    c
    </unit>
    <item>
    Corn
    </item>
    <key>
    Corn
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    c
    </unit>
    <item>
    Tomatoes
    </item>
    <key>
    Tomatoes
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1/2
    </amount>
    <unit>
    c
    </unit>
    <item>
    Green Onion
    </item>
    <key>
    Green Onion
    </key>
    </ingredient>
    <ingredient>
    <amount>
    3/4
    </amount>
    <unit>
    Tbs
    </unit>
    <item>
    Paprika
    </item>
    <key>
    Paprika
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    tsp
    </unit>
    <item>
    Sea Salt
    </item>
    <key>
    Sea Salt
    </key>
    </ingredient>
    <ingredient>
    <amount>
    2/3
    </amount>
    <unit>
    c
    </unit>
    <item>
    Cilantro, fresh
    </item>
    <key>
    Cilantro, fresh
    </key>
    </ingredient>
    <ingredient>
    <amount>
    1
    </amount>
    <unit>
    Tbs
    </unit>
    <item>
    Cumin
    </item>
    <key>
    Cumin
    </key>
    </ingredient>
    <ingref amount="0" refid="2">
    Brined Jalapenos
    </ingref>
    </ingredient-list>
    </recipe>
    </gourmetDoc>