question binary variaveis and sensitivity

Dear all

Please, help me with next question, about binary variables.

1.- min CostFixcwc + CostFixrwr
s:a

Q - qg - Qd - qc + qr = 0

0 <= qcwc
0<= qr
wr

wc, wr ={0,1}

With is structure of model, obtain a result of objetive function of for example 9.14301

2.- min CostFixcwc + CostFixrwr
s:a
Q - qg - Qd - qcwc + qrwr = 0
0 <= qcwc
0<= qr
wr
wc, wr ={0,1}

And with is structure of model, obtain other diferent result of objetive function of for example 9.15203.

Perhaps the difference has to do with the sensitivities in the restriction

How explain the difference in the results, and which is the correct form of write the model in GAMS.

Tank

julio


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.

Hi julio. I think that you must to explain a little bit more your problem, because It seems that you have different results because both models are different…
In order to understand better you should explain:

  • binary variables
  • continuous variables
  • data and parameters
    … and may be, which solver are you using

Also, you can put the value of the decision variables at the optimum point (to see how different are the solutions)

Best Regards

2011/8/1 Julio López


Dear all

Please, help me with next question, about binary variables.

1.- min CostFixcwc + CostFixrwr
s:a

Q - qg - Qd - qc + qr = 0

0 <= qcwc
0<= qr
wr

wc, wr ={0,1}

With is structure of model, obtain a result of objetive function of for example 9.14301

2.- min CostFixcwc + CostFixrwr
s:a
Q - qg - Qd - qcwc + qrwr = 0
0 <= qcwc
0<= qr
wr
wc, wr ={0,1}

And with is structure of model, obtain other diferent result of objetive function of for example 9.15203.

Perhaps the difference has to do with the sensitivities in the restriction

How explain the difference in the results, and which is the correct form of write the model in GAMS.

Tank

julio


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.



\

Daniel Andrés Navia López
Ingeniero Civil Químico
Mg.Sc.Ciencias de la Ingeniería, Mención Ingeniería Química
Máster en Investigación en Ingeniería de Procesos y Sistemas
626752875


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.

Hi Daniel, excuse me, not explain the problem.

The problem consist in determine the costs of installing of the recourses qc and qr.
Some colleagues say that the second form would be better results with the first, and that the models are the same. They argue, qc, wc and qr, wr are associated, therefore the best way to write the model in GAMS is like the second
I would like to know their opinions and arguments about.
The question is, which is the the correct form of write the model in gams.

1.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qc + qr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}


2.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qcwc + qrwr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}

CFC, CVC. CFR, CVR, Pg, Pd, Pk, Qk, Qd are know constant values
ps, pg, qc, qr, are continue variables
wc, wr are binary variables
Solver COPNOPT

Tanks

Julio









\

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.

Julio
I think you don’t need to care about it, since you can solve both small problems within precision, it the problems get large, then, you must care about it.
If you are interested, in the second one you are adding a non-linear factor when you multiply a binary by a continuous variable, doesn’t seem good since they are already related by the inequalities, I would avoid the second case. The difference in the solution you commented before come from the fact that the models are different (as explained before and pointed by Daniel) and it’s a solver issue, not GAMS. Depending on the solver your’re using, even the same constraints, but in different order can lead to solutions with minor differences (I had this experience with Ipopt solver). I hope I could make this points clear
regards
Edson

2011/8/2 Julio López

Hi Daniel, excuse me, not explain the problem.

The problem consist in determine the costs of installing of the recourses qc and qr.
Some colleagues say that the second form would be better results with the first, and that the models are the same. They argue, qc, wc and qr, wr are associated, therefore the best way to write the model in GAMS is like the second
I would like to know their opinions and arguments about.
The question is, which is the the correct form of write the model in gams.

1.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qc + qr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}


2.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qcwc + qrwr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}

CFC, CVC. CFR, CVR, Pg, Pd, Pk, Qk, Qd are know constant values
ps, pg, qc, qr, are continue variables
wc, wr are binary variables
Solver COPNOPT

Tanks

Julio









\

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.

Hi julio and Edson.
I don’t understand why are you assuming that both models are the same. As Edson pointed, the first model is a MILP formulation, on the other hand, the second problem has a constraint with bilinear expresion, therefore is a MINLP formulation. As you can guess, if the constraints are different the feasible region changes from one model to another, therefore both models are not the same and it’s totally expectable different solutions, even if the cost function is common for both models.

Best Regards!!!





2011/8/2 Edson Valle

Julio
I think you don’t need to care about it, since you can solve both small problems within precision, it the problems get large, then, you must care about it.
If you are interested, in the second one you are adding a non-linear factor when you multiply a binary by a continuous variable, doesn’t seem good since they are already related by the inequalities, I would avoid the second case. The difference in the solution you commented before come from the fact that the models are different (as explained before and pointed by Daniel) and it’s a solver issue, not GAMS. Depending on the solver your’re using, even the same constraints, but in different order can lead to solutions with minor differences (I had this experience with Ipopt solver). I hope I could make this points clear
regards
Edson


2011/8/2 Julio López

Hi Daniel, excuse me, not explain the problem.

The problem consist in determine the costs of installing of the recourses qc and qr.
Some colleagues say that the second form would be better results with the first, and that the models are the same. They argue, qc, wc and qr, wr are associated, therefore the best way to write the model in GAMS is like the second
I would like to know their opinions and arguments about.
The question is, which is the the correct form of write the model in gams.

1.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qc + qr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}


2.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qcwc + qrwr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}

CFC, CVC. CFR, CVR, Pg, Pd, Pk, Qk, Qd are know constant values
ps, pg, qc, qr, are continue variables
wc, wr are binary variables
Solver COPNOPT

Tanks

Julio









\

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.



\

Daniel Andrés Navia López
Ingeniero Civil Químico
Mg.Sc.Ciencias de la Ingeniería, Mención Ingeniería Química
Máster en Investigación en Ingeniería de Procesos y Sistemas
626752875


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.

Hi Edson and Daniel

Tanks for your valuable opinios.

I think rather than discuss the similarity between the two models would like to model the problem by considering the variables qc and qr are resources for help in the second constraint with fixed and variable costs in the objective function.

And it’s true what you mentioned Edson, for small problems the difference between the two models is small but for large models this difference is greater.

Daniel your observation is correct considering the models as he sees are different. But what if we consider that Pk and Qk are implicitly a function of the multiplication of the continuous variables and of sines and cosines. as follows.

Then the two models are MINLP. And I think que first form is the correct form of modeling, by the binary variables are associated the qc and qr constraints.

I appreciate your feedback has been very valuable.

Julio

1.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
(vkvmcos(theta) + (vkvmsin(theta))) - qg - Qd - qc + qr = 0
-50

Hi Daniel, excuse me, not explain the problem.

The problem consist in determine the costs of installing of the recourses qc and qr.
Some colleagues say that the second form would be better results with the first, and that the models are the same. They argue, qc, wc and qr, wr are associated, therefore the best way to write the model in GAMS is like the second
I would like to know their opinions and arguments about.
The question is, which is the the correct form of write the model in gams.

1.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qc + qr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}


2.- min f = [CFCwc + CVCqc] + [CFRwr + CVRqr]
s:a
Pg -ps - Pd - Pk = 0
Qk - qg - Qd - qcwc + qrwr = 0
-50 <= ps <= 100
-100 <= qg <= 100
0 <= qc <= 100wc
0 <= qr <= 100
wr
wc, wr ={0,1}

CFC, CVC. CFR, CVR, Pg, Pd, Pk, Qk, Qd are know constant values
ps, pg, qc, qr, are continue variables
wc, wr are binary variables
Solver COPNOPT

Tanks

Julio












\


\

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.