Giter Site home page Giter Site logo

Comments (4)

licheng0794 avatar licheng0794 commented on May 21, 2024 1

I found the reason. The debug information is only shown after one interation not one evaluation. Thank you.

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on May 21, 2024

Use debug in Options,

For custom formats, I suggest using the following:

logger(status) = println(status.iteration," ", minimum(status))

optimize(f, bounds, OPTIMIZER; logger = logger)

See also State.

from metaheuristics.jl.

licheng0794 avatar licheng0794 commented on May 21, 2024

I tested debug in Options using the example from the API documents. It does work well.

However, I tested it for my own function, which includes an ODE solver. It did not work. Not sure what the problem is. The code is below.

function fitness_obj(X)
X = [round(x,digits=5) for x in X]
println(X)
outV = VHRSteady(X) # my own function
abs(outV[1] - targetoutflow[2]) + abs(outV[2] - targetoutflow[3]) + 10*abs(outV[3] - targetoutflow[4]) + abs(outV[5] -
targetoutflow[5])
end

using Metaheuristics
Metaoptimize = Metaheuristics.optimize
MetaOptions = Metaheuristics.Options
options = MetaOptions(f_calls_limit = 1000, debug=true);

Xrange = zeros(12,2)
Xrange[:,1] = [0.01, 0.26, 0.09, 0.5, 0.01, 0.01, 0.2, 0.2, 0.05, 2, 50, 500]
Xrange[:,2] = [0.03, 0.35, 0.13, 0.65, 0.21, 0.55, 1, 1.5, 0.5, 3.5, 100, 1000]

status = Metaoptimize(fitness_obj, Xrange, ECA(options = options))

image

No debug information was printed! Any suggestion?

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on May 21, 2024

Nice!

from metaheuristics.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.