Skip to content

Commit 0a4d040

Browse files
committed
Update docstring
1 parent 5f6d8cf commit 0a4d040

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

src/ram_air_kite.jl

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -354,29 +354,32 @@ function SysState(s::RamAirKite, zoom=1.0) # TODO: add left and right lines, sto
354354
end
355355

356356
"""
357-
init_sim!(s::RamAirKite; prn=true) -> Nothing
357+
init_sim!(s::RamAirKite, measure::Measurement; prn=true, precompile=false) -> Nothing
358358
359-
Initialize a complete kite power system model from scratch.
359+
Initialize a kite power system model.
360360
361-
This function performs the following operations:
362-
1. Converts measurement data to quaternion orientation
363-
2. Initializes the point mass system representing the kite and tethers
364-
3. Creates the symbolic MTK system with all equations
365-
4. Simplifies the system equations
366-
5. Creates an ODEProblem
367-
6. Serializes the problem to disk for future reuse
368-
7. Calls `reinit!` to set up the integrator
369-
370-
This is a computationally expensive operation and should only be called when the model
371-
structure changes. For normal simulations, prefer calling `reinit!` directly if a serialized
372-
problem already exists.
361+
If a serialized model exists for the current configuration, it will load that model
362+
and only update the state variables. Otherwise, it will create a new model from scratch.
363+
364+
# Fast path (serialized model exists):
365+
1. Loads existing ODEProblem from disk
366+
2. Calls `reinit!` to update state variables
367+
3. Sets up integrator with current measurements
368+
369+
# Slow path (no serialized model):
370+
1. Creates symbolic MTK system with all equations
371+
2. Simplifies system equations
372+
3. Creates ODEProblem and serializes to disk
373+
4. Proceeds with fast path
373374
374375
# Arguments
375-
- `s::RamAirKite`: The kite power system state object
376+
- `s::RamAirKite`: The kite system state object
377+
- `measure::Measurement`: Initial state measurements
376378
- `prn::Bool=true`: Whether to print progress information
379+
- `precompile::Bool=false`: Whether to build problem for precompilation
377380
378381
# Returns
379-
- `Nothing`
382+
`Nothing`
380383
"""
381384
function init_sim!(s::RamAirKite, measure::Measurement; prn=true, precompile=false)
382385
function init(s, measure)

0 commit comments

Comments
 (0)