-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b943b3
commit 4b4a85b
Showing
1 changed file
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,43 @@ | ||
Project Structure | ||
================================================================================ | ||
================= | ||
|
||
TODO | ||
The ODE Test Problems API resides under the ``otp`` namespace. At the top level of this namespace, there are three | ||
classes that serve as the foundation for all problem implementations: | ||
|
||
.. toctree:: | ||
:caption: Top-Level Classes | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
problem | ||
rhs | ||
parameters | ||
|
||
Each problem in OTP defines a sub-namespace of ``otp`` with a standard structure: | ||
|
||
:: | ||
|
||
otp.<problemname> | ||
├─ <ProblemName>Problem.m | ||
├─ <ProblemName>Parameters.m | ||
└─ presets | ||
├─ Canonical.m | ||
├─ <PresetName>.m | ||
├─ <AnotherPresetName>.m | ||
└─ ... | ||
|
||
This allows a problem to be manually instantiated with | ||
|
||
>>> timeSpan = ... | ||
>>> y0 = ... | ||
>>> parameters = otp.<problemname>.<ProblemName>Parameters('<Param1>', value1, ...); | ||
>>> problem = otp.<problemname>.<ProblemName>Problem(timeSpan, y0, parameters); | ||
|
||
In most cases, it is easier to use a preset instead. A preset is a subclass of ``<ProblemName>Problem.m`` which | ||
specifies values for the problem time span, initial conditions, and parameters, typically using values proposed in the | ||
literature. Every problem has a preset named ``Canonical`` which can be constructed with | ||
|
||
>>> problem = otp.<problemname>.presets.Canonical; | ||
|
||
Constructors for presets can be called without arguments like the code above, but many presets also accept optional | ||
name-value pairs to override default values. Regardless, parameters can always be modified after instantiating a | ||
problem: | ||
|
||
>>> problem.Parameters.<Param1> = 1234; |