Skip to content

Initial implementation of Constrained GlobalOptimisation #33

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

Open
wants to merge 1 commit into
base: dps/v0.7
Choose a base branch
from

Conversation

yashvardhan747
Copy link
Contributor

No description provided.

@@ -141,17 +138,30 @@ function minimise_icp(f::Function, x::IntervalBox{N, T}; reltol=1e-3, abstol=1e-
return lb..global_minimum, arg_minima
end

function minimise_icp_constrained(f::Function, x::IntervalBox{N, T}, constraints::Vector{Constraint{T}} = Vector{Constraint{T}}(); reltol=1e-3, abstol=1e-3) where {N, T<:Real}

struct ConstraintCond{T}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just Constraint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Their might be more than one constraint condition thats why we need to built vector of such conditions.


Q = binary_minheap(IntervalBoxMinimum{N, T})

global_minimum = ∞

for t in constraints
x = icp(t.f, x, t.c)
C = Contractor(t.f, var)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is expensive to create a Contractor, so this should be done only once for each constraint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right. We should built contractor for each constraint condition only once.

@@ -176,10 +186,13 @@ function minimise_icp_constrained(f::Function, x::IntervalBox{N, T}, constraints
global_minimum = current_minimum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this logic is not correct, since there may be no feasible points in p.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes right..!! this required more work need to be done on this case.

@dpsanders
Copy link
Member

Note that if you took code from another commit, you should have built your commit on top of that commit to keep a record of the previous author's contributions.

@yashvardhan747
Copy link
Contributor Author

Yes I'll remember from next time.

@yashvardhan747 yashvardhan747 changed the title Implementing Contractor in GlobalOptimisation Initial implementation of Constrained GlobalOptimisation Apr 1, 2019
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

Successfully merging this pull request may close these issues.

2 participants