Add operator== to Well::ProductionControls and init struct members
This commit is contained in:
@@ -322,23 +322,40 @@ public:
|
||||
}
|
||||
|
||||
ProducerCMode cmode = ProducerCMode::NONE;
|
||||
double oil_rate;
|
||||
double water_rate;
|
||||
double gas_rate;
|
||||
double liquid_rate;
|
||||
double resv_rate;
|
||||
double bhp_history;
|
||||
double thp_history;
|
||||
double bhp_limit;
|
||||
double thp_limit;
|
||||
double alq_value;
|
||||
int vfp_table_number;
|
||||
bool prediction_mode;
|
||||
double oil_rate{0};
|
||||
double water_rate{0};
|
||||
double gas_rate{0};
|
||||
double liquid_rate{0};
|
||||
double resv_rate{0};
|
||||
double bhp_history{0};
|
||||
double thp_history{0};
|
||||
double bhp_limit{0};
|
||||
double thp_limit{0};
|
||||
double alq_value{0};
|
||||
int vfp_table_number{0};
|
||||
bool prediction_mode{0};
|
||||
|
||||
bool hasControl(ProducerCMode cmode_arg) const {
|
||||
return (this->controls & static_cast<int>(cmode_arg)) != 0;
|
||||
}
|
||||
|
||||
bool operator==(const ProductionControls& other) const {
|
||||
return this->cmode == other.cmode &&
|
||||
this->oil_rate == other.oil_rate &&
|
||||
this->water_rate == other.water_rate &&
|
||||
this->gas_rate == other.gas_rate &&
|
||||
this->liquid_rate == other.liquid_rate &&
|
||||
this->resv_rate == other.resv_rate &&
|
||||
this->bhp_history == other.bhp_history &&
|
||||
this->thp_history == other.thp_history &&
|
||||
this->bhp_limit == other.bhp_limit &&
|
||||
this->thp_limit == other.thp_limit &&
|
||||
this->alq_value == other.alq_value &&
|
||||
this->vfp_table_number == other.vfp_table_number &&
|
||||
this->prediction_mode == other.prediction_mode;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
int controls;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user