428 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
46
views
MATLAB AMPL API Error: "Unable to resolve the name com.ampl.AMPL" despite valid license
I'm trying to run an optimization script (*.m file) using the AMPL API for MATLAB, but I encounter the following error:
Unable to resolve the name com.ampl.AMPL.
This prevents me from using AMPL ...
1
vote
1
answer
57
views
Is it possible to write AMPL NL-file in binary format by Pyomo?
We use Pyomo to exchange data with AMPL-compatable solvers by NL-file (as input) and SOL-file (as output). For some models Pyomo ConcreteModel.write(...) function generates rather big NL-files in text ...
-4
votes
1
answer
61
views
Why Google Colab reported syntax error for my code regarding amplxl
I am very new to this. I wanted to use EXCEL table data as input for my AMPL optimization code through Google Colab. I wrote the code as below, but it said Syntax Error. I don't know why. Can anyone ...
2
votes
3
answers
155
views
Why the result is infeasible?
Suppose I have a set of jobs, each needing one mold; changing from mold A to mold B has a cost. I want to search for the job sequence that minimizes the mold change cost.
job mold
Mold shift cost
My ...
2
votes
1
answer
65
views
AMPLPY: How to reset/update the parameter after solving the AMPL model?
This is a Python code segment for solving an optimal power flow problem:
if self.ini_state:
solver.read(self.pb_path[0]) # Problem parameters
solver.param['BaseMVA'] = 1
...
0
votes
0
answers
74
views
Job getting killed on HPC cluster, why?
I am trying to solve a nonlinear optimization problem in AMPL. It is quite large but not ridiculously so. I solved a similar problem on my home PC (about 1 order of magnitude less in size though).
I ...
0
votes
0
answers
52
views
How to run software installed in my home folder on a compute node
I have some software (AMPL) installed on my home folder on a Grid Engine based HPC cluster at a university.
I'm looking just to source AMPL properly when I run my jobscript in the queue.
I need to run ...
0
votes
2
answers
66
views
I have an AMPl model, like an infeasible or unbounded problem. Set dualreductions=0 or iis=1 for definitive answer. 0 simplex iterations
# SETS set B; # Candidate central kitchens set S; # Schools set C; # Categories class set K; # Set of commodities set N; # Set of nutrients set Y; # Set of groups set G {Y} within K; # Set of ...
0
votes
1
answer
94
views
Defining sets and parameters from .csv file
I have a CSV file that has an index (hours) and two parameters (consumption and insolation). I want AMPL to create another index Day that consists of 24 consecutive hours of each parameter date so I ...
-1
votes
1
answer
87
views
Why am I getting this syntax error in AMPL? (beginner)
I am learning AMPL for a university project and i don't understand why i'm getting a syntax error, my code:
model:
set FOODS;
param calories;
param proteins;
param calcium;
param vitaminA;
param cost;
...
1
vote
1
answer
84
views
Can I provide solution to ampl and check which constraints were violated?
I'm trying to fix my model for which I have a solution that should work. Is it possible to provide that solution to the solver and see which and how constraints are violated?
Edit:
Let's say I have ...
1
vote
1
answer
144
views
Conversion from .mod to .nl files without simplifications
I have some AMPL files in .mod format, which I want to convert to .nl format.
In this way, I can then easily parse them for further processing.
However, I noticed that in the conversion the problem is ...
-1
votes
1
answer
76
views
I keep running into an error with AMPL wherein whenever I try to model my mod file I get an error: d is not defined [closed]
I keep running into an error with AMPL wherein whenever I try to model my mod file I get an error:
giap.mod, line 23 (offset 1996): d is not defined
context: {(d, b) >>> : <<< d ...
0
votes
2
answers
105
views
Read in named (unindexed) parameters from a table in AMPL
If I have a number of named parameters in an AMPL model, and a table (either in an Excel spreadsheet or in AMPL's built-in format) with columns ParamName, ParamValue, is there a nice way to read these ...
1
vote
0
answers
106
views
Issue with calling Knitro
I use pyomo to formulate my problem and then use ampl to call knitro to solve my problem, as show in code below:
self.solver_pyo = pyo.SolverFactory(modules.find("Knitro"), solve_io = "nl")
My ...