FFSM++ 1.1.0
French Forest Sector Model ++
Loading...
Searching...
No Matches
testThread Class Reference

#include <Sandbox.h>

Inheritance diagram for testThread:
Collaboration diagram for testThread:

Public Member Functions

 testThread ()
 
void assignJob (TestStructure *agent_h)
 

Protected Member Functions

void run ()
 

Private Attributes

volatile TestStructureagent
 

Detailed Description

Definition at line 77 of file Sandbox.h.

Constructor & Destructor Documentation

◆ testThread()

Definition at line 1692 of file Sandbox.cpp.

1692 {
1693
1694}

Member Function Documentation

◆ assignJob()

void assignJob ( TestStructure agent_h)

Definition at line 1712 of file Sandbox.cpp.

1712 {
1713 agent = agent_h;
1714 agent->cachedOffer = 0;
1715}
volatile TestStructure * agent
Definition Sandbox.h:88
double cachedOffer
Definition Sandbox.h:72

Referenced by Sandbox::testThreads().

Here is the caller graph for this function:

◆ run()

void run ( )
protected

Definition at line 1697 of file Sandbox.cpp.

1697 {
1698
1699 cout << agent->i << endl;
1700
1701 double randChange = (0+( (double)rand() / ((double)(RAND_MAX)+(double)(1)) )*(10-0+1))/ (double)100; //rand() must be not thread safe !!!!
1702
1703 int justn = 10000;
1704 vector <double> takeTimeVector (justn, 0);
1705 for (int i =0; i< justn;i++){
1706 takeTimeVector.at(i)=i*2;
1707 }
1709}
double random
Definition Sandbox.h:73

Member Data Documentation

◆ agent

volatile TestStructure* agent
private

Definition at line 88 of file Sandbox.h.

Referenced by assignJob(), and run().


The documentation for this class was generated from the following files: