which is more efficient
Posted: Sun Apr 13, 2008 4:01 pm
porque wrote:
> I have really in trouble
> my model is very big and I have to make it more efficint
You should back up a bit and say what you mean by "very big" and "more efficient". Is this and LP, MIP, MINLP, etc. Give the number of rows, columns, and nonzeros GAMS reports in the .lst file, for example. Do you mean the model is not efficient in space, so you want it to be smaller? This will probably also make things faster at the same time. But even models that have reasonable size can be very slow to generate or solve. If it is time you are wanting to save, you should say if it is generation time or solution time (both reported in the solve summary).
> is fixing variables more efficint than wiriting them in constraints?
Fixing is more efficient, but how much so depends on the model type. It may not matter much.
> is preventing gams to calculate the variables which are 0 more
> efficient then not using many ord's and many $ conditions?
Typically the use of ord's and $ conditions (think about using dynamic sets there) is very efficient.
>
> moreover if I have an equation such that Xij=a*Yij
> for the conditions which X is 0, is it enough to fix only x variables
> to 0 or is it necessary to fix y variables as well?
It's enough to fix Xij but if you can generate a model that doesn't even contain Xij or Yij.
-Steve
> I have really in trouble
> my model is very big and I have to make it more efficint
You should back up a bit and say what you mean by "very big" and "more efficient". Is this and LP, MIP, MINLP, etc. Give the number of rows, columns, and nonzeros GAMS reports in the .lst file, for example. Do you mean the model is not efficient in space, so you want it to be smaller? This will probably also make things faster at the same time. But even models that have reasonable size can be very slow to generate or solve. If it is time you are wanting to save, you should say if it is generation time or solution time (both reported in the solve summary).
> is fixing variables more efficint than wiriting them in constraints?
Fixing is more efficient, but how much so depends on the model type. It may not matter much.
> is preventing gams to calculate the variables which are 0 more
> efficient then not using many ord's and many $ conditions?
Typically the use of ord's and $ conditions (think about using dynamic sets there) is very efficient.
>
> moreover if I have an equation such that Xij=a*Yij
> for the conditions which X is 0, is it enough to fix only x variables
> to 0 or is it necessary to fix y variables as well?
It's enough to fix Xij but if you can generate a model that doesn't even contain Xij or Yij.
-Steve