Wesley ]]>

I am creating an Excel-based tool for scheduling a workforce (using AMPL+NEOS)and with every run of the model the input parameters change (i.e. the number of jobs or days). I found that I was unable to dynamically edit the data input for each run and having to manually edit it was tedious. I was able to create vba code to save the parameters to a dat file for AMPL but unable to overwrite the application created data file and I was wondering if there was a way to do so?

Thanks ]]>

Please take a look at:

http://cmpl.th-wildau.de/examples.php

https://neos-guide.org/content/diet-problem

I have having a hard time getting this “simple” problem to run:

Have the option to make any or all of these stews: Veggie, Hearty or Meaty with the following attributes:

• Veggie price is $25/lbs with a max veggie content of 999

• Hearty price is $30/lbs and a max veggie content of 850

• Meaty price is $35/lbs and a max veggie content of 775

I have four 4 bases to include and must use all of each:

• Noodle Medley has 850 veggies/lbs and a total of 100 lbs

• Beef Broth has 770 veggies/lbs and a total of 50 lbs

• Rice pilaf has 825 veggies/lbs and a total of 200 lbs

• Tomato Goulash has 900 veggies/lbs and a total of 150 lbs

Trying to create maximum profit but stay under the max veggies. How can I structure the constraints (or parameters) to ensure each stew is under the max veggie content, this is the current equation:

For each stew sum lbs for 4 bases allocated to that stew and divide by veggies/lbs for each to return the weighted average veggie/lbs

Thanks in advance for your help.

]]>http to https

and port from 3332 to 3333

not sure how to do this?

]]>unfortunately, you cannot use division directly in an objective function or constraint. Please see pages 33-34 in the manual.

An indirect way for parameters (e.g. a) is to assign a new parameter with the the reciprocal (eg. b:=1/a) within the parameters section. The new parameter can be multiplied in the objective function or a constraint.

If you want do divide a variable then it is a little bit more complicated. If you give me an impression for what exactly you want to use a division in this way I could give you some hints.

Thanks,

Mike

]]>