JuliaDynamics / Agents.jl

Agent-based modeling framework in Julia
https://juliadynamics.github.io/Agents.jl/stable/
MIT License
728 stars 117 forks source link

Optim example is not functioning #473

Open Libbum opened 3 years ago

Libbum commented 3 years ago

Docs are not building currently because something in the mulit-objective optimisation section of examples/optim.jl is failing.

The run starts the optimisation but never gets to the point of outputting the first set of data. This has happened to me before with BBO, but I'm not sure of the fix. Odd thing is that it's only recently happened in our example file. It's not a Julia 1.5 v 1.6 issue, it's not a recent BBO version issue (master and the current release have the problem), its not a github runner changed OS versions recently (since it's also failing on my local machine).

I need to do a hunt of recent changes to our internals to see if its our fault. In #467 I'm thinking I could just bake in the result and not run the example for now until the issue is resolved. That'll mean both Optim and Zombies will be on the list of examples we need to take care of manually until this is resolved.

Datseris commented 3 years ago

Yeah, a quick fix seems the best at the moment...

@kavir1698 you wrote the initial BBO example, do you know anything?

kavir1698 commented 3 years ago

I will check it today.

kavir1698 commented 3 years ago

I just ran the example and it went through without a problem.

Libbum commented 3 years ago

It's intermittent. More frequently failing than not however. Difficult to pin down.

Libbum commented 3 years ago

Be advised that #467 altered optim.jl to provide a pre-built solution from an older run. The most recent runnable version is from 7b05f7df. One caveat working against current master is that #450 introduced a more robust naming convention to column names in the dataframes, and as such line 150 should be replaced with return mean(data[!, dataname(mdata[1])), mean(data[!, dataname(mdata[2])).

Libbum commented 3 years ago

BlackBoxOptim has had some recent development and a new release. May be worthwhile testing this again now.

Tortar commented 5 months ago

Why was this closed? I don't think optim.jl is actually working, the example is all commented https://github.com/JuliaDynamics/Agents.jl/blob/main/examples/optim.jl, I pinned it because I think it is an important thing to fix

Datseris commented 5 months ago

https://juliadynamics.github.io/Agents.jl/stable/examples/optim/ shows that it runs, I am confused, what is the error?

Tortar commented 5 months ago

The fact is that every output is hard-coded in the example as you can see from the source file

Datseris commented 5 months ago

oooooooh sorry i only looked at the output in the docs :D Why doesn't it work? have you tried just rynning it? what's the error

Tortar commented 5 months ago

I didn't even try because the file starts by including a non-existing file :D But It seems very outdated nonetheless