Skip to content

[Dev] Remove the solver from direct_transcription description #493

@ocots

Description

@ocots

Do not pass the nlp_solver to direct_transcription:

CTDirect.jl/src/solve.jl

Lines 244 to 254 in 6e0be4d

function direct_transcription(
ocp::CTModels.Model,
description...;
grid_size=__grid_size(),
disc_method=__disc_method(),
time_grid=__time_grid(),
init=__ocp_init(),
lagrange_to_mayer=true,
kwargs...,
)
nlp_solver, nlp_model = parse_description(description)

Need to split the parse_description to get separately the solver and the model:

CTDirect.jl/src/solve.jl

Lines 80 to 83 in 6e0be4d

function parse_description(description)
# default: Ipopt, ADNLPModels
method = CTBase.complete(description; descriptions=available_methods())

The line:

method = CTBase.complete(description; descriptions=available_methods())

is useful to check if the description is consistent with available_methods() but the list of available methods is for the solve method.

Do we create a available_methods_for_discretisation()?

Metadata

Metadata

Labels

internal devModification to the code is requested and should not affect user experiment

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions