Skip to content

Commit be76358

Browse files
committed
Annotates some fields of mutable struct Problem as const
1 parent 9629894 commit be76358

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/problem.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ This happens in one of the `TORA.solve_with_*` functions, which does the heavy-l
1313
See also: [`solve_with_ipopt`](@ref), [`solve_with_knitro`](@ref)
1414
"""
1515
mutable struct Problem
16-
num_knots::Int # Total number of knots
17-
dt::Float64 # Time step between two knots
16+
const num_knots::Int # Total number of knots
17+
const dt::Float64 # Time step between two knots
1818

1919
fixed_q::Dict{Int64,Vector{Float64}} # Fixed joint positions
2020
fixed_v::Dict{Int64,Vector{Float64}} # Fixed joint velocities
@@ -23,9 +23,9 @@ mutable struct Problem
2323
ee_pos::Dict{Int64,Point{3,Float64}} # End-effector target positions
2424

2525
# Jacobian data (e.g., for sparse Jacobian of dynamics with AD)
26-
jacdata_fwd_dyn::JacobianData
27-
jacdata_inv_dyn::JacobianData
28-
jacdata_ee_position::JacobianData
26+
const jacdata_fwd_dyn::JacobianData
27+
const jacdata_inv_dyn::JacobianData
28+
const jacdata_ee_position::JacobianData
2929

3030
@doc """
3131
Problem(robot, num_knots, dt)

0 commit comments

Comments
 (0)