@@ -28,15 +28,28 @@ using KernelAbstractions
2828using NLPModels
2929
3030# Modules
31- include (" Options/ Options.jl" )
31+ include (joinpath ( @__DIR__ , " Options" , " Options.jl" ) )
3232using . Options
3333
34- include (" Strategies/ Strategies.jl" )
34+ include (joinpath ( @__DIR__ , " Strategies" , " Strategies.jl" ) )
3535using . Strategies
3636
37- include (" Orchestration/ Orchestration.jl" )
37+ include (joinpath ( @__DIR__ , " Orchestration" , " Orchestration.jl" ) )
3838using . Orchestration
3939
40+ # Optimization module provides general optimization types (AbstractOptimizationProblem, builders)
41+ include (joinpath (@__DIR__ , " Optimization" , " Optimization.jl" ))
42+ using . Optimization
43+
44+ # Modelers module uses AbstractOptimizationProblem from Optimization (general)
45+ include (joinpath (@__DIR__ , " Modelers" , " Modelers.jl" ))
46+ using . Modelers
47+
48+ # DOCP module provides concrete DOCP types (DiscretizedOptimalControlProblem)
49+ # Loaded after Modelers since Modelers only need the general AbstractOptimizationProblem
50+ include (joinpath (@__DIR__ , " DOCP" , " DOCP.jl" ))
51+ using . DOCP
52+
4053# ============================================================================ #
4154# TYPES AND FOUNDATIONS
4255# ============================================================================ #
@@ -45,7 +58,7 @@ using .Orchestration
4558
4659# 1. Type aliases (Dimension, ctNumber, Time, etc.) and export/import types
4760# These are the most basic types with no dependencies
48- include (" types/ types.jl" )
61+ include (joinpath ( @__DIR__ , " types" , " types.jl" ) )
4962
5063# 2. OCP defaults (functions returning default values)
5164# Depends on: type aliases (uses Dimension, ctVector, etc.)
@@ -56,18 +69,18 @@ include(joinpath(@__DIR__, "ocp", "defaults.jl"))
5669# Must be loaded before OCP types because @ensure macro is used in OCP types
5770include (joinpath (@__DIR__ , " utils" , " utils.jl" ))
5871
59- # 4. OCP type definitions (components, model, solution)
72+ # 4. Initial guess types
73+ # Depends on: type aliases
74+ include (joinpath (@__DIR__ , " init" , " types.jl" ))
75+
76+ # 5. OCP type definitions (components, model, solution)
6077# Depends on: type aliases, defaults, and utils (@ensure macro)
6178include (joinpath (@__DIR__ , " ocp" , " types" , " components.jl" ))
6279include (joinpath (@__DIR__ , " ocp" , " types" , " model.jl" ))
6380include (joinpath (@__DIR__ , " ocp" , " types" , " solution.jl" ))
6481
65- # 5. NLP types (backends, builders, modelers)
66- # Depends on: OCP types (uses AbstractModel, AbstractSolution)
67- include (joinpath (@__DIR__ , " nlp" , " types.jl" ))
68-
69- # 6. Export/import functions (require OCP types)
70- # Depends on: OCP types (uses AbstractModel, AbstractSolution)
82+ # # 6. Export/import functions (require OCP types)
83+ # # Depends on: OCP types (uses AbstractModel, AbstractSolution)
7184include (joinpath (@__DIR__ , " types" , " export_import_functions.jl" ))
7285
7386# ============================================================================ #
@@ -99,16 +112,8 @@ const AbstractOptimalControlSolution = CTModels.AbstractSolution
99112# Depends on: all OCP types
100113include (joinpath (@__DIR__ , " ocp" , " ocp.jl" ))
101114
102- # 7. NLP implementations (problem core, backends, discretization)
103- # Depends on: OCP and NLP types
104- include (joinpath (@__DIR__ , " nlp" , " problem_core.jl" ))
105- include (joinpath (@__DIR__ , " nlp" , " nlp_backends.jl" ))
106- include (joinpath (@__DIR__ , " nlp" , " extract_solver_infos.jl" ))
107- include (joinpath (@__DIR__ , " nlp" , " discretized_ocp.jl" ))
108- include (joinpath (@__DIR__ , " nlp" , " model_api.jl" ))
109- # 8. Initialization (types and functions for initial guesses)
110- # Depends on: OCP types (uses AbstractModel, AbstractSolution)
111- include (joinpath (@__DIR__ , " init" , " types.jl" ))
115+ # 7. Initial guess implementations
116+ # Depends on: OCP types (uses AbstractOptimalControlProblem)
112117include (joinpath (@__DIR__ , " init" , " initial_guess.jl" ))
113118
114119end
0 commit comments