Function initialiseSetting(const std::string&, std::vector<unsigned>&, std::vector<unsigned>&, std::vector<int>&, std::vector<double>&, std::vector<double>&, std::vector<double>&, std::vector<double2>&)
Defined in File Crowd.h
Function Documentation
-
int initialiseSetting(const std::string &dynamicsFile, std::vector<unsigned> &nb_shapes_allagents, std::vector<unsigned> &shapeIDagent, std::vector<int> &edges, std::vector<double> &radius_allshapes, std::vector<double> &masses, std::vector<double> &mois, std::vector<double2> &delta_gtos)
The function creates all agents from the data stored by InputStatic.cpp. It also creates the kinematics and dynamics of the agents by calling updateSetting().
- Parameters:
dynamicsFile -- The input file containing the current state and driving forces for all agents
nb_shapes_allagents -- The number of shapes by agent (size: number of agents)
shapeIDagent -- A correspondence between the shape ids (index) and the agent (value) (size: number of shapes)
edges -- The indices of the first shape for each agent (size: number of agents + 1)
radius_allshapes -- The radii of all shapes (size: number of shapes)
masses -- The masses of the agents
mois -- The moment of inertia of the agents
delta_gtos -- The relative positions of the shapes with respect to the center of mass of each agent
- Returns:
EXIT_SUCCESS if no issue with the Dynamics file EXIT_FAILURE otherwise (the return code comes from updateSetting())