# Google Group Mirror

**URL:** https://discuss.ampl.com/c/google-group/44.md?page=3

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

**Page:** 4

---

## [\[AMPL 24837\] How to write percentage in Ampl code](https://discuss.ampl.com/t/ampl-24837-how-to-write-percentage-in-ampl-code/774)

<div class="topic-metadata">

**Author:** [@Vivi](https://discuss.ampl.com/u/Vivi)\
**Replies:** 2\
**Last updated:** [October 23, 2023, 6:34pm UTC](https://discuss.ampl.com/t/ampl-24837-how-to-write-percentage-in-ampl-code/774 "2023-10-23T18:34:56Z")

</div>

Hi AMPL Team, For writing 25 percent in my data, I wrote 25% and I have had an error message. I am writing to know how to write percentage in AMPL code. Best regards.

---

## [\[AMPL 24834\] TSP Dantzig–Fulkerson–Johnson DFJ subtour elimination](https://discuss.ampl.com/t/ampl-24834-tsp-dantzig-fulkerson-johnson-dfj-subtour-elimination/766)

<div class="topic-metadata">

**Author:** [@dmorill](https://discuss.ampl.com/u/dmorill)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 12:06am UTC](https://discuss.ampl.com/t/ampl-24834-tsp-dantzig-fulkerson-johnson-dfj-subtour-elimination/766 "2023-10-19T00:06:00Z")

</div>

Hi AMPL team, I’m trying to implement the DFJ subtour elimination for the TSP (page 4 https://web2.qatar.cmu.edu/~gdicaro/15382/additional/tsp-formulations.pdf) in AMPL. The constraint is: https://i.imgur.com/nzhJI5M.…

---

## [\[AMPL 24819\] linearizing conditional constraints](https://discuss.ampl.com/t/ampl-24819-linearizing-conditional-constraints/756)

<div class="topic-metadata">

**Author:** [@jclq](https://discuss.ampl.com/u/jclq)\
**Replies:** 4\
**Last updated:** [October 18, 2023, 2:33pm UTC](https://discuss.ampl.com/t/ampl-24819-linearizing-conditional-constraints/756 "2023-10-18T14:33:49Z")

</div>

Dear team, I have developed the next constraints for the next conational: I want a binary variable let say z\[t\]=0, when 0\<= v\[t\] \< VMAX, that means, while v\[t\] is zero in t, then z\[t\] = 0, On other hand, z\[t\]=1, when V…

---

## [\[AMPL 24827\] Unexpected and weir result](https://discuss.ampl.com/t/ampl-24827-unexpected-and-weir-result/760)

<div class="topic-metadata">

**Author:** [@dmorill](https://discuss.ampl.com/u/dmorill)\
**Replies:** 2\
**Last updated:** [October 18, 2023, 5:40am UTC](https://discuss.ampl.com/t/ampl-24827-unexpected-and-weir-result/760 "2023-10-18T05:40:52Z")

</div>

Hi AMPLteam, I am working on a MILP model about aggregate planning. The problem is that at the end I defined two auxiliary variables to save the values of cost (f1) and staff layoffs (f2) and my objective function is a …

---

## [\[AMPL 24822\] Fixing my Ampl code](https://discuss.ampl.com/t/ampl-24822-fixing-my-ampl-code/759)

<div class="topic-metadata">

**Author:** [@Sanjana\_Achar](https://discuss.ampl.com/u/Sanjana_Achar)\
**Replies:** 3\
**Last updated:** [October 13, 2023, 1:26am UTC](https://discuss.ampl.com/t/ampl-24822-fixing-my-ampl-code/759 "2023-10-13T01:26:10Z")

</div>

I need help with this problem you run a small company providing napkins for hotels. For each of the next 5 days you know how many napkins you’ll need: 80, 70, 120, 150, 100, respectively. Each morning when delivering…

---

## [\[AMPL 24814\] Can someone please help me model this in AMPL?](https://discuss.ampl.com/t/ampl-24814-can-someone-please-help-me-model-this-in-ampl/753)

<div class="topic-metadata">

**Author:** [@JJ\_Foord](https://discuss.ampl.com/u/JJ_Foord)\
**Replies:** 2\
**Last updated:** [October 7, 2023, 7:57pm UTC](https://discuss.ampl.com/t/ampl-24814-can-someone-please-help-me-model-this-in-ampl/753 "2023-10-07T19:57:18Z")

</div>

Please help me with this assignment: It is December 2023, and you are doing vacation work at Roofers SA PTY Limited, a South African industry specialising in the manufacturing of roof tiles. You have been assigned to op…

---

## [\[AMPL 24807\] modeling with conditionals](https://discuss.ampl.com/t/ampl-24807-modeling-with-conditionals/746)

<div class="topic-metadata">

**Author:** [@jclq](https://discuss.ampl.com/u/jclq)\
**Replies:** 4\
**Last updated:** [October 7, 2023, 3:48pm UTC](https://discuss.ampl.com/t/ampl-24807-modeling-with-conditionals/746 "2023-10-07T15:48:49Z")

</div>

Dear AMPL group, I am trying to model the next conditional constraint: I have a constant vector W\[t\], In each t If W\[t\] \>= MAX then x\[t\] = MAX, otherwise if W\[t\] \< MAX, then x\[t\] = W\[t\]. Could anyone help me with some ti…

---

## [\[AMPL 24815\] CPLEX 22.1.1.0: Constraint \_scon\[1\] is not convex quadratic since it is an equality constraint.](https://discuss.ampl.com/t/ampl-24815-cplex-22-1-1-0-constraint-scon-1-is-not-convex-quadratic-since-it-is-an-equality-constraint/754)

<div class="topic-metadata">

**Author:** [@Joyce\_Dong1](https://discuss.ampl.com/u/Joyce_Dong1)\
**Replies:** 1\
**Last updated:** [October 6, 2023, 11:24pm UTC](https://discuss.ampl.com/t/ampl-24815-cplex-22-1-1-0-constraint-scon-1-is-not-convex-quadratic-since-it-is-an-equality-constraint/754 "2023-10-06T23:24:31Z")

</div>

Here is my code that keeps giving me that error: param n; param m; param R {i in 1…m, j in 1…n}; param p {i in 1…m}; param delta; var x {j in 1…n} \>=0; var rP; var d{i in 1…m}; var r{i in 1…m}; minimize ADR: su…

---

## [\[AMPL 24813\] Rejecting declaration because it uses loop dummy n\_val](https://discuss.ampl.com/t/ampl-24813-rejecting-declaration-because-it-uses-loop-dummy-n-val/752)

<div class="topic-metadata">

**Author:** [@Joanna](https://discuss.ampl.com/u/Joanna)\
**Replies:** 1\
**Last updated:** [October 6, 2023, 10:43pm UTC](https://discuss.ampl.com/t/ampl-24813-rejecting-declaration-because-it-uses-loop-dummy-n-val/752 "2023-10-06T22:43:56Z")

</div>

Hi, I want to write a code that uses for loop. I have an error: “Rejecting declaration because it uses loop dummy n\_val. context: var temp := \>\>\> n\_val; \<\<\<” To be honest I’ve tried several solutions and non of them wo…

---

## [\[AMPL 24810\] Import data from Excel to AMPL](https://discuss.ampl.com/t/ampl-24810-import-data-from-excel-to-ampl/747)

<div class="topic-metadata">

**Author:** [@Basma\_Ben\_Mahmoud](https://discuss.ampl.com/u/Basma_Ben_Mahmoud)\
**Replies:** 1\
**Last updated:** [September 30, 2023, 9:45pm UTC](https://discuss.ampl.com/t/ampl-24810-import-data-from-excel-to-ampl/747 "2023-09-30T21:45:43Z")

</div>

Hi, I would like to ask about the best way to import data from Excel sheet to AMPL model. In fact, I read chapter 10 in the AMPL guide, but I see that it is not detailed enough to help me doing so. (I am beginner with …

---

## [\[AMPL 24799\] Nonlinear Complementary problem](https://discuss.ampl.com/t/ampl-24799-nonlinear-complementary-problem/741)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 5\
**Last updated:** [September 26, 2023, 3:59pm UTC](https://discuss.ampl.com/t/ampl-24799-nonlinear-complementary-problem/741 "2023-09-26T15:59:56Z")

</div>

Hi everyone I am working on a complementary problem with the following equations and constraints: minimize obj: 0; Constraints s.t. linkflow\_eq {i in 1..80}: LinkFlows\[i\] = sum{j in CumulativeLengthData\[i-1\]+1..Cumula…

---

## [\[AMPL 24797\] syntax error](https://discuss.ampl.com/t/ampl-24797-syntax-error/739)

<div class="topic-metadata">

**Author:** [@Mifthahul\_Janna\_Rosy](https://discuss.ampl.com/u/Mifthahul_Janna_Rosy)\
**Replies:** 1\
**Last updated:** [September 22, 2023, 5:37pm UTC](https://discuss.ampl.com/t/ampl-24797-syntax-error/739 "2023-09-22T17:37:57Z")

</div>

Hi, i want to ask about my problem. Why this is happened? Is there anything wrong with my Ampl software? Because, when I start to run my model it comes up:

---

## [\[AMPL 24794\] max\_iter as a parameter](https://discuss.ampl.com/t/ampl-24794-max-iter-as-a-parameter/737)

<div class="topic-metadata">

**Author:** [@Manuel\_Alvarez\_Rodri](https://discuss.ampl.com/u/Manuel_Alvarez_Rodri)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 9:33pm UTC](https://discuss.ampl.com/t/ampl-24794-max-iter-as-a-parameter/737 "2023-09-20T21:33:12Z")

</div>

In order to use a loop that keeps increasing the maximum number of iterations of the simplex method, is it possible to use a “max\_iter” parameter like the following sentence? “option gurobi\_options $gurobi\_options ’ ite…

---

## [\[AMPL 24724\] set declaration](https://discuss.ampl.com/t/ampl-24724-set-declaration/670)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 29\
**Last updated:** [September 19, 2023, 8:50pm UTC](https://discuss.ampl.com/t/ampl-24724-set-declaration/670 "2023-09-19T20:50:12Z")

</div>

Hello everyone, I have an optimization problem described in AMPL and would like to write it using amplpy in google colab. In my .mod ample file I have two sets as: set I ordered; set p; set H{I} within p; in AMPL I…

---

## [\[AMPL 24792\] Runtime Error: Broken Pipe](https://discuss.ampl.com/t/ampl-24792-runtime-error-broken-pipe/731)

<div class="topic-metadata">

**Author:** [@MUV](https://discuss.ampl.com/u/MUV)\
**Replies:** 1\
**Last updated:** [September 18, 2023, 11:25pm UTC](https://discuss.ampl.com/t/ampl-24792-runtime-error-broken-pipe/731 "2023-09-18T23:25:23Z")

</div>

I am getting “RuntimeError: cannot write to file: Broken pipe” error in colab. The same mod and dat file give me a solution in AMPLIDE. The full error is given below. RuntimeError Traceback (most recent call last) in \<c…

---

## [\[AMPL 24769\] How to read .sol files](https://discuss.ampl.com/t/ampl-24769-how-to-read-sol-files/719)

<div class="topic-metadata">

**Author:** [@Hany\_Osman](https://discuss.ampl.com/u/Hany_Osman)\
**Replies:** 17\
**Last updated:** [September 16, 2023, 5:14pm UTC](https://discuss.ampl.com/t/ampl-24769-how-to-read-sol-files/719 "2023-09-16T17:14:09Z")

</div>

Hi, I used ampl.setOption(‘cplex\_options’,‘poolstub savesol’)to generate feasible solution, but I do not know how to open this files and see the generated solutions Could you please help? Thanks

---

## [Re: \[AMPL 24789\] How to install scipampl on Windows 10?](https://discuss.ampl.com/t/re-ampl-24789-how-to-install-scipampl-on-windows-10/729)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 0\
**Last updated:** [September 15, 2023, 12:15am UTC](https://discuss.ampl.com/t/re-ampl-24789-how-to-install-scipampl-on-windows-10/729 "2023-09-15T00:15:08Z")

</div>

Have you looked at our new SCIP driver available with the Community Edition? If you want to stick with SCIP’s native NL interface, just use their executable (scipampl has been discontinued in SCIP 8.). See https://scipo…

---

## [\[AMPL 24780\] macOS "can't find file"](https://discuss.ampl.com/t/ampl-24780-macos-cant-find-file/726)

<div class="topic-metadata">

**Author:** [@Joyce\_Dong](https://discuss.ampl.com/u/Joyce_Dong)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 1:29pm UTC](https://discuss.ampl.com/t/ampl-24780-macos-cant-find-file/726 "2023-09-13T13:29:56Z")

</div>

Hello, I am having problem with the AMPL IDE software. When I write my code, there is an error like ample: model caff.mod; can’t find file “caff.mod” context: model \>\>\>caff.mod\<\<\<; What can I do to be able to get the…

---

## [\[AMPL 24776\] PATH Solver](https://discuss.ampl.com/t/ampl-24776-path-solver/725)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 1\
**Last updated:** [September 12, 2023, 6:12pm UTC](https://discuss.ampl.com/t/ampl-24776-path-solver/725 "2023-09-12T18:12:46Z")

</div>

Hi everyone, I have a nonlinear complementary optimization problem in AMPL, and I’ve selected the path solver for this problem. My AMPL license is free community edition and I’ve downloaded the exe file of the solver fr…

---

## [\[AMPL 24770\] Changing a search method or a seed to end with different feasible solution](https://discuss.ampl.com/t/ampl-24770-changing-a-search-method-or-a-seed-to-end-with-different-feasible-solution/720)

<div class="topic-metadata">

**Author:** [@Hany\_Osman](https://discuss.ampl.com/u/Hany_Osman)\
**Replies:** 2\
**Last updated:** [September 12, 2023, 5:08am UTC](https://discuss.ampl.com/t/ampl-24770-changing-a-search-method-or-a-seed-to-end-with-different-feasible-solution/720 "2023-09-12T05:08:49Z")

</div>

Hi I have a complex problem that can’t be solved to optimality in 2 hours. I want to run for that period of time and get a feasible solution. Is there a way to get different feasible solutions if I run it 10 times. For …

---

## [\[AMPL 24771\] Capturing Result](https://discuss.ampl.com/t/ampl-24771-capturing-result/721)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 1\
**Last updated:** [September 10, 2023, 6:00pm UTC](https://discuss.ampl.com/t/ampl-24771-capturing-result/721 "2023-09-10T18:00:15Z")

</div>

Hi, I’m using path solver in my project but when I’m running the following script code in my .run file: model test14.mod; solve; display cost; display x; printf “cost,pathflows,\\n” \> “results.csv”; for {i in 1…Tota…

---

## [\[AMPL 24764\] MIPgap interpretation for a Minimization problem](https://discuss.ampl.com/t/ampl-24764-mipgap-interpretation-for-a-minimization-problem/713)

<div class="topic-metadata">

**Author:** [@Hung-Yu\_Yang](https://discuss.ampl.com/u/Hung-Yu_Yang)\
**Replies:** 1\
**Last updated:** [September 4, 2023, 2:43pm UTC](https://discuss.ampl.com/t/ampl-24764-mipgap-interpretation-for-a-minimization-problem/713 "2023-09-04T14:43:14Z")

</div>

Hi everyone, I am struggling a bit with the MIPgap interpretation of a minimization problem. I am trying to minimize the total wastage space inside a container. My questions are as follows: The absolute gap is absmi…

---

## [\[AMPL 24764\] Solving status](https://discuss.ampl.com/t/ampl-24764-solving-status/701)

<div class="topic-metadata">

**Author:** [@Matheus\_Diogenes\_And](https://discuss.ampl.com/u/Matheus_Diogenes_And)\
**Replies:** 1\
**Last updated:** [August 28, 2023, 1:01pm UTC](https://discuss.ampl.com/t/ampl-24764-solving-status/701 "2023-08-28T13:01:14Z")

</div>

Hello everyone. I would like to know if it is possible to retrieve the solving status after running a model. For instance, if I want to check whether the obtained solution is an optimal or feasible, what snippet should …

---

## [\[ampl 24758\] c++20](https://discuss.ampl.com/t/ampl-24758-c-20/694)

<div class="topic-metadata">

**Author:** [@Matheus\_Diogenes\_And](https://discuss.ampl.com/u/Matheus_Diogenes_And)\
**Replies:** 4\
**Last updated:** [August 25, 2023, 3:45pm UTC](https://discuss.ampl.com/t/ampl-24758-c-20/694 "2023-08-25T15:45:32Z")

</div>

Hello everyone. I am trying to run AMPL C++ API with C++20, but I am having some problems with this. Inside my AMPL folder /opt/ampl/amplapi/examples/cpp, I type: g++ -std=c++11 -Wall -o firstexample firstexample.cc -I…

---

## [\[AMPL 24737\] Matlab setup](https://discuss.ampl.com/t/ampl-24737-matlab-setup/684)

<div class="topic-metadata">

**Author:** [@luola\_gmail.com](https://discuss.ampl.com/u/luola_gmail.com)\
**Replies:** 0\
**Last updated:** [August 15, 2023, 2:16am UTC](https://discuss.ampl.com/t/ampl-24737-matlab-setup/684 "2023-08-15T02:16:16Z")

</div>

I ran the sample code “firstExample.m” after i ran the “setupOnce.m” file on Matlab and got the following error message: "Error using AMPL Java exception occurred: java.lang.RuntimeException: AMPL could not be started…

---

## [\[AMPL 24733\] Modeling multi objective mixed integer linear programming problem using ampl](https://discuss.ampl.com/t/ampl-24733-modeling-multi-objective-mixed-integer-linear-programming-problem-using-ampl/681)

<div class="topic-metadata">

**Author:** [@Nasiru\_Abdullahi](https://discuss.ampl.com/u/Nasiru_Abdullahi)\
**Replies:** 1\
**Last updated:** [August 14, 2023, 5:57pm UTC](https://discuss.ampl.com/t/ampl-24733-modeling-multi-objective-mixed-integer-linear-programming-problem-using-ampl/681 "2023-08-14T17:57:28Z")

</div>

Good evening all; Pls is it possible to modeled multi\_ Objective MILPP using ampl and implement some algorithm in ampl, algorithms like Differential evolution algorithm, genetic algorithm or particle swam algorithm Tha…

---

## [\[AMPL 24732\] Problem with the baron and knitro solvers](https://discuss.ampl.com/t/ampl-24732-problem-with-the-baron-and-knitro-solvers/680)

<div class="topic-metadata">

**Author:** [@Madelin\_Bastidas](https://discuss.ampl.com/u/Madelin_Bastidas)\
**Replies:** 1\
**Last updated:** [August 10, 2023, 9:42pm UTC](https://discuss.ampl.com/t/ampl-24732-problem-with-the-baron-and-knitro-solvers/680 "2023-08-10T21:42:20Z")

</div>

When using the baron and Knitro solvers in ampl I get the following error: 1844676744072635810101 It does not allow me to run the code, especially with the baron solver, when I try to run it I get the following message: …

---

## [\[AMPL 24730\] final objective value in knitro least squares](https://discuss.ampl.com/t/ampl-24730-final-objective-value-in-knitro-least-squares/678)

<div class="topic-metadata">

**Author:** [@Hanna\_Schenk](https://discuss.ampl.com/u/Hanna_Schenk)\
**Replies:** 1\
**Last updated:** [August 9, 2023, 1:01pm UTC](https://discuss.ampl.com/t/ampl-24730-final-objective-value-in-knitro-least-squares/678 "2023-08-09T13:01:20Z")

</div>

Hi all, I am solving a least squared problem using Knitro’s leastsquares=1 and an objective that is 0. The statistics of the solver show a final objective value of a small but positive number (~1e-7). How can I displa…

---

## [\[AMPL 24723\] Generate all subsets of a universal set in AMPL](https://discuss.ampl.com/t/ampl-24723-generate-all-subsets-of-a-universal-set-in-ampl/669)

<div class="topic-metadata">

**Author:** [@yacj\_gmail.com](https://discuss.ampl.com/u/yacj_gmail.com)\
**Replies:** 1\
**Last updated:** [August 2, 2023, 9:46pm UTC](https://discuss.ampl.com/t/ampl-24723-generate-all-subsets-of-a-universal-set-in-ampl/669 "2023-08-02T21:46:17Z")

</div>

I am needing to write a general way to construct a set that contains all the subsets of a universal set. For example: Let A be the universal set, and S be the set containing all the subsets of A. A = {a1, a2, a3} S = …

---

## [Re: \[AMPL 24720\] How Hooking my Solver to AMPL ?](https://discuss.ampl.com/t/re-ampl-24720-how-hooking-my-solver-to-ampl/666)

<div class="topic-metadata">

**Author:** [@Shuxue\_Jiaoshou](https://discuss.ampl.com/u/Shuxue_Jiaoshou)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 4:27pm UTC](https://discuss.ampl.com/t/re-ampl-24720-how-hooking-my-solver-to-ampl/666 "2023-07-31T16:27:24Z")

</div>

A quick question – I am using the free (community) edition of AMPL (Linux version 20230124 – so the January 2023 version)… I have developed a new solver, but unable to hook it to AMPL… I have followed the instructions in…

[Previous page](https://discuss.ampl.com/c/google-group/44.md?page=2)

[Next page](https://discuss.ampl.com/c/google-group/44.md?page=4)
