Optimization : force a parameter to be an integer

Please login with a confirmed email address before reporting spam

Hello

I am making an optimization model where I have a repetition of a certain pattern. I want to optimize the overall pattern and the number of repetitions is one of my parameters and I need it to be interger. I guess I could try to use floor(N) in my formulas but I think a gradient descent based algorithm needs some changes between each step to compute the gradient, otherwise it would think that changing N a little does not affect the output. Can someone confirm or denie that ? If that's true, any ideas on how to force this parameter to be integer (force a step of 1) ?

Thank you !


3 Replies Last Post 11 juin 2024, 04:13 UTC−4
Kristian Ejlebjærg Jensen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 29 mai 2024, 06:41 UTC−4
Updated: 6 months ago 29 mai 2024, 06:41 UTC−4

Hi

COMSOL does not support integer optimization. IPOPT will change controls even though the sensitivity is zero, but in most situations, you can just fix the integer and perform a sweep over the optimization. It sounds like you only have a single integer parameter, so this ought to be a viable strategy.

Best regards,

Kristian E. Jensen

Technical Product Manager Optimization

Hi COMSOL does not support integer optimization. IPOPT will change controls even though the sensitivity is zero, but in most situations, you can just fix the integer and perform a sweep over the optimization. It sounds like you only have a single integer parameter, so this ought to be a viable strategy. Best regards, Kristian E. Jensen Technical Product Manager Optimization

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 29 mai 2024, 11:38 UTC−4
Updated: 6 months ago 29 mai 2024, 11:40 UTC−4

Thank you for the reply, I will try that. Is the incrementation of each parameter constant over the optimisation ? if so I could maybe find a scale factor that makes the step be 1

Thank you for the reply, I will try that. Is the incrementation of each parameter constant over the optimisation ? if so I could maybe find a scale factor that makes the step be 1

Kristian Ejlebjærg Jensen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 months ago 11 juin 2024, 04:13 UTC−4
Updated: 5 months ago 11 juin 2024, 15:02 UTC−4

Hi

You can specify the increment in the Parametric Sweep, i.e. range(1,1,10) sweeps the value from 1 to 10 in steps of 1.

Best regards,

Kristian E. Jensen

Technical Product Manager Optimization

Hi You can specify the increment in the Parametric Sweep, i.e. range(1,1,10) sweeps the value from 1 to 10 in steps of 1. Best regards, Kristian E. Jensen Technical Product Manager Optimization

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.