File tree Expand file tree Collapse file tree 2 files changed +45
-8
lines changed Expand file tree Collapse file tree 2 files changed +45
-8
lines changed Original file line number Diff line number Diff line change @@ -25,25 +25,50 @@ function optimize(
25
25
lowercase (local_search_method)
26
26
)
27
27
28
- for dir in [" /fitparam" , " /logs" ]
29
- if ! isdir (strip (model. path, ' /' ) * dir)
30
- mkdir (strip (model. path, ' /' ) * dir)
28
+ for dir in [" fitparam" , " logs" ]
29
+ if ! isdir (
30
+ joinpath (
31
+ model. path,
32
+ dir
33
+ )
34
+ )
35
+ mkdir (
36
+ joinpath (
37
+ model. path,
38
+ dir
39
+ )
40
+ )
31
41
end
32
42
end
33
43
34
44
try
35
45
files = readdir (
36
- strip (model. path, ' /' ) * " /fitparam/$nth_param_set "
46
+ joinpath (
47
+ model. path,
48
+ " fitparam" ,
49
+ " $nth_param_set "
50
+ )
37
51
)
38
52
for file in files
39
53
if occursin (" .dat" , file)
40
54
rm (
41
- strip (model. path, ' /' ) * " /fitparam/$nth_param_set /$file "
55
+ joinpath (
56
+ model. path,
57
+ " fitparam" ,
58
+ " $nth_param_set " ,
59
+ " $file "
60
+ )
42
61
)
43
62
end
44
63
end
45
64
catch
46
- mkdir (strip (model. path, ' /' ) * " /fitparam/$nth_param_set " )
65
+ mkdir (
66
+ joinpath (
67
+ model. path,
68
+ " fitparam" ,
69
+ " $nth_param_set "
70
+ )
71
+ )
47
72
end
48
73
49
74
search_rgn:: Matrix{Float64} = model. search_region ()
@@ -84,8 +109,20 @@ function optimize_continue(
84
109
n_population:: Int64 = popsize * size (search_rgn, 2 )
85
110
n_gene:: Int64 = size (search_rgn, 2 )
86
111
87
- if ! isdir (strip (model. path, ' /' ) * " /fitparam/$nth_param_set " )
88
- mkdir (strip (model. path, ' /' ) * " /fitparam/$nth_param_set " )
112
+ if ! isdir (
113
+ joinpath (
114
+ model. path,
115
+ " fitparam" ,
116
+ " $nth_param_set "
117
+ )
118
+ )
119
+ mkdir (
120
+ joinpath (
121
+ model. path,
122
+ " fitparam" ,
123
+ " $nth_param_set "
124
+ )
125
+ )
89
126
90
127
ga_v2 (
91
128
model= model,
You can’t perform that action at this time.
0 commit comments