login about faq

Dear OR-Champs!

I have an optimization (IP) model where I am trying to define the decision variables as integers. Unfortunately Excel does not have an option to define the variables as integers. Please can anyone help?

Happy new year to all of you!!!

Thanks!

asked Jan 07 at 01:37

Pavan's gravatar image

Pavan
895

Mr. Trick, thank you for answering earlier. I also have another question.

While modeling in MS-Excel, its quite easy to model the allocation problem for single product. How to model it when the problem has multiple products? (apart from creating 5 different separate models)

Say in AMPL, I can easily define the constraint "subject to {p in products}: ...XXX..." such that for each product the parameters would choose the respective values. How to define this Excel?

As always, sincerely appreciate your responses.

(Jan 08 at 03:18) Pavan
2

Afaik, Excel has no support for set algebraic expressions. Yet, to express (and pool) constraints in a more efficient way you can leverage Excel's capability of column/row comparisons. - Two tutorials on Excel modeling practices that might come handy:

(Jan 08 at 05:54) fbahr ♦

Thanks Fbahr, I'll have a look.

(Jan 08 at 08:26) Pavan

Within Solver, define an integrality constraint by choosing the cells and then, on the dropdown menu that begins "<=" choose "int" for integer or "bin" for binary. solver snip

link

answered Jan 07 at 02:34

Michael%20Trick's gravatar image

Michael Trick ♦♦
3.1k418

Thank you Mr. Trick. Using excel after long-time for OR. (kind of figured it out after little while exploring all the options)

(Jan 07 at 05:22) Pavan

To add to Mike's answer, it's also important to take into account the "Tolerance" parameter that can be adjusted by clicking the "Options" button in the Solver setup window. I believe that the default value is 5%, which means that Excel will stop looking for an optimal solution when the integrality gap is 5%. If you want the guaranteed true optimal solution, you need to set tolerance to 0.

link

answered Jan 08 at 14:25

Tallys%20Yunes's gravatar image

Tallys Yunes ♦
1.8k19

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×25
×18
×3

Asked: Jan 07 at 01:37

Seen: 476 times

Last updated: Feb 19 at 10:32

OR-Exchange! Your site for questions, answers, and announcements about operations research.