SlideShare a Scribd company logo
main.cpp
/**
* DPSM
* decentralized price setting model
* Version: 0.0.6
*/
#include "dpsm_simu.hpp"
#include "tools.hpp"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
DPSM simu;
simu.num_iterations = 1000*1000*2;
simu.num_customers = 2500;
simu.num_salesman = 2;
simu.grid_size = 128;
simu.log_bin_size = int(simu.num_iterations / 1000);
Customer::sleep_time = 0;
Customer::walk_time = -1; //Customer::sleep_time;
Customer::parsimony = 0;
Customer::log_norm = true;
Customer::log_norm_var = 0.25;
Customer::log_norm_ev = 2;
Customer::memory = 2;
Customer::mem_k = 50;
simu.InitStats();
simu.InitPeople();
for (int i = 0; i < simu.num_salesman; i++)
{
simu.salesm[i].SetStrategy(500, 1, 0.1, 2);
simu.salesm[i].p = 2;
}
for (int i = 0; i < 1; i++) {
simu.Start();
cout << i << endl;
}
simu.stat.WriteLogSalesman("o2");
Seite 1
main.cpp
return 0;
}
Seite 2

More Related Content

Viewers also liked

Statistics.cpp
Statistics.cppStatistics.cpp
Statistics.cpp
Vorname Nachname
 
Tools.hpp
Tools.hppTools.hpp
Tools.hpp
Vorname Nachname
 
Could humans recognize odor by phonon assisted tunneling
Could humans recognize odor by phonon assisted tunnelingCould humans recognize odor by phonon assisted tunneling
Could humans recognize odor by phonon assisted tunneling
Vorname Nachname
 
Dpsm simu.hpp
Dpsm simu.hppDpsm simu.hpp
Dpsm simu.hpp
Vorname Nachname
 
Statistics.hpp
Statistics.hppStatistics.hpp
Statistics.hpp
Vorname Nachname
 
Structure-odor relations: a modern perspective
Structure-odor relations: a modern perspectiveStructure-odor relations: a modern perspective
Structure-odor relations: a modern perspective
Vorname Nachname
 
Dpsm simu.cpp
Dpsm simu.cppDpsm simu.cpp
Dpsm simu.cpp
Vorname Nachname
 
Econophysics
EconophysicsEconophysics
Econophysics
Vorname Nachname
 

Viewers also liked (8)

Statistics.cpp
Statistics.cppStatistics.cpp
Statistics.cpp
 
Tools.hpp
Tools.hppTools.hpp
Tools.hpp
 
Could humans recognize odor by phonon assisted tunneling
Could humans recognize odor by phonon assisted tunnelingCould humans recognize odor by phonon assisted tunneling
Could humans recognize odor by phonon assisted tunneling
 
Dpsm simu.hpp
Dpsm simu.hppDpsm simu.hpp
Dpsm simu.hpp
 
Statistics.hpp
Statistics.hppStatistics.hpp
Statistics.hpp
 
Structure-odor relations: a modern perspective
Structure-odor relations: a modern perspectiveStructure-odor relations: a modern perspective
Structure-odor relations: a modern perspective
 
Dpsm simu.cpp
Dpsm simu.cppDpsm simu.cpp
Dpsm simu.cpp
 
Econophysics
EconophysicsEconophysics
Econophysics
 

Similar to Main.cpp

Gps c
Gps cGps c
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docxProjeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
briancrawford30935
 
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfA function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
anand1213
 
So i am trying to finish this code using structures and could use som.pdf
So  i am trying to finish this code using structures and could use som.pdfSo  i am trying to finish this code using structures and could use som.pdf
So i am trying to finish this code using structures and could use som.pdf
aksahnan
 
c plus plus programsSlide
c plus plus programsSlidec plus plus programsSlide
c plus plus programsSlide
harman kaur
 
Lab 2 Histrogram generation Author Naga Kandasamy .docx
 Lab 2 Histrogram generation   Author Naga Kandasamy  .docx Lab 2 Histrogram generation   Author Naga Kandasamy  .docx
Lab 2 Histrogram generation Author Naga Kandasamy .docx
aryan532920
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
rajkumarm401
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
SilvaGraf83
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
MoseStaton39
 
DirectGMA on AMD’S FirePro™ GPUS
DirectGMA on AMD’S  FirePro™ GPUSDirectGMA on AMD’S  FirePro™ GPUS
DirectGMA on AMD’S FirePro™ GPUS
AMD Developer Central
 
The following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdfThe following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdf
marketing413921
 
Ass 1
Ass 1Ass 1
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
pratikbakane
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
yaman dua
 
fraction_math.c for Project 5 Program Design fraction.pdf
fraction_math.c for Project 5  Program Design  fraction.pdffraction_math.c for Project 5  Program Design  fraction.pdf
fraction_math.c for Project 5 Program Design fraction.pdf
anjanadistribution
 
This code has nine errors- but I don't know how to solve it- Please gi (1).pdf
This code has nine errors- but I don't know how to solve it- Please gi (1).pdfThis code has nine errors- but I don't know how to solve it- Please gi (1).pdf
This code has nine errors- but I don't know how to solve it- Please gi (1).pdf
aamousnowov
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
TatyaTope4
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
EPORI
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
Infotech27
 
c++basiccs.ppt
c++basiccs.pptc++basiccs.ppt
c++basiccs.ppt
RaghavendraMR5
 

Similar to Main.cpp (20)

Gps c
Gps cGps c
Gps c
 
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docxProjeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
 
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfA function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
 
So i am trying to finish this code using structures and could use som.pdf
So  i am trying to finish this code using structures and could use som.pdfSo  i am trying to finish this code using structures and could use som.pdf
So i am trying to finish this code using structures and could use som.pdf
 
c plus plus programsSlide
c plus plus programsSlidec plus plus programsSlide
c plus plus programsSlide
 
Lab 2 Histrogram generation Author Naga Kandasamy .docx
 Lab 2 Histrogram generation   Author Naga Kandasamy  .docx Lab 2 Histrogram generation   Author Naga Kandasamy  .docx
Lab 2 Histrogram generation Author Naga Kandasamy .docx
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
 
#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h#include stdio.h#include systypes.h#include syssocket.h
#include stdio.h#include systypes.h#include syssocket.h
 
DirectGMA on AMD’S FirePro™ GPUS
DirectGMA on AMD’S  FirePro™ GPUSDirectGMA on AMD’S  FirePro™ GPUS
DirectGMA on AMD’S FirePro™ GPUS
 
The following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdfThe following code is an implementation of the producer consumer pro.pdf
The following code is an implementation of the producer consumer pro.pdf
 
Ass 1
Ass 1Ass 1
Ass 1
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
 
fraction_math.c for Project 5 Program Design fraction.pdf
fraction_math.c for Project 5  Program Design  fraction.pdffraction_math.c for Project 5  Program Design  fraction.pdf
fraction_math.c for Project 5 Program Design fraction.pdf
 
This code has nine errors- but I don't know how to solve it- Please gi (1).pdf
This code has nine errors- but I don't know how to solve it- Please gi (1).pdfThis code has nine errors- but I don't know how to solve it- Please gi (1).pdf
This code has nine errors- but I don't know how to solve it- Please gi (1).pdf
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
c++basiccs.ppt
c++basiccs.pptc++basiccs.ppt
c++basiccs.ppt
 

More from Vorname Nachname

Leni souza
Leni souzaLeni souza
Leni souza
Vorname Nachname
 
Alien life forms
Alien life formsAlien life forms
Alien life forms
Vorname Nachname
 
Spaceengine2
Spaceengine2Spaceengine2
Spaceengine2
Vorname Nachname
 
Structural Language
Structural LanguageStructural Language
Structural Language
Vorname Nachname
 
Language
LanguageLanguage
Spaceengine2
Spaceengine2Spaceengine2
Spaceengine2
Vorname Nachname
 
Spaceengine
SpaceengineSpaceengine
Spaceengine
Vorname Nachname
 
Topology and Electrostatics
Topology and Electrostatics Topology and Electrostatics
Topology and Electrostatics
Vorname Nachname
 
calculation of currents in nanowires
calculation of currents in nanowirescalculation of currents in nanowires
calculation of currents in nanowires
Vorname Nachname
 
Summerpoject 2005
Summerpoject 2005Summerpoject 2005
Summerpoject 2005
Vorname Nachname
 
Aspelmeyer
AspelmeyerAspelmeyer
Aspelmeyer
Vorname Nachname
 
Arndt matter wave interferometry
Arndt matter wave interferometry Arndt matter wave interferometry
Arndt matter wave interferometry
Vorname Nachname
 

More from Vorname Nachname (12)

Leni souza
Leni souzaLeni souza
Leni souza
 
Alien life forms
Alien life formsAlien life forms
Alien life forms
 
Spaceengine2
Spaceengine2Spaceengine2
Spaceengine2
 
Structural Language
Structural LanguageStructural Language
Structural Language
 
Language
LanguageLanguage
Language
 
Spaceengine2
Spaceengine2Spaceengine2
Spaceengine2
 
Spaceengine
SpaceengineSpaceengine
Spaceengine
 
Topology and Electrostatics
Topology and Electrostatics Topology and Electrostatics
Topology and Electrostatics
 
calculation of currents in nanowires
calculation of currents in nanowirescalculation of currents in nanowires
calculation of currents in nanowires
 
Summerpoject 2005
Summerpoject 2005Summerpoject 2005
Summerpoject 2005
 
Aspelmeyer
AspelmeyerAspelmeyer
Aspelmeyer
 
Arndt matter wave interferometry
Arndt matter wave interferometry Arndt matter wave interferometry
Arndt matter wave interferometry
 

Recently uploaded

Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
hozt8xgk
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
University of Hertfordshire
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
IshaGoswami9
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
Daniel Tubbenhauer
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
İsa Badur
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
pablovgd
 
Sharlene Leurig - Enabling Onsite Water Use with Net Zero Water
Sharlene Leurig - Enabling Onsite Water Use with Net Zero WaterSharlene Leurig - Enabling Onsite Water Use with Net Zero Water
Sharlene Leurig - Enabling Onsite Water Use with Net Zero Water
Texas Alliance of Groundwater Districts
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
KrushnaDarade1
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
Texas Alliance of Groundwater Districts
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
European Sustainable Phosphorus Platform
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
vluwdy49
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
terusbelajar5
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
Areesha Ahmad
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
TinyAnderson
 

Recently uploaded (20)

Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
 
Sharlene Leurig - Enabling Onsite Water Use with Net Zero Water
Sharlene Leurig - Enabling Onsite Water Use with Net Zero WaterSharlene Leurig - Enabling Onsite Water Use with Net Zero Water
Sharlene Leurig - Enabling Onsite Water Use with Net Zero Water
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
 

Main.cpp

  • 1. main.cpp /** * DPSM * decentralized price setting model * Version: 0.0.6 */ #include "dpsm_simu.hpp" #include "tools.hpp" #include <cstdlib> #include <iostream> #include <fstream> #include <cmath> #include <string> using namespace std; int main() { DPSM simu; simu.num_iterations = 1000*1000*2; simu.num_customers = 2500; simu.num_salesman = 2; simu.grid_size = 128; simu.log_bin_size = int(simu.num_iterations / 1000); Customer::sleep_time = 0; Customer::walk_time = -1; //Customer::sleep_time; Customer::parsimony = 0; Customer::log_norm = true; Customer::log_norm_var = 0.25; Customer::log_norm_ev = 2; Customer::memory = 2; Customer::mem_k = 50; simu.InitStats(); simu.InitPeople(); for (int i = 0; i < simu.num_salesman; i++) { simu.salesm[i].SetStrategy(500, 1, 0.1, 2); simu.salesm[i].p = 2; } for (int i = 0; i < 1; i++) { simu.Start(); cout << i << endl; } simu.stat.WriteLogSalesman("o2"); Seite 1