Search found 6 matches

by danish3186
2 years ago
Forum: API
Topic: Running NEOS from Python API , importing data from excel
Replies: 1
Views: 5326

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...
by danish3186
2 years ago
Forum: Syntax
Topic: Running NEOS from Python API
Replies: 7
Views: 8039

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...
by danish3186
2 years ago
Forum: Solvers
Topic: Barons restricting the iteration numbers
Replies: 1
Views: 2651

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...
by danish3186
2 years ago
Forum: Solvers
Topic: Barons adding constraints at each iteration
Replies: 0
Views: 4199

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.
by danish3186
2 years ago
Forum: Modeling
Topic: Iterating twice through the same set
Replies: 3
Views: 1840

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.
by danish3186
2 years ago
Forum: Modeling
Topic: Iterating twice through the same set
Replies: 3
Views: 1840

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,...