I can see that your set S gets larger as you increase epsilon, and that param coef_risk is indexed over S. But it's not clear to me where the values for coef_risk are supposed to come from. You might have a different file of coef_risk values for each epsilon value, or there might be one data file that has all of the coef_risk values corresponding to the largest possible epsilon, or there might be some formula for computing the coef_risk values.
Without this information, I can't say how to update coef_risk inside the "for" loop. In general however you should use "update data" followed by a "data" command, or else "let" statements to assign new values to coef_risk. It should not be necessary to reset the data.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of arr...@gmail.com
Sent: Monday, August 19, 2013 5:37 PM
To: am...@googlegroups.com
Subject: [AMPL 7381] How to update model when parameters are given new value?
I do not see anything that is obviously wrong here, though perhaps the script could be written so that you don't have to read the file TSW_data.dat in every pass through the "for" loop. (There is a command "reset data coef_risk;" that resets just the param coef_risk and not all the other sets and params.)
To get more help I suggest posting the contents of the file process.run, and also the complete text of the error message that appears when it "does not work."
On Behalf Of arr...@gmail.com
Sent: Friday, August 23, 2013 5:22 PM
To: am...@googlegroups.com
Cc: 4...@ampl.com
Subject: Re: [AMPL 7395] How to update model when parameters are given new value?