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

Detailed Description

A structure meant to store soft bounds and associated violation constants. It is 'Simple' because it has one BoundCost per element, in contrast to 'Multiple'. Design notes:

  • it is meant to store model information to be shared through pointers, so it disallows copy and assign to avoid accidental duplication.
  • it keeps soft bounds as an array of structs to help cache, because code that uses such bounds typically use both bound and cost.
  • soft bounds are named pairs, prevents some mistakes.
  • using operator[] to access elements is not interesting, because the structure will be accessed through pointers, moreover having to type bound_cost reminds the user of the order if they do a copy assignment of the element.

Definition at line 3048 of file routing.h.

#include <routing.h>

Public Member Functions

 BoundCost ()
 BoundCost (int64_t bound, int64_t cost)

Public Attributes

int64_t bound
int64_t cost

Constructor & Destructor Documentation

◆ BoundCost() [1/2]

operations_research::BoundCost::BoundCost ( )
inline

Definition at line 3051 of file routing.h.

◆ BoundCost() [2/2]

operations_research::BoundCost::BoundCost ( int64_t bound,
int64_t cost )
inline

Definition at line 3052 of file routing.h.

Member Data Documentation

◆ bound

int64_t operations_research::BoundCost::bound

Definition at line 3049 of file routing.h.

◆ cost

int64_t operations_research::BoundCost::cost

Definition at line 3050 of file routing.h.


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