Search found 22 matches

by moosavi_69
1 month ago
Forum: Syntax
Topic: routing problem
Replies: 1
Views: 126

Re: routing problem

Dear Amirhossein,

It is happening because your model cannot control such situations. If you have already designed constraints for these infeasibilities, you should check why they are not working properly. If you have not included any yet, you should design one.

Best, Amirhossein
by moosavi_69
4 months ago
Forum: Tools
Topic: Make a noise in GAMS
Replies: 2
Views: 1157

Make a noise in GAMS

Hello,

Is there any way to make a noise in GAMS at the end of a code (solving an MIP model)? I do not want to check the GAMS environment back and forth to see whether the solving process has been completed.

Best, Amir
by moosavi_69
6 months ago
Forum: Tools
Topic: Importing data from GMAS to MATLAB
Replies: 3
Views: 1346

Re: Importing data from GMAS to MATLAB

Thank you Steve!

Please look at the reults provided below:
U.form = 'sparse';
image.png
image.png (11.08 KiB) Viewed 1323 times
The results in the sparse form must be as follows:
1 1 1
2 1 1
For the full form also:
U.form = 'full';
image.png
If you need anything else, please let me know.
by moosavi_69
6 months ago
Forum: Tools
Topic: Importing data from GMAS to MATLAB
Replies: 3
Views: 1346

Importing data from GMAS to MATLAB

Hello everyone, I want to import input data defined in GAMS to MATLAB. I first generate a gdx file of input data (an example file attached), then, I use rgdx function in MATLAB to read sets, scalars and parameters stored in the gdx file. Although I do not have any problem with linking GAMS and MATLA...
by moosavi_69
7 months ago
Forum: Solvers
Topic: Save CPU time when running a model for multiple times
Replies: 3
Views: 1561

Save CPU time when running a model for multiple times

Hello, I have an MILP model (with both binary and non-negative variables) that I aim to solve a part of it with the CPLEX solver. In fact, I want to use a meta-heuristic algorithm to first determine the binary variables of this model. Then, I will let GAMS finds the optimal values of non-negative va...
by moosavi_69
1 year ago
Forum: Syntax
Topic: Record optimality gap at different CPU times
Replies: 1
Views: 971

Record optimality gap at different CPU times

Dear experts, Suppose a hard constraint mathematical model that could be solved by the CPLEX solver. I want to automatically record the optimality gap at different CPU times, e.g., 5 secs, 10 secs, 30 secs and 60 secs. What is the syntax that I can use to record the above information? If you need mo...
by moosavi_69
1 year ago
Forum: Tools
Topic: Exit code = 6 / Unable to open output file
Replies: 1
Views: 1092

Exit code = 6 / Unable to open output file

Dear friends, I am solving a multi-echelon supply chain problem with the Benders Decomposition algorithm. When the problem becomes large, I confront with an error shown in the following. http://uupload.ir/files/lr8n_untitled.png To reduce the size of lst file, I have used two below options: Option l...
by moosavi_69
1 year ago
Forum: Tools
Topic: Generate an array of random numbers
Replies: 6
Views: 1844

Re: Generate an array of random numbers

You are right. Unfortunately, the compact method of Mr. dirkse does not always work properly. The suggested method by Mr. Manassaldi works perfectly. Thanks.
by moosavi_69
1 year ago
Forum: Tools
Topic: Generate an array of random numbers
Replies: 6
Views: 1844

Generate an array of random numbers

Dear Friends, I have defined set W and parameter Coef(W) as follows: Set W /1*10/; Parameter Coef(W); I would like to randomly assign binary values to Coef(W) ; where about %A of elements in W get 1, and %(100-A) of them get 0. For instance, if A is equal to 70, therefore, Coef(W) could be one of th...