Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::DiffnEnergyEvent Struct Reference
Inheritance diagram for operations_research::sat::DiffnEnergyEvent:
operations_research::sat::DiffnBaseEvent

Public Member Functions

 DiffnEnergyEvent (int t, SchedulingConstraintHelper *x_helper)
 
bool IsPresent () const
 
IntegerValue GetMinOverlap (IntegerValue start, IntegerValue end) const
 
ABSL_MUST_USE_RESULT bool FillEnergyLp (AffineExpression x_size, const util_intops::StrongVector< IntegerVariable, double > &lp_values, Model *model)
 
std::string DebugString () const
 
- Public Member Functions inherited from operations_research::sat::DiffnBaseEvent
 DiffnBaseEvent (int t, SchedulingConstraintHelper *x_helper)
 

Public Attributes

AffineExpression y_size
 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.
 
double y_spread = 0.0
 Used to minimize the increase on the y axis for rectangles.
 
- Public Attributes inherited from operations_research::sat::DiffnBaseEvent
IntegerValue x_start_min
 Cache of the intervals bound on the x direction.
 
IntegerValue x_start_max
 
IntegerValue x_end_min
 
IntegerValue x_end_max
 
IntegerValue x_size_min
 
IntegerValue y_min = IntegerValue(0)
 Useful for no_overlap_2d or cumulative.
 
IntegerValue y_max = IntegerValue(0)
 
IntegerValue y_size_min
 
IntegerValue energy_min
 The energy min of this event.
 
std::vector< LiteralValueValuedecomposed_energy
 

Detailed Description

Definition at line 61 of file diffn_cuts.cc.

Constructor & Destructor Documentation

◆ DiffnEnergyEvent()

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

Definition at line 62 of file diffn_cuts.cc.

Member Function Documentation

◆ DebugString()

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

Definition at line 123 of file diffn_cuts.cc.

◆ FillEnergyLp()

ABSL_MUST_USE_RESULT bool operations_research::sat::DiffnEnergyEvent::FillEnergyLp ( AffineExpression x_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 99 of file diffn_cuts.cc.

◆ GetMinOverlap()

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

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

Definition at line 91 of file diffn_cuts.cc.

◆ IsPresent()

bool operations_research::sat::DiffnEnergyEvent::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 87 of file diffn_cuts.cc.

Member Data Documentation

◆ energy_is_quadratic

bool operations_research::sat::DiffnEnergyEvent::energy_is_quadratic = false

True if linearized_energy is not exact and a McCormick relaxation.

Definition at line 78 of file diffn_cuts.cc.

◆ linearized_energy

LinearExpression operations_research::sat::DiffnEnergyEvent::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 74 of file diffn_cuts.cc.

◆ linearized_energy_lp_value

double operations_research::sat::DiffnEnergyEvent::linearized_energy_lp_value = 0.0

Definition at line 75 of file diffn_cuts.cc.

◆ presence_literal_index

LiteralIndex operations_research::sat::DiffnEnergyEvent::presence_literal_index = kNoLiteralIndex

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

Definition at line 69 of file diffn_cuts.cc.

◆ y_size

AffineExpression operations_research::sat::DiffnEnergyEvent::y_size

We need this for linearizing the energy in some cases.

Definition at line 66 of file diffn_cuts.cc.

◆ y_spread

double operations_research::sat::DiffnEnergyEvent::y_spread = 0.0

Used to minimize the increase on the y axis for rectangles.

Definition at line 81 of file diffn_cuts.cc.


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