Skip to content

Commit

Permalink
Merge pull request #3 from MikeHeiber/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
MikeHeiber authored May 12, 2017
2 parents 5873711 + 323dd6b commit 25dbddd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Event::Event(){
coords_dest.z = 0;
}

void Event::calculateExecutionTime(const double rate,const double current_time){
execution_time = current_time-(1/rate)*log(rand01());
}

Coords Event::getDestCoords() const{
return coords_dest;
}
Expand Down
2 changes: 1 addition & 1 deletion Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Event{
static mt19937 gen;
virtual ~Event();
Event();
virtual void calculateEvent(const Coords& dest_coords, const double rate,const double current_time) = 0;
void calculateExecutionTime(const double rate,const double current_time);
Coords getDestCoords() const;
virtual string getName() const;
list<Object*>::iterator getObjectIt() const;
Expand Down
12 changes: 12 additions & 0 deletions Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ double Object::getCreationTime() const{
return time_created;
}

int Object::getDX() const{
return dx;
}

int Object::getDY() const{
return dy;
}

int Object::getDZ() const{
return dz;
}

list<Event*>::iterator Object::getEventIt() const{
return event_it;
}
Expand Down
3 changes: 3 additions & 0 deletions Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Object{
double calculateDisplacement();
Coords getCoords() const;
double getCreationTime() const;
int getDX() const;
int getDY() const;
int getDZ() const;
list<Event*>::iterator getEventIt() const;
virtual string getName() const;
int getTag() const;
Expand Down

0 comments on commit 25dbddd

Please sign in to comment.