GERARDIUM RUSH - MINERAL CIRCUIT OPTIMIZER v1.0.0
"A powerful tool designed to optimize circuit configurations using advanced genetic algorithms." - by Pentlandite
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions | Private Attributes | Static Private Attributes
Circuit Class Reference

#include <CCircuit.h>

Collaboration diagram for Circuit:
Collaboration graph

Public Member Functions

 Circuit (int num_units)
 Constructs a Circuit object with a specified number of units.
 
 ~Circuit ()
 Destructs the Circuit object.
 
void print_info () const
 Prints information about the circuit.
 
void connected (int *circuitVector)
 Connects the units in the circuit based on the circuit vector.
 
void initialize_feed_rates (double gerardium_=10, double waste_=90)
 Initializes the feed rates for gerardium and waste.
 
void mark_units (int unitNum, std::vector< CUnit * > &units, bool check[3])
 Marks a unit in the circuit and recursively marks its connected units.
 
bool check_convergence (double threshold)
 Checks if the circuit has converged based on a threshold value.
 
void calculate_flows ()
 Calculates the flows within the circuit.
 

Static Public Member Functions

static bool Check_Validity (int vectorSize, int *circuitVector)
 Checks the validity of the circuit vector.
 

Data Fields

double concentrateG
 
double concentrateW
 
double tailingsG
 
double tailingsW
 
double wasteFeed
 
double gerardiumFeed
 

Private Member Functions

void reset_new_feeds ()
 Resets the new feeds in the circuit.
 

Private Attributes

std::vector< CUnit * > units
 
int numUnits
 
int feed
 

Static Private Attributes

static bool check [3]
 

Constructor & Destructor Documentation

◆ Circuit()

Circuit::Circuit ( int num_units)

Constructs a Circuit object with a specified number of units.

Parameters
num_unitsThe number of units in the circuit.

◆ ~Circuit()

Circuit::~Circuit ( )

Destructs the Circuit object.

Member Function Documentation

◆ calculate_flows()

void Circuit::calculate_flows ( )

Calculates the flows within the circuit.

This member function calculates the flow rates of gerardium and waste through the circuit's units.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_convergence()

bool Circuit::check_convergence ( double threshold = 1e-6)

Checks if the circuit has converged based on a threshold value.

This member function checks whether the circuit's calculations have converged by comparing the changes in feed rates to a specified threshold.

Parameters
thresholdThe convergence threshold.
Returns
True if the circuit has converged, otherwise false.
Here is the caller graph for this function:

◆ Check_Validity()

bool Circuit::Check_Validity ( int vectorSize,
int * circuitVector )
static

Checks the validity of the circuit vector.

This static member function checks whether a given circuit vector is valid. It verifies the connections and configurations of the units in the circuit.

Parameters
vectorSizeThe size of the circuit vector.
circuitVectorA pointer to the circuit vector.
Returns
True if the circuit vector is valid, otherwise false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connected()

void Circuit::connected ( int * circuitVector)

Connects the units in the circuit based on the circuit vector.

This member function establishes connections between the units in the circuit according to the specified circuit vector.

Parameters
circuitVectorA pointer to the circuit vector.
Here is the caller graph for this function:

◆ initialize_feed_rates()

void Circuit::initialize_feed_rates ( double gerardium_ = 10,
double waste_ = 90 )

Initializes the feed rates for gerardium and waste.

This member function initializes the feed rates for gerardium and waste to the specified values.

Parameters
gerardium_The feed rate of gerardium (default is 10).
waste_The feed rate of waste (default is 90).
Here is the caller graph for this function:

◆ mark_units()

void Circuit::mark_units ( int unitNum,
std::vector< CUnit * > & units,
bool check[3] )

Marks a unit in the circuit and recursively marks its connected units.

This function marks a specified unit in the circuit as visited. It then recursively marks all units connected to this unit through its concNum, interNum, and tailsNum connections. If a connection points to an outlet, it updates the corresponding check flag to indicate an exit has been seen.

Parameters
unit_numThe index of the unit to be marked.
unitsA vector of pointers to CUnit objects representing the units in the circuit.
checkAn array of three booleans that track if the concNum, interNum, or tailsNum connections lead to a circuit outlet.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_info()

void Circuit::print_info ( ) const

Prints information about the circuit.

This member function prints detailed information about the circuit, including the number of units, feed rates, and concentrations.

◆ reset_new_feeds()

void Circuit::reset_new_feeds ( )
private

Resets the new feeds in the circuit.

This helper function resets the new feed rates in the circuit to their initial values.

Here is the caller graph for this function:

Field Documentation

◆ check

bool Circuit::check[3]
staticprivate

Static array to check the units

◆ concentrateG

double Circuit::concentrateG

Concentration of gerardium in the circuit

◆ concentrateW

double Circuit::concentrateW

Concentration of waste in the circuit

◆ feed

int Circuit::feed
private

The feed rate for the circuit

◆ gerardiumFeed

double Circuit::gerardiumFeed

Feed rate of gerardium in the circuit

◆ numUnits

int Circuit::numUnits
private

The number of units in the circuit

◆ tailingsG

double Circuit::tailingsG

Tailings of gerardium in the circuit

◆ tailingsW

double Circuit::tailingsW

Tailings of waste in the circuit

◆ units

std::vector<CUnit *> Circuit::units
private

Vector of pointers to the units in the circuit

◆ wasteFeed

double Circuit::wasteFeed

Feed rate of waste in the circuit


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