pyswarm icon indicating copy to clipboard operation
pyswarm copied to clipboard

Problems with integer and float decision variables

Open efendiogulu opened this issue 6 years ago • 2 comments

Hi all, I would like to ask about the optimization problems with both integer and float numbers. Is it possible to define the integer variables separately in pyswarm?

Kind regards,

Mert.

efendiogulu avatar Dec 10 '18 02:12 efendiogulu

Hi, @efendiogulu I consider that the integer number can be written in your objective and constraints function, for example:


def obj(x):

    x_int = np.int32(x)

    # your objective function

def constraints(x):

    x_int = np.int32(x)

    # your constrains




ydup avatar Apr 23 '19 13:04 ydup

Do you find the way to how to set up the integer variable?

sunfeifeier avatar Jul 24 '19 03:07 sunfeifeier