Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit a60a9c43 authored by Thomas's avatar Thomas
Browse files

merge pierre

parents 5bb1b296 bb5abfca
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
project(SocialAgents)
# a decommenter si on veut voir ce qui se passe a la compilation
#set( CMAKE_VERBOSE_MAKEFILE 1 )
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN)
......@@ -58,4 +57,3 @@ SET(NUMERICAL_LIBS numerical lapack blas f2c)
add_subdirectory(Release)
add_subdirectory(Debug)
#set terminal svg size 600,400 dynamic enhanced fname 'arial' fsize 11 butt
#set output 'graphBenchMemoryCircles1000.svg'
set terminal svg size 600,400 enhanced font 'arial,11' butt
set output 'graphBenchMemoryCircles1000.svg'
set auto x
set grid
set xlabel 'Time'
......@@ -7,9 +7,9 @@ set ylabel 'Memory'
set yrange [0.1:*]
#set xrange [0:2580]
#set logscale y
plot 'Circle_Memory_NotreMethodeSubdivMax.data' using 1:2 title 'Fine grid' with lines, \
'Circle_Memory_NotreMethodeSansSimplif.data' using 1:2 title 'Adaptive method w/o coarsening' with lines, \
'Circle_Memory_NotreMethode.data' using 1:2 title 'Adaptive method' with lines, \
'Circle_Memory_NotreMethodeStatic.data' using 1:2 title 'Coarse grid' with lines
plot 'Circle_Memory_NotreMethodeSubdivMax.data' using 1:2 title 'Fine grid' with lines lt 5, \
'Circle_Memory_NotreMethodeSansSimplif.data' using 1:2 title 'Adaptive method w/o simplification' with lines lt 4, \
'Circle_Memory_NotreMethode.data' using 1:2 title 'Adaptive method' with lines lt 2, \
'Circle_Memory_NotreMethodeStatic.data' using 1:2 title 'Coarse grid' with lines lt 3
pause -1
This diff is collapsed.
......@@ -5,8 +5,7 @@
#include <algorithm>
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Algo/ImplicitHierarchicalMesh/ihm.h"
#include "Algo/ImplicitHierarchicalMesh/subdivision.h"
......@@ -32,7 +31,7 @@ class Obstacle;
struct PFP: public PFP_STANDARD
{
// definition de la carte
// typedef EmbeddedMap2<Map2> MAP;
// typedef EmbeddedMap2 MAP;
typedef Algo::IHM::ImplicitHierarchicalMap MAP;
// definition des listes d'agent
......
......@@ -127,11 +127,11 @@ void Agent::computePrefVelocity()
/*
* Perturb a little to avoid deadlocks due to perfect symmetry.
*/
float angle = std::rand() * 2.0f * M_PI / RAND_MAX;
float dist = std::rand() * 0.0001f / RAND_MAX;
prefVelocity_ = goalVector + VEC3(dist * cos(angle), dist * sin(angle), 0.0f);
// float angle = std::rand() * 2.0f * M_PI / RAND_MAX;
// float dist = std::rand() * 0.0001f / RAND_MAX;
// prefVelocity_ = goalVector + VEC3(dist * cos(angle), dist * sin(angle), 0.0f);
// prefVelocity_ = goalVector;
prefVelocity_ = goalVector;
}
void Agent::computeNewVelocity2()
......
......@@ -172,11 +172,11 @@ Dart EnvMap::getBelongingCell(const PFP::VEC3& pos)
void EnvMap::init()
{
float sideSize = 70.0f;
unsigned int nbSquares = 12;
unsigned int nbSquares = 24;
// CityGenerator::generateGrid<PFP>(map, position, nbSquares, nbSquares, sideSize, obstacleMark, buildingMark);
CityGenerator::generateGrid<PFP>(map, position, nbSquares, nbSquares, sideSize, obstacleMark, buildingMark);
// CityGenerator::generateCorridor<PFP>(map, position, obstacleMark, buildingMark, 50, nbSquares);
CityGenerator::generateCity<PFP>(map, position, obstacleMark, buildingMark, sideSize, nbSquares);
// CityGenerator::generateCity<PFP>(map, position, obstacleMark, buildingMark, sideSize, nbSquares);
// CityGenerator::generateMall<PFP>(map, position, obstacleMark, buildingMark, sideSize);
// CityGenerator::simplifyFreeSpace<PFP>(map, position, obstacleMark, buildingMark);
// CityGenerator::convexifyFreeSpace<PFP>(map, position, obstacleMark, buildingMark);
......
......@@ -10,13 +10,13 @@ Simulator::Simulator() : timeStep_(0.2f), globalTime_(0.0f), nbSteps_(0)
std::cout << "setup scenario" << std::endl;
// importAgents("myAgents.pos");
// setupScenario(700);
// setupCircleScenario(500);
setupCityScenario(
-1.0f * (12 * (70.0f / 2.0f) - 10),
-1.0f * (12 * (70.0f / 2.0f) - 10),
20,
20
);
setupCircleScenario(1000);
// setupCityScenario(
// -1.0f * (12 * (70.0f / 2.0f) - 10),
// -1.0f * (12 * (70.0f / 2.0f) - 10),
// 20,
// 20
// );
// addPathsToAgents();
unsigned nbAgents = agents_.size();
......@@ -117,7 +117,7 @@ void Simulator::setupCircleScenario(unsigned int nbMaxAgent)
{
float pi = 3.14159265358979323846f;
float r = 400.0f;
float r = 800.0f;
for (unsigned int i = 0; i < nbMaxAgent; ++i)
{
VEC3 posagent(std::cos(i * 2.0f * pi / float(nbMaxAgent))*r,std::sin(i * 2.0f * pi / float(nbMaxAgent))*r,0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment