@@ -709,10 +709,10 @@ function p_constraint_exa!(p, p_ocp, e1, e2, e3, c_type, label)
709709 quote
710710 length ($ e1) == length ($ e3) || throw (" wrong bound dimension" ) # (vs. __throw) since raised at runtime
711711 if length ($ e1) == 1
712- $ pref. constraint ($ p_ocp, $ e2; lcon= ($ e1[1 ]), ucon= ($ e3[1 ])) # debug : add _denull
712+ $ pref. constraint ($ p_ocp, $ e2; lcon= ($ e1[1 ]), ucon= ($ e3[1 ])) # todo : add _denull
713713 else
714714 for $ l ∈ 1 : length ($ e1)
715- $ pref. constraint ($ p_ocp, $ e2[$ l]; lcon= ($ e1[$ l]), ucon= ($ e3[$ l])) # debug : add _denull
715+ $ pref. constraint ($ p_ocp, $ e2[$ l]; lcon= ($ e1[$ l]), ucon= ($ e3[$ l])) # todo : add _denull
716716 end
717717 end
718718 end
@@ -822,10 +822,10 @@ function p_constraint_exa!(p, p_ocp, e1, e2, e3, c_type, label)
822822 quote
823823 length ($ e1) == length ($ e3) || throw (" wrong bound dimension" ) # (vs. __throw) since raised at runtime
824824 if length ($ e1) == 1
825- $ pref. constraint ($ p_ocp, $ e2 for $ j in 0 : grid_size; lcon= ($ e1[1 ]), ucon= ($ e3[1 ])) # debug : add _denull
825+ $ pref. constraint ($ p_ocp, $ e2 for $ j in 0 : grid_size; lcon= ($ e1[1 ]), ucon= ($ e3[1 ])) # todo : add _denull
826826 else
827827 for $ l ∈ 1 : length ($ e1)
828- $ pref. constraint ($ p_ocp, $ e2[$ l] for $ j in 0 : grid_size; lcon= ($ e1[$ l]), ucon= ($ e3[$ l])) # debug : add _denull
828+ $ pref. constraint ($ p_ocp, $ e2[$ l] for $ j in 0 : grid_size; lcon= ($ e1[$ l]), ucon= ($ e3[$ l])) # todo : add _denull
829829 end
830830 end
831831 end
@@ -901,14 +901,14 @@ function p_dynamics_exa!(p, p_ocp, x, t, e)
901901 code = quote
902902 for $ i ∈ 1 : $ (p. dim_x)
903903 $ (p. dyn_con)[$ i] = if scheme == :euler # dyn_con already defined outside try catch
904- $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej1[$ i] for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
904+ $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej1[$ i] for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
905905 elseif scheme ∈ (:euler_implicit , :euler_b ) # euler_b is deprecated
906- $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej2[$ i] for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
906+ $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej2[$ i] for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
907907 elseif scheme == :midpoint
908- $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej12[$ i] for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
908+ $ pref. constraint ($ p_ocp, $ dxj[$ i] - $ (p. dt) * $ ej12[$ i] for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
909909 elseif scheme ∈ (:trapeze , :trapezoidal ) # trapezoidal is deprecated
910910 $ pref. constraint (
911- $ p_ocp, $ dxj[$ i] - $ (p. dt) * ($ ej1[$ i] + $ ej2[$ i]) / 2 for $ j1 in 0 : grid_size- 1 # debug : add _denull
911+ $ p_ocp, $ dxj[$ i] - $ (p. dt) * ($ ej1[$ i] + $ ej2[$ i]) / 2 for $ j1 in 0 : grid_size- 1 # todo : add _denull
912912 )
913913 else
914914 throw (
@@ -960,7 +960,7 @@ function p_dynamics_coord_exa!(p, p_ocp, x, i, t, e)
960960 return __throw (" dynamics coordinate $i should be an integer" , p. lnum, p. line)
961961end
962962
963- function p_dynamics_coord_exa! (p, p_ocp, x, i:: Integer , t, e) # debug : also also add coord = range for :exa
963+ function p_dynamics_coord_exa! (p, p_ocp, x, i:: Integer , t, e) # todo : also also add coord = range for :exa
964964 pref = prefix_exa ()
965965 i ∈ p. dyn_coords && return __throw (" dynamics coordinate $i already defined" , p. lnum, p. line)
966966 append! (p. dyn_coords, i)
@@ -989,14 +989,14 @@ function p_dynamics_coord_exa!(p, p_ocp, x, i::Integer, t, e) # debug: also also
989989 dxij = :($ (p. x)[$ i, $ j2] - $ (p. x)[$ i, $ j1])
990990 code = quote
991991 $ (p. dyn_con)[$ i] = if scheme == :euler # dyn_con already defined outside try catch
992- $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej1 for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
992+ $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej1 for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
993993 elseif scheme ∈ (:euler_implicit , :euler_b ) # euler_b is deprecated
994- $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej2 for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
994+ $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej2 for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
995995 elseif scheme == :midpoint
996- $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej12 for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
996+ $ pref. constraint ($ p_ocp, $ dxij - $ (p. dt) * $ ej12 for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
997997 elseif scheme ∈ (:trapeze , :trapezoidal ) # trapezoidal is deprecated
998998 $ pref. constraint (
999- $ p_ocp, $ dxij - $ (p. dt) * ($ ej1 + $ ej2) / 2 for $ j1 in 0 : grid_size- 1 # debug : add _denull
999+ $ p_ocp, $ dxij - $ (p. dt) * ($ ej1 + $ ej2) / 2 for $ j1 in 0 : grid_size- 1 # todo : add _denull
10001000 )
10011001 else
10021002 throw (
@@ -1057,14 +1057,14 @@ function p_lagrange_exa!(p, p_ocp, e, type)
10571057 ej12 = subs (ej12, p. t, :($ (p. t0) + $ j12 * $ (p. dt)))
10581058 code = quote
10591059 if scheme == :euler
1060- $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
1060+ $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
10611061 elseif scheme ∈ (:euler_implicit , :euler_b ) # euler_b is deprecated
1062- $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 1 : grid_size) # debug : add _denull
1062+ $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 1 : grid_size) # todo : add _denull
10631063 elseif scheme == :midpoint
1064- $ pref. objective ($ p_ocp, $ (p. dt) * $ ej12 for $ j1 in 0 : grid_size- 1 ) # debug : add _denull
1064+ $ pref. objective ($ p_ocp, $ (p. dt) * $ ej12 for $ j1 in 0 : grid_size- 1 ) # todo : add _denull
10651065 elseif scheme ∈ (:trapeze , :trapezoidal ) # trapezoidal is deprecated
1066- $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 / 2 for $ j1 in (0 , grid_size)) # debug : add _denull
1067- $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 1 : grid_size- 1 ) # debug : add _denull
1066+ $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 / 2 for $ j1 in (0 , grid_size)) # todo : add _denull
1067+ $ pref. objective ($ p_ocp, $ (p. dt) * $ ej1 for $ j1 in 1 : grid_size- 1 ) # todo : add _denull
10681068 else
10691069 throw (
10701070 " unknown numerical scheme: $scheme (possible choices are :euler, :euler_implicit, :midpoint, :trapeze)" ,
@@ -1118,7 +1118,7 @@ function p_mayer_exa!(p, p_ocp, e, type)
11181118 e = subs2 (e, xf, p. x, :grid_size )
11191119 e = subs (e, xf, :([$ (p. x)[$ k, grid_size] for $ k ∈ 1 : $ (p. dim_x)]))
11201120 # now, x[i](t0) has been replaced by x[i, 0] and x[i](tf) by x[i, grid_size]
1121- code = :($ pref. objective ($ p_ocp, $ e)) # debug : add _denull
1121+ code = :($ pref. objective ($ p_ocp, $ e)) # todo : add _denull
11221122 return __wrap (code, p. lnum, p. line)
11231123end
11241124
@@ -1436,8 +1436,8 @@ function def_exa(e; log=false)
14361436 $ p_ocp = $ pref. ExaCore (
14371437 base_type; backend= backend, minimize= ($ p. criterion == :min ) # not $(p.xxxx) as this info is known statically
14381438 )
1439- # _denull(e) = e # debug
1440- # _denull(e::$pref.Null{T}) where {T<:Real} = e.value # debug : Null must be imported by OC.jl
1439+ # _denull(e) = e # todo
1440+ # _denull(e::$pref.Null{T}) where {T<:Real} = e.value # todo : Null must be imported by OC.jl
14411441 $ code
14421442 $ dyn_check
14431443 return $ pref. ExaModel ($ p_ocp), $ getter
0 commit comments