Questions tagged [ampl]

AMPL is an algebraic modeling language for mathematical optimization. It supports a wide range of problems such as linear, quadratic and nonlinear problems in continuous and discrete variables and is connected to most solvers.

AMPL, an acronym for A Mathematical Programming Language, is an algebraic modeling language for describing and solving high-complexity problems for large-scale mathematical computation (i.e. large-scale optimization and scheduling-type problems). It was developed by Robert Fourer, David Gay and Brian Kernighan at Bell Laboratories. AMPL supports dozens of solvers, both open source and commercial, including CBC, CPLEX, FortMP, Gurobi, MINOS, IPOPT, SNOPT and KNITRO.

More on AMPL

AMPL home page

AMPL on Wikipedia

414 questions
-1
votes
2 answers

AMPL: error processing param: invalid subscripts discarded

So, i am trying to solve a non linear problem with AMPL and get this error when trying to run. I have multiple objevtives as you can see in the code below, 32 to be precise, since my test parameters are indexed in a set of 32 elements (I). I do not…
-1
votes
1 answer

How can I implement these 2 additional constraint in this AMPL shortest path problem?

This is the problem So given this, If I want to Formulate an ILP model to determine the least costly route in case there are the following additional constraints: -if arc (1,4) is used, then also arc (4,6) must be used; -on the other hand, if arc…
-1
votes
1 answer

Coding In AMPL Software

How can I start with a specific city under a set of cities, rather than using x[i,j] I want to write such constraint x[1,2] + x[2,5] = 1 Moreover, how can I start from i=2, j=2 rather than start with i,j =1 Thanks, Haidar
Haidar
  • 1
  • 1
-1
votes
1 answer

AMPL constraint syntax in a summation

I am performing an Integer Linear Programming optimisation with the following constraint: s.t. Constraint {i in N}: sum {j in F} A[i,j] * X[j] >= B[i]; How do I modify the constraint above so that it is able to constrain my model in a way that X1…
-1
votes
1 answer

Create a matrix in AMPL that consists of other matrices

The purpose of the code is to solve the 'ABC' puzzle found at this link: https://www.brainbashers.com/abcview.asp The letters on the perimeter tell you which column, row, or diagonal each letter must be placed and the next letter must be placed in a…
lizard2020
  • 55
  • 2
  • 7
-1
votes
1 answer

Using AMPL C++ Apis for C?

I've looked for C APIs, but I've only found C++ API's that can't be used inside a C code. Are there any C (not C++ or C#) APIs or another way for using AMPL in a C code?
Adl
  • 127
  • 3
  • 13
-1
votes
1 answer

AMPL Network Flow Problems

Is there a way solve network flow problem without having arc indices ? I have the below Set Branch: From_Bus To_Bus Branch_A Branch_B Can I link the branch number with from and to buses without creating a cross set and manually entering all…
-1
votes
1 answer

How can I do Monte Carlo Simulation in AMPL CPLEX?

I am minimizing my objective function. I have a parameter > param Preq{i in 1..n:=Uniform(0.002,Pmax/n) Where Pmax is .0095 and n is 12. How can I introduce Monte Carlo Simulation in my model file using this Uniform parameter?
Amigo
  • 41
  • 6
-2
votes
1 answer

How can i minimize the cost in this situation?

help, someone can help me? Minimum cost flow with fixed costs and awards for strings saturated. Consider the following variant of the problem of minimum cost flow where in addition to the network G = (V, A) with values bi associated with nodes i ∈…
gab
  • 11
1 2 3
27
28