%INCLUDE{DiscussionTopicHeader}% When using AMPL to model [[https://twiki.esc.auckland.ac.nz/twiki/bin/view/OpsRes/HerdFeedingProblem][the Herd Feeding Problem]] you can "copy-and-paste" much of the model from [[https://twiki.esc.auckland.ac.nz/twiki/bin/view/OpsRes/WhiskasCatFoodProblem][the Whiskas Cat Food Problem]]. However, there are both "absolute" constraints (the upper bound on the amount of Pasture) and "relative" constraints (the lower bound on the percent of protein) that need to be modelled. What is the best way to do this? -- Main.TWikiAdminGroup - 17 Mar 2008 There are two ways to do this: 1) Do some algebra to incorporate the percentage requirements into the coefficients from an absolute requirements, e.g., %$\frac{\sum_p c_{r p} x_p}{\sum_p x_p} \geq P_r$% becomes %$\sum_p (c_{r p} - P_r) x_p \geq 0$% 2) Model the absolute requirements and the percentage requirements separately, e.g., %$\sum_p c_{r p} x_p \leq A_r$% %$\sum_p c_{r p} x_p \leq P_r \sum_p x_p$% AMPL will take care of the simplification. -- Main.TWikiGuest - 17 Mar 2008 %COMMENT%
DiscussionTopicForm
Title
The Herd Feeding Problem
Forum
ForumAMPL
This topic: Forum
>
ForumAMPL
>
ForumAMPL0002
Topic revision: r1591 - 2025-04-26 - TWikiGuest
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback