Number of nonzero elements

Hi everybody,
I want some information about nonzero elements. What is the definition of nonzero elements that it describe in the summary report?
Regards

F


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Gams does not do the optimization itself. It send the problem to external solvers.
The external solvers “ask” iteratively for information about the problem to Gams, such as , evaluation of functions (objetive and contraints). Optimization solvers need also the Gradient of the constraints and the Hessian matrix.
Due to the structure of your problem, these matrix have elements that are not filled (zeros), in this case, some solvers “zip” the matrix, “transporting” the “zipped” matrix between Gams and the external solvers. This process reduce computational time since the number of zeros, sometimes, is large.
For example: A problem with 1000 variables and 100 constraints, results in a gradient matrix of 1000x100, or 100.000 elements.
Depending of the problem structure we may have around 15.000 non-zeros and this values will be “transfered” between the solver and GAMS.
This zipped matrix is called “sparse” and the complete matrix is called “dense”.
I hope I have helped you.
Edson

akram avami escreveu:

Hi everybody,
I want some information about nonzero elements. What is the definition of nonzero elements that it describe in the summary report?
Regards

F

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

Dear Edson,
Thank you very much for your information. If I want to reduce the number of zero elements, should I reformulate the problem?
Regards
Fereshte

On Tue, Apr 26, 2011 at 4:12 PM, Edson Cordeiro do Valle wrote:

Gams does not do the optimization itself. It send the problem to external solvers.
The external solvers “ask” iteratively for information about the problem to Gams, such as , evaluation of functions (objetive and contraints). Optimization solvers need also the Gradient of the constraints and the Hessian matrix.
Due to the structure of your problem, these matrix have elements that are not filled (zeros), in this case, some solvers “zip” the matrix, “transporting” the “zipped” matrix between Gams and the external solvers. This process reduce computational time since the number of zeros, sometimes, is large.
For example: A problem with 1000 variables and 100 constraints, results in a gradient matrix of 1000x100, or 100.000 elements.
Depending of the problem structure we may have around 15.000 non-zeros and this values will be “transfered” between the solver and GAMS.
This zipped matrix is called “sparse” and the complete matrix is called “dense”.
I hope I have helped you.
Edson

akram avami escreveu:

Hi everybody,
I want some information about nonzero elements. What is the definition of nonzero elements that it describe in the summary report?
Regards

F

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Well, what I forgot to mention is that the size of your problem (number of equations and variables) also impacts in the number of non-zeros (nnz).
The nnz, if your problem is well scaled, will influence only in the computation time (high nnz, high computational time). Depending on your problem, it is not possible to reformulate it. Nnz will appear in equations with many variables, for example, the HS71 problem:

VARIABLES
x1,x2, x3 x4 as Real(Default=1, Lower=1, Upper=5);
MINIMIZE
x1x4(x1+x2+x3) + x3;
EQUATIONS
x1x2x3x4 > 25;
x1
x1 + x2x2 + x3x3 + x4*x4 = 40;

Equation 1 and 2 has 4 variables. Their gradients matriz will be filled with all elements the nnz of gradient of eq 1 and 2 will have 4 nnz each. In this case it is not possible to change the nnz.
I equation 1 is something like x1*x4 =0 the gradient will have only 2 elements and 2 nnz.

Regards

2011/4/26 akram avami

Dear Edson,
Thank you very much for your information. If I want to reduce the number of zero elements, should I reformulate the problem?
Regards
Fereshte


On Tue, Apr 26, 2011 at 4:12 PM, Edson Cordeiro do Valle wrote:

Gams does not do the optimization itself. It send the problem to external solvers.
The external solvers “ask” iteratively for information about the problem to Gams, such as , evaluation of functions (objetive and contraints). Optimization solvers need also the Gradient of the constraints and the Hessian matrix.
Due to the structure of your problem, these matrix have elements that are not filled (zeros), in this case, some solvers “zip” the matrix, “transporting” the “zipped” matrix between Gams and the external solvers. This process reduce computational time since the number of zeros, sometimes, is large.
For example: A problem with 1000 variables and 100 constraints, results in a gradient matrix of 1000x100, or 100.000 elements.
Depending of the problem structure we may have around 15.000 non-zeros and this values will be “transfered” between the solver and GAMS.
This zipped matrix is called “sparse” and the complete matrix is called “dense”.
I hope I have helped you.
Edson

akram avami escreveu:

Hi everybody,
I want some information about nonzero elements. What is the definition of nonzero elements that it describe in the summary report?
Regards

F

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Edson Valle
edsoncv@gmail.com


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Dear Edson,
Thank you very much.
Regards
F

On Tue, Apr 26, 2011 at 7:16 PM, Edson Valle wrote:

Well, what I forgot to mention is that the size of your problem (number of equations and variables) also impacts in the number of non-zeros (nnz).
The nnz, if your problem is well scaled, will influence only in the computation time (high nnz, high computational time). Depending on your problem, it is not possible to reformulate it. Nnz will appear in equations with many variables, for example, the HS71 problem:

VARIABLES
x1,x2, x3 x4 as Real(Default=1, Lower=1, Upper=5);
MINIMIZE
x1x4(x1+x2+x3) + x3;
EQUATIONS
x1x2x3x4 > 25;
x1
x1 + x2x2 + x3x3 + x4*x4 = 40;

Equation 1 and 2 has 4 variables. Their gradients matriz will be filled with all elements the nnz of gradient of eq 1 and 2 will have 4 nnz each. In this case it is not possible to change the nnz.
I equation 1 is something like x1*x4 =0 the gradient will have only 2 elements and 2 nnz.

Regards

2011/4/26 akram avami

Dear Edson,
Thank you very much for your information. If I want to reduce the number of zero elements, should I reformulate the problem?
Regards
Fereshte


On Tue, Apr 26, 2011 at 4:12 PM, Edson Cordeiro do Valle wrote:

Gams does not do the optimization itself. It send the problem to external solvers.
The external solvers “ask” iteratively for information about the problem to Gams, such as , evaluation of functions (objetive and contraints). Optimization solvers need also the Gradient of the constraints and the Hessian matrix.
Due to the structure of your problem, these matrix have elements that are not filled (zeros), in this case, some solvers “zip” the matrix, “transporting” the “zipped” matrix between Gams and the external solvers. This process reduce computational time since the number of zeros, sometimes, is large.
For example: A problem with 1000 variables and 100 constraints, results in a gradient matrix of 1000x100, or 100.000 elements.
Depending of the problem structure we may have around 15.000 non-zeros and this values will be “transfered” between the solver and GAMS.
This zipped matrix is called “sparse” and the complete matrix is called “dense”.
I hope I have helped you.
Edson

akram avami escreveu:

Hi everybody,
I want some information about nonzero elements. What is the definition of nonzero elements that it describe in the summary report?
Regards

F

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Edson Valle
edsoncv@gmail.com


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.