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

Using LibOptimization #15

Closed
steph2000 opened this issue Mar 19, 2018 · 1 comment
Closed

Using LibOptimization #15

steph2000 opened this issue Mar 19, 2018 · 1 comment
Assignees
Labels

Comments

@steph2000
Copy link

Hello,

I would like to use Liboptimization for a 2 variables function in my vb.net code.
I've coded my function f(x,y), but then, the syntax
Dim optimization As New clsOptDEJADE(New f( ))
is not correct, as the two parameters x and y are needed, and have to be declared. Could you give an example with a customize function please?

Kazu

@tomitomi3 tomitomi3 self-assigned this Mar 24, 2018
@tomitomi3
Copy link
Owner

tomitomi3 commented Mar 24, 2018

@steph2000

Thank you for using my library and I'm sorry late reply.

the two parameters x and y are needed, and have to be declared.

Set the objective function variable as an array argument.

e.g.
Objective function(sphere function):

f(x1,x2)=x1^2 + x2^2

Problem:

min f

Implement Objective function:

Public Overrides Function F(x As List(Of Double)) As Double
    Return x(0)*x(0) + x(1)*x(1)
End Function

Refference:
#3 (comment)

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

No branches or pull requests

2 participants