+ Reply to Thread
Results 1 to 7 of 7

Some help with including a binary variable in Excel

  1. #1
    Registered User
    Join Date
    01-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    8

    Some help with including a binary variable in Excel

    export.xls

    I'm wondering how I could go about including a fixed cost (defined by a binary variable) in my model. The fixed cost is $50000 in order to start producing a type of product, and I know that I will not be producing the Roasted Beans in this case because the profit contribution isn't enough to outweigh the initial fixed cost. I'm not sure how I could define this in Excel Solver though.

    Would appreciate any advice, thank you!

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Some help with including a binary variable in Excel

    Is this (Excel Programming / VBA / Macros) forum right to raise Solver questions? may be yes, as Solver is Add-in

    You may try:

    =SUMPRODUCT(B23:D23*(B7:D7>0))
    inccluded in the cost side.

    But notice that by doing so your problem is no longer a smooth one.
    Last edited by Kaper; 02-07-2014 at 12:54 PM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Some help with including a binary variable in Excel

    Hi,

    Yeah it isn't doing it because this adds a fixed cost regardless of whether I am producing a type of product or not....

  4. #4
    Registered User
    Join Date
    01-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Some help with including a binary variable in Excel

    I would need to put something along the lines of x <= M.y as a decision variable, where x is quantity and y is the binary variable,but this instead wouldn't allow me to vary quantity produced.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Some help with including a binary variable in Excel

    Quote Originally Posted by pykrete View Post
    it isn't doing it because this adds a fixed cost regardless of whether I am producing a type of product or not....
    Don't think so, because your produced quantities are in row 7 and in
    =SUMPRODUCT(B23:D23*(B7:D7>0))
    row 23 values are taken into account only when row7 value is >0 (only for these in production).

  6. #6
    Registered User
    Join Date
    01-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Some help with including a binary variable in Excel

    Yup, but because of how my objective function is set up, profits from a product that is not produced still go into the objective function

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Some help with including a binary variable in Excel

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...ble-excel.html
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Function including a variable range
    By ARayburn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2013, 10:50 AM
  2. [SOLVED] Including a variable in a formulae
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2012, 08:31 AM
  3. [SOLVED] Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  5. Save a range to binary file (including its format)
    By Cool Sport in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2005, 10:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1