The first thing to notice is that the constraint has been obeyed because the output cross-sectional area is equal to the target area.Īdditionally, Solver has optimized the values of the top width, height, and wall angle to some values. Once all the fields are set, click “OK” and the constraint will be added to Solver.Īfter clicking the “Solve” button in Solver, the constrained optimization will be completed in just a few seconds and we can examine the results. Either “≤” or “=” are valid selections in this case. The constraint could also be a numerical value, but it’s a best practice to choose a cell.įinally, set the constraint behavior in the middle field. In our case, the “cell reference” is the value of the cross-sectional area and the “constraint” is the value of the target area. Choose the cell containing the constraint value.Select the cell value to be constrained.To constrain this optimization problem, first click on the “Add” button on the right side of the Solver window to open the “Add Constraint” window:Īfter the new window opens, the constrained cell is set as follows: This is referred to as constrained optimization.Ī constraint can be placed on an objective cell, variable cell, or any cell in the worksheet. To prevent this behavior, a constraint is added which will force Solver to stay within some limits. Without a constraint on this problem, Solver would target an infinite hydraulic radius by increasing the top width and height to infinity (for any wall angle). Step 7: Set up the constrained optimization in Excel Solver In the diagram at the beginning of this post, we identified those variables as the top width, the height, and the wall angle.Ĭlick in the field “By Changing Variable Cells:” and select cells C3:C5. Once the objective has been defined, Solver will also need information on which cells to modify to achieve the objective. The default behavior in Solver is to maximize the result. In our example, we will be maximizing the hydraulic radius, which is the results in cell G6. Once open, we need to tell Solver which cell result we want to optimize. (If you don’t see it, that probably means you need to enable the Solver add-in.) The Solver add-in is opened through a button on the far-right side of the Data tab. We can use the Solver add-in to run this constrained optimization in Excel. Step 5: Open Solver and set the objective It is simple the area divided by the wetted perimeter, and we end up with a value of about 0.48 meters. The hydraulic radius is the final output to be calculated in the spreadsheet. This is the formula in Excel: Step 4: Calculate the hydraulic radius
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |