7 Commits

Author SHA1 Message Date
James P. Howard, II
568a5f6f5d Merge branch 'release/0.7.2' 2023-01-22 21:45:26 -05:00
James P. Howard, II
eacac535ab Merge branch 'release/0.7.1' 2023-01-22 21:04:42 -05:00
James P. Howard, II
597bb298eb Merge branch 'release/0.7.0' 2023-01-22 20:49:34 -05:00
James P. Howard, II
d4db95f925 Merge branch 'release/0.6.0' 2022-08-19 20:57:58 -04:00
James P. Howard, II
13185c1e0b Merge branch 'release/0.5.1' 2022-08-11 22:21:14 -04:00
James P. Howard, II
0f8ee56948 Merge branch 'release/0.5.0' 2022-08-08 16:18:44 -04:00
James P. Howard, II
8d9b217298 Merge branch 'hotfix/0.4.2' 2021-09-25 21:13:31 -04:00
3 changed files with 21 additions and 23 deletions

View File

@@ -64,8 +64,7 @@ Neither is used directly by the Kami library.
* Use [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)
* Use [Google Test](https://github.com/google/googletest)
* Use [Conventional Commits](https://www.conventionalcommits.org/)
## For more information
* James P. Howard, II <<james.howard@jhu.edu>>

View File

@@ -3,7 +3,6 @@ Changelog
Below is the consolidated changelog for Kami.
- :support:`0` Started using Conventional Commits
- :feature:`0` Added baseline for continuous domains
- :release:`0.7.2 <2023.01.22>`

View File

@@ -6,7 +6,7 @@ by being written in C++, Kami runs substantially faster. This
allows for faster runs and more runs within a fixed amount of time.
The advantage here is that an agent-based model (ABM) built on the
Kami platform is better suited for statistical and Monte Carlo
approaches to modeling.
approaches to modelling.
Model Form
----------
@@ -36,12 +36,12 @@ create a class called ``MinimalAgent``:
.. code-block:: c++
:linenos:
class MinimalAgent : public kami::Agent {
public:
kami::AgentID step(std::shared_ptr<kami::Model> model) override {
return this->get_agent_id();
}
};
class MinimalAgent : public kami::Agent {
public:
kami::AgentID step(std::shared_ptr<kami::Model> model) override {
return this->get_agent_id();
}
};
An ``Agent``, and its subclasses, will automatically inherit an ``AgentID``,
which is the unique identifier for the session. The only explicit
@@ -56,18 +56,18 @@ The second component is ``MinimalModel:``
class MinimalModel: public kami::Model {
public:
MinimalModel() {
auto sched = std::make_shared<kami::SequentialScheduler>();
set_scheduler(sched);
MinimalModel() {
auto sched = std::make_shared<kami::SequentialScheduler>();
set_scheduler(sched);
auto pop = std::make_shared<kami::Population>();
set_population(pop);
auto pop = std::make_shared<kami::Population>();
set_population(pop);
for (auto i = 0; i < 10; i++) {
auto new_agent = std::make_shared<MinimalAgent>();
pop->add_agent(new_agent);
for (auto i = 0; i < 10; i++) {
auto new_agent = std::make_shared<MinimalAgent>();
pop->add_agent(new_agent);
}
}
}
};
The ``MinimalModel`` performs some important tasks that important to do
@@ -85,12 +85,12 @@ them to the population.
:linenos:
int main() {
auto model = std::make_shared<MinimalModel>();
auto model = std::make_shared<MinimalModel>();
for (int i = 0; i < 10; i++)
model->step();
for (int i = 0; i < 10; i++)
model->step();
return 0;
return 0;
}
The last part is our `main()` function. It creates the `MinimalModel`