Search found 21 matches

by moosavi_69
5 days ago
Forum: Tools
Topic: Make a noise in GAMS
Replies: 2
Views: 167

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
2 months ago
Forum: Tools
Topic: Importing data from GMAS to MATLAB
Replies: 3
Views: 1005

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 982 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
2 months ago
Forum: Tools
Topic: Importing data from GMAS to MATLAB
Replies: 3
Views: 1005

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
2 months ago
Forum: Solvers
Topic: Save CPU time when running a model for multiple times
Replies: 3
Views: 855

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: 685

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: 894

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: 1397

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: 1397

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...
by moosavi_69
2 years ago
Forum: Modeling
Topic: Division by zero for division of two continuous variables
Replies: 4
Views: 1225

Re: Division by zero for division of two continuous variables

I also found another solution to this problem, specifically for the Baron solver. If you add the following code, the Baron could ignore the error and try to find a feasible solution. I think there should be similar options for other solvers as well. But what you mentioned, is a solution for all solv...