Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

condition in optimization tool

Is it possible to insert a condition for the optimization tool.
I have 10 parameters (diameters), lets say d1, d2, d3, d4 ... d10, which should be optimized.
But the condition d1>d2>d3>...>d10 has to be ensured

Thanks for your precious feedback

Accepted by topic author mAx
‎02-05-2016 07:37 AM

Re: condition in optimization tool

Hi @mAx


I think it should be possible.


There is demo in LMS Imagine.Lab Amesim on the optimization which is called "DesignOptimization.ame" (qthelp://lmsimagine.lab/ame_dir/demo/Platform/OptimizationRobustnessDOE/Optimization/DesignOptimization.html)


In this example the optimization is done in such a way that the difference between the seat diameter and the ball diameter remains bigger than 0.2:


So in your case you could use it, but it would be 9 conditions:

d10-d9 > 0

d9-d8 > 0


d2-d1 > 0


Kind regards

Re: condition in optimization tool

Hello @Domi ,

Meanwhile I found a workaround:

Instead of working with diameters, I may work with increment (positive).


d2=d1 +epsilon1

d3=d1 +epsilon1 + epsilon2

d4=d1 + epsilon1 + epsilon2 + epsilon3

and so on (epsiloni >0)

But I will use your tipp.

Thank you and I wish you a nice weekend


Re: condition in optimization tool

Hello again,

So I created 9 Compound parameters with difference between diameters.

After the 1st iteration, the optimization aborts with error.

When I see the log file, I see that the 2nd iteration begin, with all diameters set with the lowest value from my range.

So it begins with all diameters with same value; which means that the restrictions are not satisfied since d1=d2=d3...=d10.

Any clue, why the restrictions aren't taken in account?

Re: condition in optimization tool

[ Edited ]

Hi mAx,


the conditions are checked afterwards for each calculation but nothing blocks the algorithm to take any value in the [lower-upper] range - even if the conditions are not valid.

Also the default values in your input tab will alway be the starting point of the optimization routine. So if all your diameter d1 to d10 have a default value of 10 that's where it will start from.


Can you give more detail about the error message that you get?

Re: condition in optimization tool

Good morning @Emmanuel_D

The solver gives me an error and interrupts the optimization. It returns that details may be displayed in the warning/error panel, but nothing is displayed.


For the first iteration, the solver takes, as you said, the default values, but after the first iterations, the solver sets all the parameters to the lowest level of parameter's range. So doing that the conditions are not respected.


I have to optimize the shape of a cylinder. The cylinder switch from on to off in ms range, but shouldn't damage the system. The "head" of cylinder is basically a brake (BAP041), but with not constant slope.

I created a supercomponent with 10 brakes for "interpolating" any shape of the brake. Each brake depends on 2 diameters (one for poppet diameter and one for rod diameter). In this way rod diameter has to be less than poppet diameter --> this is the conditions for the optimization.

I set all the parameters with default values, such as the super-brake has a linear shape (first guess).


Hope it is now clearer.


Re: condition in optimization tool

Hi mAx,


this is strange, if not already done please contact your support line via GTAC about this lack of warning/error feedback.


I think I see what you are trying to do. I liked your initial approach with:

d2=d1 +epsilon1

d3=d1 +epsilon1 + epsilon2

d4=d1 + epsilon1 + epsilon2 + epsilon3


Then you just specify a lower value of zero for each epsilon. And no need for extra constraints.


If your model is fast enough I would give it a go with the genetic algorithm instead of the NLPQL one. This way it will explore the design space more systematically.


Re: condition in optimization tool

Hello @Emmanuel_D,

Yes I already sent a request at the german support on Monday, but till now no reply.

I am not sure I sent it to the right email adress>>

Re: condition in optimization tool

Hi Max,


I don't think the email address is still open.

With the integration with Siemens PLM Software, we  moved our technical support to their GTAC.

Please visit the web pages and you'll find the appropriate contact info:


Hope this helps!



Re: condition in optimization tool

Hello @JulieErcolaniP

I tried with old email, but I always received delivery failure.

With this email, I didn't received anything, so I guess the email is still valid.

Anyway, If I create a new call in the GTAC, I don't see any possibilty to send files (only text), which is quite restricted if I want to explain well my issue