Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Functions
ContDisease.cc File Reference
#include <iostream>
#include "ContDisease.hh"
Include dependency graph for ContDisease.cc:

Functions

int main (int, char **argv)
 

Function Documentation

◆ main()

int main ( int  ,
char **  argv 
)
9{
10 try {
11
12 // Initialize the PseudoParent from config file path
13 Utopia::PseudoParent pp(argv[1]);
14
15 // Initialize the main model instance and directly run it
16 ContDisease("ContDisease", pp).run();
17
18 // Done.
19 return 0;
20 }
21 catch (Utopia::Exception& e) {
23 }
24 catch (std::exception& e) {
25 std::cerr << e.what() << std::endl;
26 return 1;
27 }
28 catch (...) {
29 std::cerr << "Exception occurred!" << std::endl;
30 return 1;
31 }
32}
The base exception class to derive Utopia-specific exceptions from.
Definition exceptions.hh:15
void run()
Run the model from the current time to the maximum time.
Definition model.hh:581
Contagious disease model on a grid.
Definition ContDisease.hh:52
A class to use at the top level of the model hierarchy as a mock parent.
Definition model.hh:1017
int handle_exception(exc_t &exc)
A helper function to handle a Utopia-specific exception.
Definition exceptions.hh:140