» OpsRes Web
How do we check whether an element is within the CONVERSIONS set? For example, we have a material 'n' and a material 'm', how do we check whether this combination is within the CONVERSIONS set?
- 03 Apr 2008
You use the set logical operator
(m, n) in CONVERSIONS
. This should be explained further in SetsInAMPL
- 04 Apr 2008
Hint (Experts Only Task)
Starting with the transportation.run file from The Transportation Problem in AMPL
you need to:
- Add the supplied model and data files (forestry_expert.mod and forestry.dat) to create the necessary AMPL data structures and fill them with the Forestry Problem data;
- In place of a data file for transportation.mod, e.g., brewery.dat, add loops, script commands, etc to assign values to the transportation.mod data structures (see the examples from the Extra for Experts section);
- After the automatic balancing, if there is more supply than demand, restrict the arcs taking goods to the dummy demand node to only allow those goods that are allowed to be disposed of, e.g., Waste Paper. If there is more demand than supply then see if there is a source for "buying in" more goods.
- 08 Apr 2008