# Latest

**URL:** https://discuss.ampl.com/latest.md

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

---

## [\[Solved\] Impossible to use knitro](https://discuss.ampl.com/t/solved-impossible-to-use-knitro/2285)

<div class="topic-metadata">

**Author:** [@Nico\_ampl](https://discuss.ampl.com/u/Nico_ampl)\
**Replies:** 1\
**Last updated:** [September 17, 2026, 8:35am UTC](https://discuss.ampl.com/t/solved-impossible-to-use-knitro/2285 "2026-09-17T08:35:23Z")

</div>

Hi everyone, I have requested a trial license for Knitro. I tried with a very simple problem (attached to this message) and use the following commands : model ModeleTest.mod; option solver knitro; solve; I obtain t…

---

## [Activation unsuccessful](https://discuss.ampl.com/t/activation-unsuccessful/2281)

<div class="topic-metadata">

**Author:** [@Robert\_Lin](https://discuss.ampl.com/u/Robert_Lin)\
**Replies:** 1\
**Last updated:** [September 9, 2026, 1:00pm UTC](https://discuss.ampl.com/t/activation-unsuccessful/2281 "2026-09-09T13:00:14Z")

</div>

When I type in the UUID, for activating my installation, it doesn’t work, but it works for other students.

---

## [Is it possible to create a set from a parameter?](https://discuss.ampl.com/t/is-it-possible-to-create-a-set-from-a-parameter/2280)

<div class="topic-metadata">

**Author:** [@Lothar\_Lower](https://discuss.ampl.com/u/Lothar_Lower)\
**Replies:** 3\
**Last updated:** [July 23, 2026, 9:50am UTC](https://discuss.ampl.com/t/is-it-possible-to-create-a-set-from-a-parameter/2280 "2026-07-23T09:50:41Z")

</div>

I am reading parameter from an excel-file using amplxl.dll. Partly, the parameter data (columns in excel) contain empty data. set MPC\_BRA\_ID default {}; param bra\_type{MPC\_BRA\_ID} symbolic default ‘’; param bra\_tap\_po…

---

## [offline / HPC-compatible Community Edition or academic license](https://discuss.ampl.com/t/offline-hpc-compatible-community-edition-or-academic-license/2242)

<div class="topic-metadata">

**Author:** [@nko17](https://discuss.ampl.com/u/nko17)\
**Replies:** 1\
**Last updated:** [May 14, 2026, 7:45pm UTC](https://discuss.ampl.com/t/offline-hpc-compatible-community-edition-or-academic-license/2242 "2026-05-14T19:45:32Z")

</div>

Hello, I am trying to run AMPL with the Community Edition license on a university HPC cluster using Slurm. AMPL works on the login node, but when the job runs on a compute node, I get: “Short term lease expired. Pleas…

---

## [FINAL CALL for Optimization Modeling & Deployment Sessions at 2026 INFORMS Annual Meeting](https://discuss.ampl.com/t/final-call-for-optimization-modeling-deployment-sessions-at-2026-informs-annual-meeting/2234)

<div class="topic-metadata">

**Author:** [@4er](https://discuss.ampl.com/u/4er)\
**Replies:** 0\
**Last updated:** [April 26, 2026, 4:22pm UTC](https://discuss.ampl.com/t/final-call-for-optimization-modeling-deployment-sessions-at-2026-informs-annual-meeting/2234 "2026-04-26T16:22:35Z")

</div>

There’s still time to join our Community Sessions in the area of “Optimization Modeling & Deployment Software” at the 2026 INFORMS Annual Meeting, to be held November 1-4, 2026 in San Francisco (meetings.informs.org/word…

---

## [Fixing and unfixing a series of variables before a second solve](https://discuss.ampl.com/t/fixing-and-unfixing-a-series-of-variables-before-a-second-solve/2233)

<div class="topic-metadata">

**Author:** [@marnie2k](https://discuss.ampl.com/u/marnie2k)\
**Replies:** 1\
**Last updated:** [April 13, 2026, 12:57am UTC](https://discuss.ampl.com/t/fixing-and-unfixing-a-series-of-variables-before-a-second-solve/2233 "2026-04-13T00:57:06Z")

</div>

Good afternoon, Lately I have been working on a model that requires me to, after a first optimization, fix a series of variables and unfix some according to a certain condition and after that, perform a second solve. D…

---

## [Common subexpressions](https://discuss.ampl.com/t/common-subexpressions/2232)

<div class="topic-metadata">

**Author:** [@\_nr](https://discuss.ampl.com/u/_nr)\
**Replies:** 1\
**Last updated:** [April 8, 2026, 6:52pm UTC](https://discuss.ampl.com/t/common-subexpressions/2232 "2026-04-08T18:52:46Z")

</div>

Does AMPL internally do any common subexpression elimination (CSE) with the algebraic expressions? The expressions in my AMPL model can become quite large. However, the model will have many common subexpressions. If AMPL…

---

## [\[AMPL 25089\] AMPL encryption instruction](https://discuss.ampl.com/t/ampl-25089-ampl-encryption-instruction/2230)

<div class="topic-metadata">

**Author:** [@mangotree](https://discuss.ampl.com/u/mangotree)\
**Replies:** 2\
**Last updated:** [March 30, 2026, 4:02am UTC](https://discuss.ampl.com/t/ampl-25089-ampl-encryption-instruction/2230 "2026-03-30T04:02:32Z")

</div>

Dear AMPL Team, I have a question. As I know, AMPL provides official, built-in encryption to protect model files (.mod), data files (.dat), and script files (.run). The encrypted format is .bam (Binary AMPL), a compiled…

---

## [Performance difference between defined variables and s.t. or syntatic sugar?](https://discuss.ampl.com/t/performance-difference-between-defined-variables-and-s-t-or-syntatic-sugar/2228)

<div class="topic-metadata">

**Author:** [@\_nr](https://discuss.ampl.com/u/_nr)\
**Replies:** 3\
**Last updated:** [March 14, 2026, 4:43am UTC](https://discuss.ampl.com/t/performance-difference-between-defined-variables-and-s-t-or-syntatic-sugar/2228 "2026-03-14T04:43:27Z")

</div>

I appreciate how defined variables, e.g., var x {...} = ...; helps keep my AMPL code maintainable. However, for performance reasons, should I prefer something like var x {...}; s.t. X {...} : x\[...\] = ...; instead? How…

---

## [\[AMPL 25087\] Using AMPL Extended Functions with Global Optimization Solvers](https://discuss.ampl.com/t/ampl-25087-using-ampl-extended-functions-with-global-optimization-solvers/2227)

<div class="topic-metadata">

**Author:** [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Replies:** 1\
**Last updated:** [March 4, 2026, 7:56pm UTC](https://discuss.ampl.com/t/ampl-25087-using-ampl-extended-functions-with-global-optimization-solvers/2227 "2026-03-04T19:56:02Z")

</div>

Hello, I am trying to use AMPL extended functions in my model. I have the following lines in my model: load amplgsl.dll; function gsl\_cdf\_beta\_P; Since the problem is nonlinear, I need to use a global optimizer such …

---

## [Using AMPL Extended Functions with Global Optimization Solvers](https://discuss.ampl.com/t/using-ampl-extended-functions-with-global-optimization-solvers/2226)

<div class="topic-metadata">

**Author:** [@pelkec](https://discuss.ampl.com/u/pelkec)\
**Replies:** 1\
**Last updated:** [March 4, 2026, 7:53pm UTC](https://discuss.ampl.com/t/using-ampl-extended-functions-with-global-optimization-solvers/2226 "2026-03-04T19:53:00Z")

</div>

Hello, I am trying to use the AMPL extended functions in my model. My code has the lines: load amplgsl.dll; function gsl\_cdf\_beta\_P; Since my problem is nonlinear, I need to use a global optimizer such as BARON, LINDO…

---

## [Implementation of optimization routine](https://discuss.ampl.com/t/implementation-of-optimization-routine/2216)

<div class="topic-metadata">

**Author:** [@glarange](https://discuss.ampl.com/u/glarange)\
**Replies:** 9\
**Last updated:** [February 9, 2026, 6:11pm UTC](https://discuss.ampl.com/t/implementation-of-optimization-routine/2216 "2026-02-09T18:11:43Z")

</div>

Hi everyone, relative newbie here. Trying to implement the attached algo with the following code: from amplpy import AMPL, ampl\_notebook ampl = ampl\_notebook( modules=\["highs"\], # modules to install license…

---

## [\[AMPL 25086\] Error at \_cmdno 26 executing "solve" command](https://discuss.ampl.com/t/ampl-25086-error-at-cmdno-26-executing-solve-command/2219)

<div class="topic-metadata">

**Author:** [@Vivi](https://discuss.ampl.com/u/Vivi)\
**Replies:** 3\
**Last updated:** [February 2, 2026, 2:41pm UTC](https://discuss.ampl.com/t/ampl-25086-error-at-cmdno-26-executing-solve-command/2219 "2026-02-02T14:41:07Z")

</div>

Dear AMPL team, I am reading my data from spreadsheet and I have a set of only one member and a parameter related to this set. The Excel file is attached. And in the .run file to read the spreadsheet I have thoses state…

---

## [Error in VS Code but runs fine in Google Colab notebook](https://discuss.ampl.com/t/error-in-vs-code-but-runs-fine-in-google-colab-notebook/2223)

<div class="topic-metadata">

**Author:** [@teclipse3](https://discuss.ampl.com/u/teclipse3)\
**Replies:** 0\
**Last updated:** [January 31, 2026, 3:35pm UTC](https://discuss.ampl.com/t/error-in-vs-code-but-runs-fine-in-google-colab-notebook/2223 "2026-01-31T15:35:58Z")

</div>

Here is the code that I run in VS Code (which runs fine in a Google Colab notebook) and the error message that I get when running in VS Code. I included my import statement that was run in a previous cell. from amplpy …

---

## [Interpreting presolve output](https://discuss.ampl.com/t/interpreting-presolve-output/2215)

<div class="topic-metadata">

**Author:** [@\_nr](https://discuss.ampl.com/u/_nr)\
**Replies:** 4\
**Last updated:** [January 19, 2026, 2:16am UTC](https://discuss.ampl.com/t/interpreting-presolve-output/2215 "2026-01-19T02:16:57Z")

</div>

How should I interpret the output of show\_stats with respect to the original model (the one prior to the presolve step)? I’m trying to understand the meaning behind the number of eliminated variables and constraints rep…

---

## [Solution obtained using an unauthorized or unknown solver](https://discuss.ampl.com/t/solution-obtained-using-an-unauthorized-or-unknown-solver/2214)

<div class="topic-metadata">

**Author:** [@pinghsin](https://discuss.ampl.com/u/pinghsin)\
**Replies:** 1\
**Last updated:** [January 12, 2026, 4:39pm UTC](https://discuss.ampl.com/t/solution-obtained-using-an-unauthorized-or-unknown-solver/2214 "2026-01-12T16:39:42Z")

</div>

I am currently using AMPL to solve a nonlinear equilibrium problem. My AMPL license is the Academic Community Edition, and the nonlinear solver I am using is KNITRO. According to the AMPL output, the problem appears to …

---

## [Implementation continuous p-median problem](https://discuss.ampl.com/t/implementation-continuous-p-median-problem/2213)

<div class="topic-metadata">

**Author:** [@nickgessner\_9](https://discuss.ampl.com/u/nickgessner_9)\
**Replies:** 4\
**Last updated:** [December 26, 2025, 1:47pm UTC](https://discuss.ampl.com/t/implementation-continuous-p-median-problem/2213 "2025-12-26T13:47:28Z")

</div>

Good day, I’m using amplpy and planning to solve the attached continuous problem in 3D. Could someone give me some hints as to the modelling? I’m planning to solve this using SNOPT and randomly generated starting points…

---

## [Problem with piecewise linear formulation](https://discuss.ampl.com/t/problem-with-piecewise-linear-formulation/2208)

<div class="topic-metadata">

**Author:** [@Lothar\_Lower](https://discuss.ampl.com/u/Lothar_Lower)\
**Replies:** 6\
**Last updated:** [December 15, 2025, 8:56am UTC](https://discuss.ampl.com/t/problem-with-piecewise-linear-formulation/2208 "2025-12-15T08:56:58Z")

</div>

I want to define the following curve, dealing with a shunt element including a tap changer. Using the tap changer position, which finally shall be optimized, the power consumption behaves like depicted. The sampling …

---

## [Size limits even with the free open-source solvers](https://discuss.ampl.com/t/size-limits-even-with-the-free-open-source-solvers/2211)

<div class="topic-metadata">

**Author:** [@ibuh](https://discuss.ampl.com/u/ibuh)\
**Replies:** 1\
**Last updated:** [November 17, 2025, 8:58pm UTC](https://discuss.ampl.com/t/size-limits-even-with-the-free-open-source-solvers/2211 "2025-11-17T20:58:48Z")

</div>

Hi, I’m trying to run a MILP problem and I receive the error message: Sorry, a demo license is limited to 300 variables and 300 constraints and objectives. You have 340 variables, 128 constraints, and 1 objective. e…

---

## [AMPL + amplpy + Gurobi 12.0.1: solver call stops with access violation on Windows](https://discuss.ampl.com/t/ampl-amplpy-gurobi-12-0-1-solver-call-stops-with-access-violation-on-windows/2210)

<div class="topic-metadata">

**Author:** [@irepiso](https://discuss.ampl.com/u/irepiso)\
**Replies:** 1\
**Last updated:** [November 12, 2025, 12:32pm UTC](https://discuss.ampl.com/t/ampl-amplpy-gurobi-12-0-1-solver-call-stops-with-access-violation-on-windows/2210 "2025-11-12T12:32:01Z")

</div>

Hi everyone, I’m encountering a reproducible crash when running a nonconvex (QCQP) AC-OPF model in AMPL through amplpy using Gurobi 12.0.1 on Windows 11. The same model and data run perfectly with IPOPT, but Gurobi term…

---

## [FileNotFoundError when installing modules (ampl-3.0.0.dll) with amplpy.modules](https://discuss.ampl.com/t/filenotfounderror-when-installing-modules-ampl-3-0-0-dll-with-amplpy-modules/2209)

<div class="topic-metadata">

**Author:** [@angelmanuel.rueda](https://discuss.ampl.com/u/angelmanuel.rueda)\
**Replies:** 2\
**Last updated:** [November 10, 2025, 5:21pm UTC](https://discuss.ampl.com/t/filenotfounderror-when-installing-modules-ampl-3-0-0-dll-with-amplpy-modules/2209 "2025-11-10T17:21:30Z")

</div>

Dear AMPL Support, I have installed amplpy using pip, and the installation seemed to complete correctly: pip install amplpy Next, I tried to install modules for open-source solvers to use them through Pyomo. Following…

---

## [Bug with AMPL constructor using special caracters (C#)](https://discuss.ampl.com/t/bug-with-ampl-constructor-using-special-caracters-c/2036)

<div class="topic-metadata">

**Author:** [@Nico\_ampl](https://discuss.ampl.com/u/Nico_ampl)\
**Replies:** 4\
**Last updated:** [November 10, 2025, 10:00am UTC](https://discuss.ampl.com/t/bug-with-ampl-constructor-using-special-caracters-c/2036 "2025-11-10T10:00:54Z")

</div>

Hi everyone, I am using the C# API of AMPL and I have encountered an issue with the following code: var ampl = new AMPL(new ampl.Environment(@"C:\\AmplInstall")); If the directory path contains special characters (such…

---

## [Open source complementarity solver?](https://discuss.ampl.com/t/open-source-complementarity-solver/2205)

<div class="topic-metadata">

**Author:** [@jsm5712](https://discuss.ampl.com/u/jsm5712)\
**Replies:** 4\
**Last updated:** [November 6, 2025, 7:19pm UTC](https://discuss.ampl.com/t/open-source-complementarity-solver/2205 "2025-11-06T19:19:14Z")

</div>

I am interested in using the open-source solvers in AMPL for a nonlinear complementarity problem. I have it working in a paid version of GAMS using PATH; I just want to try it out in AMPL. It’s not an optimization proble…

---

## [Question about timing discrepancy between \_solve\_elapsed\_time and actual wall-clock time](https://discuss.ampl.com/t/question-about-timing-discrepancy-between-solve-elapsed-time-and-actual-wall-clock-time/2204)

<div class="topic-metadata">

**Author:** [@dmorill](https://discuss.ampl.com/u/dmorill)\
**Replies:** 1\
**Last updated:** [November 6, 2025, 1:27pm UTC](https://discuss.ampl.com/t/question-about-timing-discrepancy-between-solve-elapsed-time-and-actual-wall-clock-time/2204 "2025-11-06T13:27:06Z")

</div>

Dear AMPL Support Team, I am currently developing a medium-sized cutting stock model in AMPL using CPLEX as the solver. I am trying to analyze the computational times of my model, but I have noticed a significant discr…

---

## [My uuid is not being recognized by AMPL.exe](https://discuss.ampl.com/t/my-uuid-is-not-being-recognized-by-ampl-exe/2206)

<div class="topic-metadata">

**Author:** [@Ian\_Kong](https://discuss.ampl.com/u/Ian_Kong)\
**Replies:** 1\
**Last updated:** [November 4, 2025, 8:01pm UTC](https://discuss.ampl.com/t/my-uuid-is-not-being-recognized-by-ampl-exe/2206 "2025-11-04T20:01:14Z")

</div>

When I type the command: ampl: shell “amplkey activate --uuid ”; Ampl reads back: ‘amplkey’ is not recognized as an internal or external command, operable program or batch file. exit value 1 I may have activated th…

---

## [Issue With Syntax For BARON Solver](https://discuss.ampl.com/t/issue-with-syntax-for-baron-solver/2202)

<div class="topic-metadata">

**Author:** [@DeGoodma5](https://discuss.ampl.com/u/DeGoodma5)\
**Replies:** 1\
**Last updated:** [November 4, 2025, 3:30pm UTC](https://discuss.ampl.com/t/issue-with-syntax-for-baron-solver/2202 "2025-11-04T15:30:04Z")

</div>

Hello I am having issues with using BARON to solve an optimization problem. Right now I am receiving errors about syntax errors concerning the use of scientific notation. Below is the error I am receiving: \[ERROR\] lin…

---

## [Would you consider publishing pyodide-compatible wheels?](https://discuss.ampl.com/t/would-you-consider-publishing-pyodide-compatible-wheels/2203)

<div class="topic-metadata">

**Author:** [@Jan\_Burgy](https://discuss.ampl.com/u/Jan_Burgy)\
**Replies:** 2\
**Last updated:** [November 1, 2025, 2:08am UTC](https://discuss.ampl.com/t/would-you-consider-publishing-pyodide-compatible-wheels/2203 "2025-11-01T02:08:33Z")

</div>

I am evaluating AMPL for my next assignment. I like what I see so far, particularly the notebook integration. I am also a big fan of JupyterLite for demos. Unfortunately, %pip install amplpy fails with ValueError: Ca…

---

## [\[AMPL 24926\] AMPL CE running multiple jobs in parallel using SLURM](https://discuss.ampl.com/t/ampl-24926-ampl-ce-running-multiple-jobs-in-parallel-using-slurm/847)

<div class="topic-metadata">

**Author:** [@Claudio\_Contardo](https://discuss.ampl.com/u/Claudio_Contardo)\
**Replies:** 2\
**Last updated:** [October 28, 2025, 9:10pm UTC](https://discuss.ampl.com/t/ampl-24926-ampl-ce-running-multiple-jobs-in-parallel-using-slurm/847 "2025-10-28T21:10:32Z")

</div>

Hello, For research purposes, I need to execute a solver built upon ASL on thousands of problem instances. The solver used is custom (made of the interaction of CPLEX + custom routines in an iterative fashion). I have a…

---

## [Question About Setting Up BARON Solver](https://discuss.ampl.com/t/question-about-setting-up-baron-solver/2200)

<div class="topic-metadata">

**Author:** [@DeGoodma5](https://discuss.ampl.com/u/DeGoodma5)\
**Replies:** 14\
**Last updated:** [October 22, 2025, 5:50pm UTC](https://discuss.ampl.com/t/question-about-setting-up-baron-solver/2200 "2025-10-22T17:50:58Z")

</div>

I am confused on why my code in VS code that uses python says that BARON does not have a license. I set up everything but the terminal seems to not see the license since it is cloud based.

---

## [Extending trial license](https://discuss.ampl.com/t/extending-trial-license/2199)

<div class="topic-metadata">

**Author:** [@romanochris](https://discuss.ampl.com/u/romanochris)\
**Replies:** 1\
**Last updated:** [October 14, 2025, 5:52pm UTC](https://discuss.ampl.com/t/extending-trial-license/2199 "2025-10-14T17:52:13Z")

</div>

I’m using the free community edition with trial licenses to Mosek, Gurobi, CPLEX, and Xpress. My 30 days are over. Is there a way to extend those another 10 days (or X days)?

[Next page](https://discuss.ampl.com/latest.md?page=1)
