Conversation
test/dummy_solver.jl
Outdated
| ct :: Vector | ||
| end | ||
|
|
||
| function DummySolver(nvar :: Integer, ncon :: Integer = 0) |
There was a problem hiding this comment.
Maybe this should take an NLPModelMeta as input?!
There was a problem hiding this comment.
That would be too specific. This is the simplest one to allow creating a reusable solver with various problems of the same size, for instance. If you already have the meta, you probably have the nlp.
There was a problem hiding this comment.
I know but what I’m saying is that all the information in the meta may be necessary to construct a solver, e.g., for constrained problems, taking into account the number of equality/inequality constraints, types of bounds, etc.
There was a problem hiding this comment.
I've changed now to use meta. Now both
DummySolver(nlp.meta) and DummySolver(Val(:nosolve), nlp) create the solver without solving.
test/dummy_solver.jl
Outdated
| ) | ||
| end | ||
|
|
||
| parameters(::DummySolver) = NamedTuple(α = 1e-2, δ = 1e-8) |
There was a problem hiding this comment.
Ideally, the parameters structure also encapsulates the domain and type of each parameter.
There was a problem hiding this comment.
I was thinking about that. The issue that remains is the interaction between parameters. Like 0 <= eta_1 <= eta_2 <= 1. So I was thinking of returning the problem, but that constricts the non-scalar parameters.
There was a problem hiding this comment.
I've updated with a lot more information on the parameters. It could possibly be made clearer with structs but I haven't found a need to change yet. The interaction issue above was not solved. I also implemented a grid search.
test/dummy_solver.jl
Outdated
| end | ||
| end | ||
| end | ||
| ) No newline at end of file |
There was a problem hiding this comment.
This function should return a real number, right?
There was a problem hiding this comment.
Yes, it's unfinished because I don't know what to do yet.
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
+ Coverage 91.20% 94.44% +3.23%
==========================================
Files 3 6 +3
Lines 91 72 -19
==========================================
- Hits 83 68 -15
+ Misses 8 4 -4
Continue to review full report at Codecov.
|
No description provided.