Grasshopper

algorithmic modeling for Rhino

How to set an equality constraint in optimization (Galapagos or Octopus)?

Hi everyone,

I have two dependent variables, which must meet an equality. How can I set this constraint in optimization process?

Thank you for help.

Bests,

Dan

Views: 1862

Replies to This Discussion

Use the difference with the value as a optimization value.

So if you want to optimize for the equality, you can use the Absolute(value a - value b) as a minimize optimization value or -Absolute(value a - value b) as a maximize value

Yup, like Arend said. Galapagos is not a constraint-solver, so you have to encode deviations from constrained states as penalty functions. Abs(A-B) often works, sometimes you need to add some weighting to it, like 1000*Abs(A-B), and sometimes the penalty requires polynomial behaviour Abs(A-B)²

--

David Rutten

david@mcneel.com

Hi Arend and David,

Thank you for your answer. I'm sorry I make a mistake. The image is to show the inequality. And my question is just how to deal with the inquality constraint. I also have a wonder when the optimization component judge whether the individule meet the constraints, before or after the population generate?

Bests,

Dan

Hi David,

Err, I know little about penalty functions. So I read some explanation about it. Now I think I get what you mean and I will try to use it to redefine my objectives.

Thank you.

Dan

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service