which is more efficient

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

which is more efficient

Post by Archiver »

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


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: which is more efficient

Post by Archiver »



thank you
it is MIP problem

presolve eliminated 30730rows and 42950 columns and 313 coefficient modifications
reduced MIP has 1638 rows and 11367 columns
reduced LP has 1400 rows and 23088 columns


and unsolvable because it gives out of memory error
I use 64 bit system to use much morememory but again gives memory error but of course with smaller gap
so I thought it might be because of my model equations

one more question
there is suppliers and transportation modes used.
for some suppliers some modes are not used
I gace zero capacity for them so 0 costs
but if I gave some capacity but huge cost, is it efficient
I do not think so but now I can not really understand the effect of my modeifications








--- On Sun, 13/4/08, Steven Dirkse wrote:

> > From: Steven Dirkse
> > Subject: Re: which is more efficient
> > To: gamsworld@googlegroups.com
> > Date: Sunday, 13 April, 2008, 10: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
> >
> >

___________________________________________________________
Yahoo! For Good helps you make a difference

http://uk.promotions.yahoo.com/forgood/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


Post Reply