# \#files-preprocessing

**URL:** https://discuss.ampl.com/tag/files-preprocessing/10.md

[Latest](https://discuss.ampl.com/latest.md) · [Categories](https://discuss.ampl.com/categories.md) · [Tags](https://discuss.ampl.com/tags.md)

---

## [AMPL duplicate member "x" for set "y", how to fix it](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474)

<div class="topic-metadata">

**Author:** [@Ares\_Inglada\_Grano](https://discuss.ampl.com/u/Ares_Inglada_Grano)\
**Replies:** 3\
**Last updated:** [April 6, 2023, 3:05pm UTC](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474 "2023-04-06T15:05:16Z")

</div>

I 'm working with AMPL. In the “.mod” I have declared a set like this: set path\_intersections; It consists of rows of two numbers, the first one is the number of the path, and the second one the number of the intersectio…

---

## [How can I edit my model or data file without leaving the AMPL command environment?](https://discuss.ampl.com/t/how-can-i-edit-my-model-or-data-file-without-leaving-the-ampl-command-environment/77)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 6:06pm UTC](https://discuss.ampl.com/t/how-can-i-edit-my-model-or-data-file-without-leaving-the-ampl-command-environment/77 "2021-12-15T18:06:17Z")

</div>

Use AMPL’s shell command to invoke the editor you want to use. For example, if your editor is called edit and your file is diet2a.dat , give the command shell "edit diet2a.dat"; The editor temporarily pops up (or takes…

---

## [How do I solve a series of different random problems with data drawn from the same distribution?](https://discuss.ampl.com/t/how-do-i-solve-a-series-of-different-random-problems-with-data-drawn-from-the-same-distribution/76)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 6:05pm UTC](https://discuss.ampl.com/t/how-do-i-solve-a-series-of-different-random-problems-with-data-drawn-from-the-same-distribution/76 "2021-12-15T18:05:12Z")

</div>

Use AMPL’s reset data command to resample from all of the random-valued functions in the model. For example, in model steel4.mod from the AMPL book, suppose that parameter avail is changed so that its value is given by a…

---

## [When does AMPL evaluate the conditions specified in my model’s check statements?](https://discuss.ampl.com/t/when-does-ampl-evaluate-the-conditions-specified-in-my-model-s-check-statements/75)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 6:01pm UTC](https://discuss.ampl.com/t/when-does-ampl-evaluate-the-conditions-specified-in-my-model-s-check-statements/75 "2021-12-15T18:01:15Z")

</div>

The check conditions are evaluated each time that AMPL generates (or re-generates) an instance of your model. Normally the generation of an instance is triggered by a solve command, but a few other commands such as write …

---

## [How do I write an “MPS file” for my problem?](https://discuss.ampl.com/t/how-do-i-write-an-mps-file-for-my-problem/74)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 6:00pm UTC](https://discuss.ampl.com/t/how-do-i-write-an-mps-file-for-my-problem/74 "2021-12-15T18:00:44Z")

</div>

You can use AMPL’s write command to create a file that contains a representation of your linear or integer program in a standard format known as MPS form. To write an MPS-form file for the diet LP from Chapter 2 of the A…

---

## [Why does AMPL write an MPS file that is different from what I expect?](https://discuss.ampl.com/t/why-does-ampl-write-an-mps-file-that-is-different-from-what-i-expect/73)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 5:59pm UTC](https://discuss.ampl.com/t/why-does-ampl-write-an-mps-file-that-is-different-from-what-i-expect/73 "2021-12-15T17:59:18Z")

</div>

Several kinds of transformations may be applied by AMPL before it writes out any representation of your problem. Normally you need not be aware of these changes, because AMPL reverses them after receiving the optimal sol…

---

## [What are the transformations that AMPL applies to optimization problems?](https://discuss.ampl.com/t/what-are-the-transformations-that-ampl-applies-to-optimization-problems/72)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 5:58pm UTC](https://discuss.ampl.com/t/what-are-the-transformations-that-ampl-applies-to-optimization-problems/72 "2021-12-15T17:58:33Z")

</div>

AMPL’s presolve phase attempts to transform your problem to an equivalent one that is smaller and easier to solve. Presolve first removes trivial model components, such as variables fixed at constant values and constrain…

---

## [How can I prevent AMPL from transforming my problem?](https://discuss.ampl.com/t/how-can-i-prevent-ampl-from-transforming-my-problem/71)

<div class="topic-metadata">

**Author:** [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 5:57pm UTC](https://discuss.ampl.com/t/how-can-i-prevent-ampl-from-transforming-my-problem/71 "2021-12-15T17:57:46Z")

</div>

To suppress the presolve phase, set option presolve 0 . To suppress transformation of piecewise-linear terms, set option pl\_linearize 0 . To suppress elimination of variables by substitution from constraints, set optio…
