IBM ILOG Solver User's Manual > The Basics > Using Arrays and Basic Search: Changing Money > Describe > Discussion |
Discussion |
INDEX
![]() |
Try modeling the problem as an equation. Where a is the number of coins of 1 cent, b is the number of coins of 10 cents, c is the number of coins of 20 cents and d is the number of 1 euro coins:
123 = (a*1) + (b*10) + (c*20) + (d*100)
What is known?
What is unknown?
What are the constraints?
By describing the unknown information as the number of coins of each type, you are grouping the unknowns into types. This removes symmetric solutions from the model and thus significantly cuts back the number of possible (symmetric) solutions.
To demonstrate this concept in simple terms, think about the coins of 1 cent. You can use up to 5 coins of 1 cent. If you have 5 individual coins and you want to track whether each individual coin is used, you need to create 5 different decision variables, one to represent each coin. However, it is not important to know whether any individual coin is used or not. It is important to know how many of each type of coin are used. Therefore, you need only create one decision variable to represent the number of 1 cent coins.
By grouping by types, you cut down on the number of variables and improve the efficacy of your solution search. This is just one example of how thoughtful modeling practices can improve search results.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |