ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Comparison Operator "" NOT "=" (https://www.excelbanter.com/excel-discussion-misc-queries/162955-comparison-operator-not-%3D.html)

monir

Comparison Operator "" NOT "="
 
Hello;
I was a bit hesitant to post this question for obvious reasons, but I
decided to post it anyway!! You never know!
The Excel add-in Solver module has the following comparison operators to
choose from in "Subject to the Contraints" box:
<= , = , = , int(eger) , bin
One may choose one or more operators from the above list.

I need to specify the constraint: A1 B1

Is there a workaround this difficulty ???
(choosing the constraint A1 = B1 appears to force Solver to first try A = B
and fails)

Thank you.

Bernard Liengme

Comparison Operator "" NOT "="
 
I have never faced that one.
I suppose Solver developers might say: "how much greater" is "greater?
After all Solver works with in limits. A1=B1 can pass if A=1 and B1=1.00001
when Precision is 0.00001.

I would try one of these:
A1=B1+2 (or some other constant)
or
A1 X1 where X1 =B1 + 2

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"monir" wrote in message
...
Hello;
I was a bit hesitant to post this question for obvious reasons, but I
decided to post it anyway!! You never know!
The Excel add-in Solver module has the following comparison operators to
choose from in "Subject to the Contraints" box:
<= , = , = , int(eger) , bin
One may choose one or more operators from the above list.

I need to specify the constraint: A1 B1

Is there a workaround this difficulty ???
(choosing the constraint A1 = B1 appears to force Solver to first try A =
B
and fails)

Thank you.




Tyro[_2_]

Comparison Operator "" NOT "="
 
You can specify a constraint such as A1 = B1 + 1 (or B1 + .00000001). That
makes the constraint A1 B1

Tyro

"monir" wrote in message
...
Hello;
I was a bit hesitant to post this question for obvious reasons, but I
decided to post it anyway!! You never know!
The Excel add-in Solver module has the following comparison operators to
choose from in "Subject to the Contraints" box:
<= , = , = , int(eger) , bin
One may choose one or more operators from the above list.

I need to specify the constraint: A1 B1

Is there a workaround this difficulty ???
(choosing the constraint A1 = B1 appears to force Solver to first try A =
B
and fails)

Thank you.




monir

Comparison Operator "" NOT "="
 
Bernard;
Thank you for your prompt reply.
The value in cell A1 and the value of constraint in B1 could vary by any
unknown amount, depending on the problem being solved by Solver if the
constraint A1 B1 (together with the other specified constraints) is
satisfied.
I agree that Solver works within limits, but one would expect that a simple
condition such as A1 B1 should be handled easily by Excel Solver.
A glimmer of hope might reside in the fact that the Solver constraint box
allows for a formula to be entered and not only a numerical value or a cell
reference. Somehow, one might be able to manipulate the available conditions
<=, =, =, int together with some Excel functions and end up with the
condition A1 B1 !!!!!!!!!!!
Any suggestion ??

Thank you.

"Bernard Liengme" wrote:

I have never faced that one.
I suppose Solver developers might say: "how much greater" is "greater?
After all Solver works with in limits. A1=B1 can pass if A=1 and B1=1.00001
when Precision is 0.00001.

I would try one of these:
A1=B1+2 (or some other constant)
or
A1 X1 where X1 =B1 + 2

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"monir" wrote in message
...
Hello;
I was a bit hesitant to post this question for obvious reasons, but I
decided to post it anyway!! You never know!
The Excel add-in Solver module has the following comparison operators to
choose from in "Subject to the Contraints" box:
<= , = , = , int(eger) , bin
One may choose one or more operators from the above list.

I need to specify the constraint: A1 B1

Is there a workaround this difficulty ???
(choosing the constraint A1 = B1 appears to force Solver to first try A =
B
and fails)

Thank you.





monir

Comparison Operator "" NOT "="
 
The operator "=" is a 2-in-1 condition: greater than OR equal to.
Instead of the desired constraint A1 B1, if you spesify A1 =
B1+something, you're actually adding a constraint A1=B1+something, which
doesn't exist and causes Solver to fail.
For the current Solver optimization scenario to be successful, it must
satisfy the constraint A1 B1 (together with the other specified
constraints).
Depending on the problem parameters, a successful solution by Solver could
yield a value in A1 that's a fraction or many order of magnitude greater than
the value in B1.

Any suggestion ?? Thanks.


"Tyro" wrote:

You can specify a constraint such as A1 = B1 + 1 (or B1 + .00000001). That
makes the constraint A1 B1

Tyro

"monir" wrote in message
...
Hello;
I was a bit hesitant to post this question for obvious reasons, but I
decided to post it anyway!! You never know!
The Excel add-in Solver module has the following comparison operators to
choose from in "Subject to the Contraints" box:
<= , = , = , int(eger) , bin
One may choose one or more operators from the above list.

I need to specify the constraint: A1 B1

Is there a workaround this difficulty ???
(choosing the constraint A1 = B1 appears to force Solver to first try A =
B
and fails)

Thank you.






All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com