+ Reply to Thread
Results 1 to 3 of 3

Solver or Formula or Macros

  1. #1
    Registered User
    Join Date
    07-12-2021
    Location
    london
    MS-Off Ver
    2010
    Posts
    1

    Solver or Formula or Macros

    Dear excel experts,

    Please see attached sample workbook.

    This is a drug manufacturing factory which makes devices container Drug A +/- Drug B. The device type could be type I or type II.
    I would like to use excel Solver (or Formula or Macros if there is an alternative) to solve an optimal output in F2:H21
    in F2:H21 can excel output the number of each device to be manufactured on Day 1,2 and 3? The demand of each individual device is listed in column D.

    Constraints (in order of priority):
    - by end of Day 3, all demand (column D) are fulfilled
    - Number of available drug A per day for manufacturing is 500 grams max
    - The number of devices to be manufactured should be distributed as evenly as possible across Day 1 to 3
    - Ideally manufacturing of a particular device must be finished within a day i.e. the manufacturing of a line cannot be spreaded across more than 1 day
    - it is desirable to group as many Type I devices together to be manufactured on the same day as possible; Type II devices likewise
    - it is desirable to group as many devices containing Drug B together to be manufactured on the same day as possible

    Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-07-2011
    Location
    Pompano Beach, FL
    MS-Off Ver
    Excel 365
    Posts
    19

    Re: Solver or Formula or Macros

    It appears there are four combinations as follows:

    Drug B Y/N Device I or II
    Y I
    Y II
    N I
    N II

    If you ad a helper column to calculate the grams of Drug A (Demand X Dose) you could use a pivot table to determine the total grams of Drug A for all combinations.

    I did this in the attached and then put IF statement formulas in columns F & G as required in the attached workbook.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    370

    Re: Solver or Formula or Macros

    Crystalyzer has already provided an answer, anyhow, if you are seeking for a more general approach, here is a solution using OpenSolver (you can download it here).

    Your problem is too hard for standard Solver, but don't worry, the model is already setup. You may want to play with relative weights for the last constraints (changing them will definitely give you a different optimal answer).

    HTH,

    Francesco
    Attached Files Attached Files
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

+ 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. Run macros within the solver
    By masben in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2013, 10:07 AM
  2. [SOLVED] Loop Solver Macros
    By dbie21 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-20-2012, 02:55 PM
  3. Optimisation without Solver or Macros
    By Kozy in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-24-2011, 03:59 AM
  4. Solver Package and VBA Macros
    By junejaja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2008, 09:02 PM
  5. [SOLVED] solver macros in protected worksheets
    By Gilbert LAC in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-28-2006, 06:35 PM
  6. [SOLVED] webquery and solver macros
    By icestationzbra in forum Excel General
    Replies: 2
    Last Post: 02-23-2006, 02:47 PM
  7. [SOLVED] Solver in macros
    By Traima in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2005, 06:40 PM
  8. Solver, macros Excel
    By scaroca in forum Excel Formulas & Functions
    Replies: 52
    Last Post: 09-07-2005, 12:05 AM

Tags for this Thread

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