#include <CCircuit.h>
|
| 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 bool | Check_Validity (int vectorSize, int *circuitVector) |
| Checks the validity of the circuit vector.
|
|
◆ Circuit()
Circuit::Circuit |
( |
int | num_units | ) |
|
Constructs a Circuit object with a specified number of units.
- Parameters
-
num_units | The number of units in the circuit. |
◆ ~Circuit()
◆ 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.
◆ 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
-
threshold | The convergence threshold. |
- Returns
- True if the circuit has converged, otherwise false.
◆ 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
-
vectorSize | The size of the circuit vector. |
circuitVector | A pointer to the circuit vector. |
- Returns
- True if the circuit vector is valid, otherwise false.
◆ 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
-
circuitVector | A pointer to the circuit vector. |
◆ 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). |
◆ 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_num | The index of the unit to be marked. |
units | A vector of pointers to CUnit objects representing the units in the circuit. |
check | An array of three booleans that track if the concNum, interNum, or tailsNum connections lead to a circuit outlet. |
◆ 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.
◆ check
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
The feed rate for the circuit
◆ gerardiumFeed
double Circuit::gerardiumFeed |
Feed rate of gerardium in the circuit
◆ numUnits
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: