Search found 6 matches
- 2 years ago
- Forum: API
- Topic: Running NEOS from Python API , importing data from excel
- Replies: 1
- Views: 5417
Running NEOS from Python API , importing data from excel
I am trying to run a model using NEOS from Python For modelling I am using: def get_model_text(): For the data , I am importing it from excel. Then, I want to combine it and send it to NEOS to solve. The example in GAMS implementing NEOS uses a .gms file which contains the data and model both, as im...
- 2 years ago
- Forum: Syntax
- Topic: Running NEOS from Python API
- Replies: 7
- Views: 9798
Re: Running NEOS from Python API
Can we add data from excel file, model from texts and then use python to send it to NEOS ? model = 'trnsport' # str | Name of the main .gms file ws.gamslib(model) The example in GAMS uses a .gms file which contains the data and model both. I am trying to build my model from the text and get data fro...
- 2 years ago
- Forum: Solvers
- Topic: Barons restricting the iteration numbers
- Replies: 1
- Views: 2742
Barons restricting the iteration numbers
I am solving a nlp using barons, I tried restricting the number of iterations to a fixed value like 100. I am sending my problem to neos and it always solves problem to optimality. I am adding the following code to restrict iterations $onecho > baron.opt MaxIter 100 $offecho How can I restrict the n...
- 2 years ago
- Forum: Solvers
- Topic: Barons adding constraints at each iteration
- Replies: 0
- Views: 6735
Barons adding constraints at each iteration
I am using Barons to solve a nlp.
I want to add constraints after every iteration and check for some conditions.
I also want to interact with the solutions obtained at each iteration.
Is there any example or guide implemented already.
Thanks.
I want to add constraints after every iteration and check for some conditions.
I also want to interact with the solutions obtained at each iteration.
Is there any example or guide implemented already.
Thanks.
- 2 years ago
- Forum: Modeling
- Topic: Iterating twice through the same set
- Replies: 3
- Views: 1988
Re: Iterating twice through the same set
The alias part is working fine.
But I want to run the constraint for i!=ii.
The code you provided gives the following error.
constraint(k, i, ii) (ord(i) <> ord(ii))..
Error:
'=' or '..' or ':=' or '$=' operator expected
rest of statement ignored
Thank You for your reply.
But I want to run the constraint for i!=ii.
The code you provided gives the following error.
constraint(k, i, ii) (ord(i) <> ord(ii))..
Error:
'=' or '..' or ':=' or '$=' operator expected
rest of statement ignored
Thank You for your reply.
- 2 years ago
- Forum: Modeling
- Topic: Iterating twice through the same set
- Replies: 3
- Views: 1988
Iterating twice through the same set
I am new to GAMS, previously I was using CPLEX, In CPLEX we had iterative variables and sets as separate. But in GAMS there doesn't seems to be an iterative variable. Here is my problem. Sets i products / Product1, Product2, Product3, Product4,Product5 / k customers / Customer1, Customer2,Customer3,...