Skip to content

Replace V(undef, nvar) by similar(nlp.meta.x0) in TrunkSolver? #135

@paraynaud

Description

@paraynaud

Hey guys (@dpo @tmigot), I was wondering why the AbstractVector required by TrunkSolver are defined with V(undef, nvar) and not with similar(nlp.meta.x0)?

function TrunkSolver(

I'm currently working on PartitionedStructures.jl and PartiallySeparableNLPModels.jl to make solvers (starting with trunk) exploit fully the partially separable structure.
I'm defining PartitionedVector<:AbstractVector in PartitionedStructure.jl, and my plan is to set nlp.meta.x0 as a partitioned vector.
This way, any object similar to x0 keeps the same partitioned structure.
In addition, I will overload all operations required by trunk() (and cg()) on PartitionedVectors.

Defining vectors with V(undef, nvar) prevents any use of the partitioned structure.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions