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

Error from open() in save_fitness_history_to_csv_file() #234

Open
hoasxyz opened this issue Mar 20, 2024 · 0 comments
Open

Error from open() in save_fitness_history_to_csv_file() #234

hoasxyz opened this issue Mar 20, 2024 · 0 comments

Comments

@hoasxyz
Copy link

hoasxyz commented Mar 20, 2024

When running Borg moea with parameter SaveFitnessTraceToCsv = true:

res_pso_his = bboptimize(pso_rbf_his_day, good_guesses; Method = :borg_moea, FitnessScheme = ParetoFitnessScheme{2}(is_minimizing = false), 
                    SearchRange = SearchRange, NumDimensions = length(SearchRange), 
                    PopulationSize = 1000, MaxTime = 60 * 1.0, RandomizeRngSeed = true),
                    ϵ = 0.001, TraceInterval = 10.0, TraceMode = :compact, SaveTrace = true, SaveParameters = true, SaveFitnessTraceToCsv = true

an error occurs with Stacktrace:

ERROR: SystemError: opening file "240320_201549_<unknown>_155d_BlackBoxOptim.BorgMOEA{EpsBoxDominanceFitnessScheme{2,_Float64,_false,_typeof(sum)},_BlackBoxOptim.ProblemEvaluator{Tuple{Float64,_Float64},_IndexedTupleFitness{2,_Float64},_EpsBoxArchive{2,_Float64,_EpsBoxDominanceFitnessScheme{2,_Float64,_false,_typeof(sum)}},_FunctionBasedProblem{typeof(pso_rbf_his_day),_ParetoFitnessScheme{2,_Float64,_false,_typeof(sum)},_ContinuousRectSearchSpace,_Nothing}},_FitPopulation{IndexedTupleFitness{2,_Float64}},_FixedGeneticOperatorsMixture,_RandomBound{ContinuousRectSearchSpace}}.csv": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:176
  [2] systemerror
    @ .\error.jl:175 [inlined]
  [3] open(fname::String; lock::Bool, read::Bool, write::Nothing, create::Nothing, truncate::Nothing, append::Bool)
    @ Base .\iostream.jl:293
  [4] open
    @ .\iostream.jl:275 [inlined]
  [5] open(fname::String, mode::String; lock::Bool)
    @ Base .\iostream.jl:356
  [6] open
    @ .\iostream.jl:355 [inlined]
  [7] save_fitness_history_to_csv_file(a::EpsBoxArchive{…}, filename::String; header_prefix::String, line_prefix::String, include_header::Bool, bestfitness::Nothing)
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\archive.jl:182
  [8] write_result(ctrl::BlackBoxOptim.OptRunController{…}, filename::String)
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\opt_controller.jl:378
  [9] write_result(ctrl::BlackBoxOptim.OptRunController{BlackBoxOptim.BorgMOEA{…}, BlackBoxOptim.ProblemEvaluator{…}})
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\opt_controller.jl:373
 [10] run!(oc::BlackBoxOptim.OptController{BlackBoxOptim.BorgMOEA{…}, FunctionBasedProblem{…}})
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\opt_controller.jl:476
 [11] bboptimize(optctrl::BlackBoxOptim.OptController{…}, x0::Vector{…}; kwargs::@Kwargs{})
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:83
 [12] bboptimize(optctrl::BlackBoxOptim.OptController{…}, x0::Vector{…})
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:64
 [13] bboptimize(functionOrProblem::Function, x0::Vector{…}, parameters::Dict{…}; kwargs::@Kwargs{…})
    @ BlackBoxOptim E:\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:88
 [14] bboptimize
    @ E:\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:86 [inlined]
 [15] top-level scope
    @ e:\1WHU\item\jsj\julia_project\PSO_day.jl:1
Some type information was truncated. Use `show(err)` to see complete types.
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

1 participant