Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::EnergyEvent Struct Reference

Detailed Description

Definition at line 129 of file scheduling_cuts.cc.

Public Member Functions

 EnergyEvent (int t, SchedulingConstraintHelper *x_helper)
bool IsPresent () const
IntegerValue GetMinOverlap (IntegerValue start, IntegerValue end) const
ABSL_MUST_USE_RESULT bool FillEnergyLp (AffineExpression size, const util_intops::StrongVector< IntegerVariable, double > &lp_values, Model *model)
std::string DebugString () const

Public Attributes

IntegerValue start_min
 Cache of the bounds of the interval.
IntegerValue start_max
IntegerValue end_min
IntegerValue end_max
IntegerValue size_min
IntegerValue demand_min
 Cache of the bounds of the demand.
IntegerValue energy_min
 The energy min of this event.
std::vector< LiteralValueValuedecomposed_energy
bool use_decomposed_energy = false
AffineExpression demand
 We need this for linearizing the energy in some cases.
LiteralIndex presence_literal_index = kNoLiteralIndex
 If set, this event is optional and its presence is controlled by this.
LinearExpression linearized_energy
double linearized_energy_lp_value = 0.0
bool energy_is_quadratic = false
 True if linearized_energy is not exact and a McCormick relaxation.

Constructor & Destructor Documentation

◆ EnergyEvent()

operations_research::sat::EnergyEvent::EnergyEvent ( int t,
SchedulingConstraintHelper * x_helper )
inline

Definition at line 130 of file scheduling_cuts.cc.

Member Function Documentation

◆ DebugString()

std::string operations_research::sat::EnergyEvent::DebugString ( ) const
inline

Definition at line 210 of file scheduling_cuts.cc.

◆ FillEnergyLp()

ABSL_MUST_USE_RESULT bool operations_research::sat::EnergyEvent::FillEnergyLp ( AffineExpression size,
const util_intops::StrongVector< IntegerVariable, double > & lp_values,
Model * model )
inline

This method expects all the other fields to have been filled before. It must be called before the EnergyEvent is used.

Definition at line 186 of file scheduling_cuts.cc.

◆ GetMinOverlap()

IntegerValue operations_research::sat::EnergyEvent::GetMinOverlap ( IntegerValue start,
IntegerValue end ) const
inline

Computes the mandatory minimal overlap of the interval with the time window [start, end].

Definition at line 178 of file scheduling_cuts.cc.

◆ IsPresent()

bool operations_research::sat::EnergyEvent::IsPresent ( ) const
inline

The actual value of the presence literal of the interval(s) is checked when the event is created. A value of kNoLiteralIndex indicates that either the interval was not optional, or that its presence literal is true at level zero.

Definition at line 174 of file scheduling_cuts.cc.

Member Data Documentation

◆ decomposed_energy

std::vector<LiteralValueValue> operations_research::sat::EnergyEvent::decomposed_energy

If non empty, a decomposed view of the energy of this event. First value in each pair is size, second is demand.

Definition at line 152 of file scheduling_cuts.cc.

◆ demand

AffineExpression operations_research::sat::EnergyEvent::demand

We need this for linearizing the energy in some cases.

Definition at line 156 of file scheduling_cuts.cc.

◆ demand_min

IntegerValue operations_research::sat::EnergyEvent::demand_min

Cache of the bounds of the demand.

Definition at line 145 of file scheduling_cuts.cc.

◆ end_max

IntegerValue operations_research::sat::EnergyEvent::end_max

Definition at line 141 of file scheduling_cuts.cc.

◆ end_min

IntegerValue operations_research::sat::EnergyEvent::end_min

Definition at line 140 of file scheduling_cuts.cc.

◆ energy_is_quadratic

bool operations_research::sat::EnergyEvent::energy_is_quadratic = false

True if linearized_energy is not exact and a McCormick relaxation.

Definition at line 168 of file scheduling_cuts.cc.

◆ energy_min

IntegerValue operations_research::sat::EnergyEvent::energy_min

The energy min of this event.

Definition at line 148 of file scheduling_cuts.cc.

◆ linearized_energy

LinearExpression operations_research::sat::EnergyEvent::linearized_energy

A linear expression which is a valid lower bound on the total energy of this event. We also cache the activity of the expression to not recompute it all the time.

Definition at line 164 of file scheduling_cuts.cc.

◆ linearized_energy_lp_value

double operations_research::sat::EnergyEvent::linearized_energy_lp_value = 0.0

Definition at line 165 of file scheduling_cuts.cc.

◆ presence_literal_index

LiteralIndex operations_research::sat::EnergyEvent::presence_literal_index = kNoLiteralIndex

If set, this event is optional and its presence is controlled by this.

Definition at line 159 of file scheduling_cuts.cc.

◆ size_min

IntegerValue operations_research::sat::EnergyEvent::size_min

Definition at line 142 of file scheduling_cuts.cc.

◆ start_max

IntegerValue operations_research::sat::EnergyEvent::start_max

Definition at line 139 of file scheduling_cuts.cc.

◆ start_min

IntegerValue operations_research::sat::EnergyEvent::start_min

Cache of the bounds of the interval.

Definition at line 138 of file scheduling_cuts.cc.

◆ use_decomposed_energy

bool operations_research::sat::EnergyEvent::use_decomposed_energy = false

Definition at line 153 of file scheduling_cuts.cc.


The documentation for this struct was generated from the following file: