control-toolbox / CTBase.jl

Fundamentals of the control-toolbox ecosystem
http://control-toolbox.org/CTBase.jl/
MIT License
12 stars 3 forks source link

[Feature] Remove Index type #289

Open jbcaillau opened 2 months ago

jbcaillau commented 2 months ago
jbcaillau commented 2 months ago

@PierreMartinon please remind me whether you use Index type in CTDirect.jl. possibly to test whether t0 or tf are free.

ocots commented 2 months ago

Pierre does not use Index. We have getters now. See https://github.com/search?q=repo%3Acontrol-toolbox%2FCTDirect.jl%20has_free_initial_time&type=code

jbcaillau commented 2 months ago

@ocots indeed, only trace of Index in test/old. @PierreMartinon do you confirm?

1d [jcaillau@nef-devel2:~/CTDirect.jl]└5 [dev] main ± cd src
1d [jcaillau@nef-devel2:~/CTDirect.jl/src]└5 [dev] main ± ls
ctbase.jl  CTDirect.jl  default.jl  gauss.jl  midpoint.jl  problem.jl  solution.jl  solve.jl  trapeze.jl  utils.jl
1d [jcaillau@nef-devel2:~/CTDirect.jl/src]└5 [dev] main ± grep Index *.jl
1d [jcaillau@nef-devel2:~/CTDirect.jl/src]└5 [dev] main 1 ± ls
ctbase.jl  CTDirect.jl  default.jl  gauss.jl  midpoint.jl  problem.jl  solution.jl  solve.jl  trapeze.jl  utils.jl
1d [jcaillau@nef-devel2:~/CTDirect.jl/src]└5 [dev] main ± cd ../test/
1d [jcaillau@nef-devel2:~/CTDirect.jl/test]└5 [dev] main ± ls
deps.jl         old/       Project.toml    runtests.jl       solution_test.jld2  suite/
manual_test.jl  problems/  refine_grid.jl  scalar_vector.jl  solution_test.json
1d [jcaillau@nef-devel2:~/CTDirect.jl/test]└5 [dev] main ± !gr
grep Index *.jl
1d [jcaillau@nef-devel2:~/CTDirect.jl/test]└5 [dev] main 1 ± cd old/
1d [jcaillau@nef-devel2:~/CTDirect.jl/test/old]└5 [dev] main ± grep Index *.jl
bocop_goddard.jl:constraint!(ocp, :control, Index(1), 0, 1, :box_control)
local_test_exponential.jl:time!(ocp2, 0, Index(1))
local_test_exponential.jl:time!(ocp3, 0, Index(1))
local_test_exponential.jl:#time!(ocp3, Index(1), Index(2))
1d [jcaillau@nef-devel2:~/CTDirect.jl/test/old]└5 [dev] main ± cd ../problems/
1d [jcaillau@nef-devel2:~/CTDirect.jl/test/problems]└5 [dev] main ± !g
grep Index *.jl
1d [jcaillau@nef-devel2:~/CTDirect.jl/test/problems]└5 [dev] main 1 ±