Dinner Matrix

Dinner Matrix

Everyone has their go-to meals; those quick easy dishes that you fall back on week after week. For Jen and me it’s Zucchini Pasta, chicken tacos, and cashew chicken stirfry. But as someone who loves to try new dishes, I want to make sure that sprinkled in between these sustenance staples is some culinary creativity.

But Wait! How do we choose what to eat each week? For us it’s mostly random, perhaps influenced slightly by the weekly sales circular. This doesn’t seem right to me. We need a more strategic approach.

Enter Excel.

Jen and I made a list of all the dishes that we frequently duplicate. Not just our go-to’s but all of our favorites. We then rated each across three criteria:
Ease, Health, and Deliciousness

I charted these on a 3-Axis chart (z-axis is deliciousness rated from 1-3)

3DFood1

3DFood

Honestly, not too many surprises here. We don’t bother making really complicated food unless it’s delicious. And the more delicious the food the higher tendency for an unhealthy experience.

While this chart in itself is not a solution to perfect planning, it allows us to balance a week of dinner choices across this scale. We next have to create a series of constraints.

1. Weekday eating shouldn’t be more complicated than ‘tricky’
2. Only 10% of meals can fall into the unhealthy or fatty range
3. No dish can be made more than once per week
4. Deliciousness must be maximized

I was working on a linear program for a bit, trying to have Excel’s solver define for us the best dinner solution. But for the life of me I couldn’t quite get the constraints right.

I’m losing my touch.

17 thoughts on “Dinner Matrix

  • 9/26/2014 at 3:05 am
    Permalink

    It’s not a linear regression, it’s a linear program (or depending on your variables, an integer program), and there are some missing constraints.

    5. You’re not bulimic

    but constraint 4, should guide your objective.

    Reply
    • 9/26/2014 at 3:41 am
      Permalink

      It is definitely not convex, but here is CVX code for a convex relaxation (mostly, it’s 3am, and I couldn’t reason about the exact value for 10% unhealthy constraint, so I picked a number that maximized variety)

      d = [1; 2; 2; 2; 1; 1; 3; 2; 2; 3; 3; 3; 2; 3; 3; 2; 3; 3; 3];
      c = [0; 0; 0; 0; 1; 2; 2; 2; 3; 3; 4; 4; 4; 5; 5; 6; 6; 7; 7]+1;
      h = [3; 2; 1; 0; 2; 3; 2; 1; 2; 0; 2; 1; 0; 2; 1; 1; 0; 1; 0]+1;
      m = length(d);

      cvx_begin
      variable M(m,7)
      maximize( sum(d’*M) )

      sum(M)==1
      sum(M’)=0
      (c’*M)=17
      cvx_end

      it yeilds the following solution
      S M T W R F A
      M1 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M2 0.0203 0.0583 0.0583 0.0583 0.0583 0.0583 0.0203
      M3 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M5 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M6 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M7 0.0397 0.1841 0.1841 0.1841 0.1841 0.1841 0.0397
      M8 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M9 0.0197 0.0257 0.0257 0.0257 0.0257 0.0257 0.0197
      M10 0.0244 0.0350 0.0350 0.0350 0.0350 0.0350 0.0244
      M11 0.0868 0.1653 0.1653 0.1653 0.1653 0.1653 0.0868
      M12 0.0621 0.1751 0.1751 0.1751 0.1751 0.1751 0.0621
      M13 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M14 0.1755 0.1298 0.1298 0.1298 0.1298 0.1298 0.1755
      M15 0.1355 0.1458 0.1458 0.1458 0.1458 0.1458 0.1355
      M16 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
      M17 0.0237 0.0194 0.0194 0.0194 0.0194 0.0194 0.0237
      M18 0.3887 0.0445 0.0445 0.0445 0.0445 0.0445 0.3887
      M19 0.0236 0.0169 0.0169 0.0169 0.0169 0.0169 0.0236

      Reply
      • 9/26/2014 at 3:42 am
        Permalink

        That could have used some formatting tags

        Reply
      • 9/26/2014 at 12:01 pm
        Permalink

        I deeply appreciate your efforts. Now why were you working on this at 3am?

        The only thing I think would have to change is to make the values integers. Unless I’m misinterpreting your data, this would suggest on Monday we should consume 0.0203% M2 for dinner?

        We could of course just look at this as percentage, but that would only satisfy the long term rules not the short term ones.

        Or am I looking at that incorrectly?

        Reply
        • 9/26/2014 at 12:35 pm
          Permalink

          I was preparing a demo for a design review until like 1am, and then couldn’t fall sleep.

          Yeah, these numbers are percentages/probabilities. This was done for two reasons, CVX is a tool for solving convex problems, and integer programming is not convex (and is NP-hard), as well you have more than 7 meals, so planning one week’s worth of meals is awkward, I would suggest using these daily distributions to generate your weekly meal plan

          I also played around with the constraints some, and produced a more varied menu.


          d = [1; 2; 2; 2; 1; 1; 3; 2; 2; 3; 3; 3; 2; 3; 3; 2; 3; 3; 3];
          c = [0; 0; 0; 0; 1; 2; 2; 2; 3; 3; 4; 4; 4; 5; 5; 6; 6; 7; 7]+1;
          h = [3; 2; 1; 0; 2; 3; 2; 1; 2; 0; 2; 1; 0; 2; 1; 1; 0; 1; 0]+1;
          m = length(d);

          cvx_begin
          variable M(m,7)
          maximize( sum(d'*M)) % Maximize deliciousness

          sum(M)==1 % You eat every day
          sum(M')=0 % You are not bulimic
          (c'*M)=15 % some minimum of health
          cvx_end

          The menu, same headings as above, but I’m lazy

          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.0000 0.0454 0.0454 0.0454 0.0454 0.0454 0.0000
          0.0000 0.0396 0.0396 0.0396 0.0396 0.0396 0.0000
          0.0000 0.0350 0.0350 0.0350 0.0350 0.0350 0.0000
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.0000 0.2000 0.2000 0.2000 0.2000 0.2000 0.0000
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.0000 0.2000 0.2000 0.2000 0.2000 0.2000 0.0000
          0.0000 0.2000 0.2000 0.2000 0.2000 0.2000 0.0000
          0.0000 0.2000 0.2000 0.2000 0.2000 0.2000 0.0000
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.2854 0.0410 0.0410 0.0410 0.0410 0.0410 0.2854
          0.2106 0.0390 0.0390 0.0390 0.0390 0.0390 0.2106
          0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
          0.1460 0.0000 0.0000 0.0000 0.0000 0.0000 0.1460
          0.2168 0.0000 0.0000 0.0000 0.0000 0.0000 0.2168
          0.1413 0.0000 0.0000 0.0000 0.0000 0.0000 0.1413

          Reply
          • 9/26/2014 at 12:36 pm
            Permalink

            Your code tag should honor white space

          • 9/26/2014 at 2:16 pm
            Permalink

            WordPress ate a few of the constraints with >’s and <'s in them.

          • 9/26/2014 at 2:18 pm
            Permalink


            cvx_begin
            variable M(m,7)
            maximize( sum(d'*M)) % Maximize deliciousness

            sum(M) == 1 % You eat every day
            M >= 0 % You are not bulimic
            sum(h'*M) >= 15 % some minimum of health
            sum(M') &lt= 1 % There is variety

            (c'*M) &lt= [10;4;4;4;4;4;10]' % Easier meals on weekdays

            cvx_end

          • 9/26/2014 at 2:22 pm
            Permalink

            one more time?

            cvx_begin
            variable M(m,7)
            maximize( sum(d'*M)) % Maximize deliciousness

            sum(M) == 1 % You eat every day
            M >= 0 % You are not bulimic
            sum(h'*M) >= 15 % some minimum of health
            sum(M') <= 1 % There is variety
            (c'*M) <= [10;4;4;4;4;4;10]' % Easier meals on weekdays

            cvx_end

  • 9/26/2014 at 1:22 pm
    Permalink

    You know all these graphs are interesting, but I’d actually rather just look at your list of meals that you like to make? I love seeing other peoples meal planning lists.

    Reply
    • 9/26/2014 at 2:34 pm
      Permalink

      I agree with Mykal – in fact, we should just list off our favorite staple meals and then we’ll have some new ideas!

      Here’s what Ryan and I eat all the time, with a big serving of salad:

      Chicken or beef Tacos
      (made with any of these awesome, preservative-free sauces created by Rick Bayless and homemade flour tortillas)

      Awesome pasta sauce with many hidden veggies on gnocchi or pasta
      (with eggplant, onion, zucchini, squash, carrots, ground beef and 1 can crushed tomatoes, 1 can tomato sauce)

      Spaghetti and homemade meatballs
      (made with ground beef, egg, breadcrumbs, garlic, salt and pepper in the kitchen aid mixer, and baked at 400 for 25 mins)

      Roasted chicken thighs with beets and potatoes
      (usually the only seasoning I use is salt and garlic powder, not the huge list in the recipe)

      The taco meat, tortilla dough, spaghetti sauce and meatballs can be made in large batches and frozen in your food time machine for future meals. I use pasture raised grass-fed beef, organic veggies and whole wheat flour to up the health factor a little

      Reply
  • 9/26/2014 at 7:23 pm
    Permalink

    Mykal, the boys are nerds. What do you expect?? I would happily share with you a complete list of our favorite meals, but I can’t make sense of Mike’s crazy Excel spreadsheets. I can tell you our favorites include a lot of stir-fry variations, pasta combinations (including using zucchini as pasta), more complex and time consuming favorites such as lasagna with homemade spinach noodles or chicken pot pie, chili during football season, slow-cooker chicken tacos, and some others which I can’t remember at the moment. This weekend we plan to make some yummy homemade dumplings in the bamboo steamer!

    Reply
  • 9/26/2014 at 8:43 pm
    Permalink

    Thank you, Mykal!

    My original reaction was, “huh?”

    As Mykal says, the graph is pretty, but what are the meals?

    I am particularly interested in the easy unhealthy ones…

    Reply
  • 9/27/2014 at 12:45 pm
    Permalink

    Easy meals around our house are:

    -sloppy joes (we do a homemade sauce not from a can)
    -tacos, we’ve been using the Penzey’s taco spice mix for these
    -fajitas
    -various stir fries, our own creations or a lot from our chinese cookbook
    -any variation on grilled meat and roast veggies, we’ve been doing a lot of lemongrass marinated pork from a new Vietenamese cookbook, and roasted veggies are usually sweet potatoes, or a mix of parsnips and carrots, or cauliflower, or roasted squash (acorn, delicate, carnival or sweet dumpling)
    -grilled cheese and tomato soup
    -baked ziti with sausage

    Reply
    • 9/27/2014 at 12:47 pm
      Permalink

      Also we have a small list of things we make in large batches that are not easy, but the frozen leftovers are:

      -sweet potato gnocchi
      -chili
      -pulled pork

      Reply

Leave a Reply to momd Cancel reply

Your email address will not be published. Required fields are marked *