Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with integer and float decision variables #17

Open
efendiogulu opened this issue Dec 10, 2018 · 2 comments
Open

Problems with integer and float decision variables #17

efendiogulu opened this issue Dec 10, 2018 · 2 comments

Comments

@efendiogulu
Copy link

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.

@ydup
Copy link

ydup commented Apr 23, 2019

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




@sunfeifeier
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants