+ Reply to Thread
Results 1 to 3 of 3

Solver Help: Setting a Constraint to Allow Two Values

  1. #1
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Solver Help: Setting a Constraint to Allow Two Values

    Hello,

    I am designing a bond amortization table. I am trying to constrain the principal payments, lets call them A1:A8 to be either $5,000 difference from the previous payment, or $0 difference from the previous payment. I cannot find the correct syntax to set a constraint that does the following. Assuming B2:B8 are the difference values.

    Constraint:
    B1:B8 = ($5,000 or 0)

    Im guessing this is probably a simple error and I am overlooking an easy formula. But I would appreciate any help I could get.

    Thanks

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,809

    Re: Solver Help: Setting a Constraint to Allow Two Values

    It's not the kind of problem I usually solve. I would be tempted to use a couple of helper cells:

    In one cell, put 5000
    In C1:C8 (or A1:A8 or wherever is convenient) put 0 (or 1).
    B1:B8 might be 5000*A1 (copied across).
    In your Solver model, include A1 to A8 in your by changing cells, and add a constraint that those cells are bin (binary -- meaning Solver will force them to be 0 or 1)

    When B1 is 0, the difference will be 0, when B1 is 1, the difference will be 5000.

    See if something like that will work.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Re: Solver Help: Setting a Constraint to Allow Two Values

    Solution worked great. Ended up tweaking it a bit to allow increments of 5,000 using integers as opposed to binary. Appreciate the help.

+ 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. EXCEL Solver: Constraint equals one of two values (0 or 100)?
    By davidmummery1989 in forum Excel General
    Replies: 1
    Last Post: 01-14-2014, 06:54 AM
  2. BUY-IN Constraint in Solver
    By WhamBam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2012, 02:30 AM
  3. Setting up Solver constraint
    By Jstewart304 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2012, 01:36 PM
  4. A wacky solver constraint
    By simonsays in forum Excel General
    Replies: 0
    Last Post: 09-08-2006, 05:14 PM
  5. [SOLVED] solver constraint
    By jojo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-18-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