66 extern struct argp model_argp;
70 int RandomRange(
int min,
int max);
71 int RandomRangeNonUniform(
int x,
int min,
int max);
72 double Expent(
double mean);
76 int Zipf(
double skew,
int limit);
79 extern
void (*
ScheduleNewEvent)(
unsigned int receiver,
simtime_t timestamp,
unsigned int event_type,
void *event_content,
unsigned int event_size);
80 extern
void SetState(
void *new_state);
138 const char *
const topology_path;
141 const unsigned out_of_topology;
142 const bool write_enabled;
174 unsigned int FindReceiver (
void);
177 unsigned int RegionsCount (
void);
180 unsigned int DirectionsCount (
void);
183 unsigned int NeighboursCount (
unsigned int region);
186 unsigned int GetReceiver (
unsigned int from, direction_t direction,
bool reachable);
189 unsigned int FindReceiverToward (
unsigned int to);
193 double ComputeMinTour (
unsigned int source,
unsigned int dest,
unsigned int result[RegionsCount()]);
199 typedef unsigned long long agent_t;
202 const unsigned neighbour_data_size;
203 const unsigned traverse_handler;
204 const bool keep_history;
207 int GetNeighbourInfo (direction_t i,
unsigned int *region_id,
void **data_p);
208 void TrackNeighbourInfo (
void *neighbour_data);
210 bool IterAgents (agent_t *agent_p);
211 unsigned CountAgents (
void);
213 agent_t SpawnAgent (
unsigned user_data_size);
214 void KillAgent (agent_t agent);
216 void* DataAgent (agent_t agent,
unsigned *data_size_p);
218 void ScheduleNewLeaveEvent (
simtime_t time,
unsigned int event_type, agent_t agent);
220 unsigned CountVisits (
const agent_t agent);
221 void GetVisit (
const agent_t agent,
unsigned *region_p,
unsigned *event_type_p,
unsigned i);
222 void SetVisit (
const agent_t agent,
unsigned region,
unsigned event_type,
unsigned i);
223 void EnqueueVisit (agent_t agent,
unsigned region,
unsigned event_type);
224 void AddVisit (agent_t agent,
unsigned region,
unsigned event_type,
unsigned i);
225 void RemoveVisit (agent_t agent,
unsigned i);
227 unsigned CountPastVisits (
const agent_t agent);
228 void GetPastVisit (
const agent_t agent,
unsigned *region_p,
unsigned *event_type_p,
simtime_t *time_p,
unsigned i);
250 CAP_LPS_DISTRIBUTION,
258 CAP_GVT_SNAPSHOT_CYCLES,
268 CAP_DETERMINISTIC_SEED,
uint64_t seed
The master seed to be used in this run.
all crossing costs and probabilities are set to 1, but there can be not crossable regions ...
unsigned int n_prc_tot
This is the definition of the number of LPs running in the current simulation.
#define min(a, b)
Macro to find the minimum among two values.
int lps
Number of active logical processes.
double Expent(double mean)
A generic invalid direction.
int verbose
Kernel verbose.
int ckpt_period
Number of events to execute before taking a snapshot in PSS (ignored otherwise)
int scheduler
Which scheduler to be used.
double GetValueTopology(unsigned from, unsigned to)
int simulation_time
Wall-clock-time based termination predicate.
a torus shaped grid topology (a wrapping around square topology)
int stats
Produce performance statistic file (default STATS_ALL)
int gvt_time_period
Wall-Clock time to wait before executiong GVT operations.
int lps_distribution
Policy for the LP to Kernel mapping.
double simtime_t
This defines the type with whom timestamps are represented.
void SetValueTopology(unsigned from, unsigned to, double value)
decisions are taken at random but are weighted on the palatability of neighbours
capability_t
Capability enumeration.
__attribute((weak)) extern struct argp model_argp
This can be implemented by the model for smart argument handling.
enum _direction_t direction_t
void(* ScheduleNewEvent)(unsigned int receiver, simtime_t timestamp, unsigned int event_type, void *event_content, unsigned int event_size)
This is the function pointer to correctly set ScheduleNewEvent API version, depending if we're runnin...
int checkpointing
Type of checkpointing scheme (e.g., PSS, CSS, ...)
#define max(a, b)
Macro to find the maximum among two values.
an arbitrary shaped topology
a ring shaped topology direction
bool CapabilityAvailable(enum capability_t which, struct capability_info_t *info)
Query runtime capabilities while executing the model.
arbitrary offset used to distinguish during debug different enums
decisions on next hops are taken based on the costs undertaken to cross the boundaries ...
a ring shaped topology walkable in a single direction
const char * output_dir
Destination Directory of output files.
void SetState(void *new_state)
int state_saving
Type of checkpointing mode (Synchronous, Semi-Asyncronous, ...)
int termination_mode
Check termination strategy: standard or incremental.
int Zipf(double skew, int limit)