8 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
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
1
answer
117
views
Compiling AMPL with Pyinstaller
I am wondering if it is possible, or if anyone has any experience with, compiling the amplpy optimization package with pyinstaller into an exe. The amplpy package github page is here
As a test case, I ...
1
vote
1
answer
678
views
amplpy: how to define data to a parameter associated with a set
I'm trying to use amplpy to link a python script to a ampl model, and the real desire is use a script to generate some parameters, and use the ampl to find the optimal values to some variables.
Worth ...
0
votes
2
answers
131
views
How to map indices of different sets in pyomo?
I have two sets in Pyomo, the first one is G=/GD1,GD2,GD3/, And the second one is N=/N1,N2,N3,...,N32,N33/. Naturally they have symbolic representation here for the sake of simplicity. I would like ...
1
vote
1
answer
431
views
Amplpy: How to use output handler?
I am new in AMPL and Python and I am using amplpy to run an AMPL model, using lpopt solver.
I need to get the output result of the solver in a way that I can act over it, i.e. I need to know if the ...
1
vote
1
answer
60
views
AMPLPY decrypt and encrypt
I am using amplpy to access AMPL from my python.
I want my dat file to not be in plain text.
Is it possible?
I cannot find any api to do it
4
votes
2
answers
1k
views
How do I fix the amplpy error on search path?
I have recently installed Amplpy for python 3.6.5 (win 32 bit), but I am facing the following issue:
Please make sure that the AMPL folder is in the system search path, or specify the path via:
...
3
votes
1
answer
230
views
Specifying default values
I have a parameter B in matrix format, defined in the model file as
param B {Rn,Rn};
for which I define the non-sparse values as
from numpy import random
from scipy import sparse
from amplpy ...