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

Functions

int main (int, char **argv)
 

Function Documentation

◆ main()

int main ( int  ,
char **  argv 
)
7 {
8
9 try {
10 // Initialize the PseudoParent from config file path
11 Utopia::PseudoParent pp(argv[1]);
12
13 // Initialize the main model instance and directly run it
14 SandPile("SandPile", pp).run();
15
16 return 0;
17 }
18 catch (Utopia::Exception& e) {
20 }
21 catch (std::exception& e) {
22 std::cerr << e.what() << std::endl;
23 return 1;
24 }
25 catch (...) {
26 std::cerr << "Exception occurred!" << std::endl;
27 return 1;
28 }
29}
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
The SandPile Model.
Definition SandPile.hh:86
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