2021-04-27 23:00:03 +02:00
<!-- HTML header for doxygen 1.8.18 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
2021-09-20 15:57:27 +02:00
< meta name = "generator" content = "Doxygen 1.8.15" / >
2021-04-27 23:00:03 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > OR-Tools: objective.cc Source File< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
2021-09-20 15:57:27 +02:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */< / script >
2021-04-27 23:00:03 +02:00
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< link href = "styleSheet.tmp.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectlogo" > < img alt = "Logo" src = "orLogo.png" / > < / td >
< td id = "projectalign" style = "padding-left: 0.5em;" >
< div id = "projectname" > OR-Tools
2021-09-20 15:57:27 +02:00
  < span id = "projectnumber" > 9.1< / span >
2021-04-27 23:00:03 +02:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2021-09-20 15:57:27 +02:00
<!-- Generated by Doxygen 1.8.15 -->
2021-04-27 23:00:03 +02:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2021-09-20 15:57:27 +02:00
var searchBox = new SearchBox("searchBox", "search",false,'Search');
2021-04-27 23:00:03 +02:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */< / script >
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2021-09-20 15:57:27 +02:00
$(document).ready(function(){initNavTree('objective_8cc_source.html','');});
2021-04-27 23:00:03 +02:00
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "headertitle" >
< div class = "title" > objective.cc< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
2021-09-20 15:57:27 +02:00
< a href = "objective_8cc.html" > Go to the documentation of this file.< / a > < div class = "fragment" > < div class = "line" > < a name = "l00001" > < / a > < span class = "lineno" > 1< / span >   < span class = "comment" > // Copyright 2010-2021 Google LLC< / span > < / div > < div class = "line" > < a name = "l00002" > < / a > < span class = "lineno" > 2< / span >   < span class = "comment" > // Licensed under the Apache License, Version 2.0 (the " License" );< / span > < / div > < div class = "line" > < a name = "l00003" > < / a > < span class = "lineno" > 3< / span >   < span class = "comment" > // you may not use this file except in compliance with the License.< / span > < / div > < div class = "line" > < a name = "l00004" > < / a > < span class = "lineno" > 4< / span >   < span class = "comment" > // You may obtain a copy of the License at< / span > < / div > < div class = "line" > < a name = "l00005" > < / a > < span class = "lineno" > 5< / span >   < span class = "comment" > //< / span > < / div > < div class = "line" > < a name = "l00006" > < / a > < span class = "lineno" > 6< / span >   < span class = "comment" > // http://www.apache.org/licenses/LICENSE-2.0< / span > < / div > < div class = "line" > < a name = "l00007" > < / a > < span class = "lineno" > 7< / span >   < span class = "comment" > //< / span > < / div > < div class = "line" > < a name = "l00008" > < / a > < span class = "lineno" > 8< / span >   < span class = "comment" > // Unless required by applicable law or agreed to in writing, software< / span > < / div > < div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / span >   < span class = "comment" > // distributed under the License is distributed on an " AS IS" BASIS,< / span > < / div > < div class = "line" > < a name = "l00010" > < / a > < span class = "lineno" > 10< / span >   < span class = "comment" > // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.< / span > < / div > < div class = "line" > < a name = "l00011" > < / a > < span class = "lineno" > 11< / span >   < span class = "comment" > // See the License for the specific language governing permissions and< / span > < / div > < div class = "line" > < a name = "l00012" > < / a > < span class = "lineno" > 12< / span >   < span class = "comment" > // limitations under the License.< / span > < / div > < div class = "line" > < a name = "l00013" > < / a > < span class = "lineno" > 13< / span >   < / div > < div class = "line" > < a name = "l00014" > < / a > < span class = "lineno" > 14< / span >   < span class = "preprocessor" > #include " < a class = "code" href = "objective_8h.html" > ortools/math_opt/cpp/objective.h< / a > " < / span > < / div > < div class = "line" > < a name = "l00015" > < / a > < span class = "lineno" > 15< / span >   < / div > < div class = "line" > < a name = "l00016" > < / a > < span class = "lineno" > 16< / span >   < span class = "preprocessor" > #include " < a class = "code" href = "base_2logging_8h.html" > ortools/base/logging.h< / a > " < / span > < / div > < div class = "line" > < a name = "l00017" > < / a > < span class = "lineno" > 17< / span >   < span class = "preprocessor" > #include " absl/container/flat_hash_map.h" < / span > < / div > < div class = "line" > < a name = "l00018" > < / a > < span class = "lineno" > 18< / span >   < span class = "preprocessor" > #include " < a class = "code" href = "indexed__model_8h.html" > ortools/math_opt/core/indexed_model.h< / a > " < / span > < / div > < div class = "line" > < a name = "l00019" > < / a > < span class = "lineno" > 19< / span >   < span class = "preprocessor" > #include " < a class = "code" href = "key__types_8h.html" > ortools/math_opt/cpp/key_types.h< / a > " < / span > < / div > < div class = "line" > < a name = "l00020" > < / a > < span class = "lineno" > 20< / span >   < span class = "preprocessor" > #include " < a class = "code" href = "variable__and__expressions_8h.html" > ortools/math_opt/cpp/variable_and_expressions.h< / a > " < / span > < / div > < div class = "line" > < a name = "l00021" > < / a > < span class = "lineno" > 21< / span >   < / div > < div class = "line" > < a name = "l00022" > < / a > < span class = "lineno" > 22< / span >   < span class = "keyword" > namespace < / span > < a class = "code" href = "namespaceoperations__research.html" > operations_research< / a > {< / div > < div class = "line" > < a name = "l00023" > < / a > < span class = "lineno" > 23< / span >   < span class = "keyword" > namespace < / span > math_opt {< / div > < div class = "line" > < a name = "l00024" > < / a > < span class = "lineno" > 24< / span >   < / div > < div class = "line" > < a name = "l00025" > < / a > < span class = "lineno" > < a class = "line" href = "classop
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_ade205f7a6c4c48bdee219542ad7da50e" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#ade205f7a6c4c48bdee219542ad7da50e" > operations_research::math_opt::Objective::Minimize< / a > < / div > < div class = "ttdeci" > void Minimize(const LinearExpression & objective) const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8cc_source.html#l00029" > objective.cc:29< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_a41e65f404be4194aa05001eeccb35e25" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#a41e65f404be4194aa05001eeccb35e25" > operations_research::math_opt::IndexedModel::set_linear_objective_coefficient< / a > < / div > < div class = "ttdeci" > void set_linear_objective_coefficient(VariableId variable, double value)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00918" > indexed_model.h:918< / a > < / div > < / div >
< div class = "ttc" id = "key__types_8h_html" > < div class = "ttname" > < a href = "key__types_8h.html" > key_types.h< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_ad97af219ab4d62c806c052848a69dab3" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#ad97af219ab4d62c806c052848a69dab3" > operations_research::math_opt::IndexedModel::clear_objective< / a > < / div > < div class = "ttdeci" > void clear_objective()< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00940" > indexed_model.h:940< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_linear_expression_html_ab68933b3045472cd31611b2bdb907da7" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_linear_expression.html#ab68933b3045472cd31611b2bdb907da7" > operations_research::math_opt::LinearExpression::raw_terms< / a > < / div > < div class = "ttdeci" > const absl::flat_hash_map< VariableId, double > & raw_terms() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "variable__and__expressions_8h_source.html#l00967" > variable_and_expressions.h:967< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_acc68eef3a91ae90848899010d323cac1" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#acc68eef3a91ae90848899010d323cac1" > operations_research::math_opt::Objective::Maximize< / a > < / div > < div class = "ttdeci" > void Maximize(const LinearExpression & objective) const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8cc_source.html#l00025" > objective.cc:25< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_a6f3611559b9d19eb580c5768c963bd99" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#a6f3611559b9d19eb580c5768c963bd99" > operations_research::math_opt::IndexedModel::objective_offset< / a > < / div > < div class = "ttdeci" > double objective_offset() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00889" > indexed_model.h:889< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_ae2f68f2b209c8aa964861d8b6b0dca84" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#ae2f68f2b209c8aa964861d8b6b0dca84" > operations_research::math_opt::Objective::SetObjective< / a > < / div > < div class = "ttdeci" > void SetObjective(const LinearExpression & objective, bool is_maximize) const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8cc_source.html#l00033" > objective.cc:33< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_afe1e374f83d18136957c73fcaf399ba7" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#afe1e374f83d18136957c73fcaf399ba7" > operations_research::math_opt::IndexedModel::set_objective_offset< / a > < / div > < div class = "ttdeci" > void set_objective_offset(double value)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00911" > indexed_model.h:911< / a > < / div > < / div >
< div class = "ttc" id = "expr__array_8cc_html_abda708e4a6f0de72a842382f919a7c31" > < div class = "ttname" > < a href = "expr__array_8cc.html#abda708e4a6f0de72a842382f919a7c31" > coef< / a > < / div > < div class = "ttdeci" > int64_t coef< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "expr__array_8cc_source.html#l01875" > expr_array.cc:1875< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_af52714c03a37c64cbb23fd5e75633585" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#af52714c03a37c64cbb23fd5e75633585" > operations_research::math_opt::IndexedModel::linear_objective< / a > < / div > < div class = "ttdeci" > const absl::flat_hash_map< VariableId, double > & linear_objective() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00947" > indexed_model.h:947< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_linear_expression_html_a64203ba9d12b2e9827e18cf8e8c30ab2" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2" > operations_research::math_opt::LinearExpression::model< / a > < / div > < div class = "ttdeci" > IndexedModel * model() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "variable__and__expressions_8h_source.html#l00965" > variable_and_expressions.h:965< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_a23ea373c17369c65a4338ab5fa2102dc" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#a23ea373c17369c65a4338ab5fa2102dc" > operations_research::math_opt::Objective::Add< / a > < / div > < div class = "ttdeci" > void Add(const LinearExpression & objective_terms) const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8cc_source.html#l00048" > objective.cc:48< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_aab068699099bdffd5c834f440cdc7e51" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#aab068699099bdffd5c834f440cdc7e51" > operations_research::math_opt::Objective::is_maximize< / a > < / div > < div class = "ttdeci" > bool is_maximize() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8h_source.html#l00098" > objective.h:98< / a > < / div > < / div >
< div class = "ttc" id = "objective_8h_html" > < div class = "ttname" > < a href = "objective_8h.html" > objective.h< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_objective_html_a9d1cc18f4ffcdf9ad00c1e61af4eebe0" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_objective.html#a9d1cc18f4ffcdf9ad00c1e61af4eebe0" > operations_research::math_opt::Objective::AsLinearExpression< / a > < / div > < div class = "ttdeci" > LinearExpression AsLinearExpression() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "objective_8cc_source.html#l00062" > objective.cc:62< / a > < / div > < / div >
< div class = "ttc" id = "indexed__model_8h_html" > < div class = "ttname" > < a href = "indexed__model_8h.html" > indexed_model.h< / a > < / div > < / div >
< div class = "ttc" id = "variable__and__expressions_8h_html" > < div class = "ttname" > < a href = "variable__and__expressions_8h.html" > variable_and_expressions.h< / a > < / div > < / div >
< div class = "ttc" id = "base_2logging_8h_html_a7c0ce053b28d53aa4eaf3eb7fb71663b" > < div class = "ttname" > < a href = "base_2logging_8h.html#a7c0ce053b28d53aa4eaf3eb7fb71663b" > CHECK_EQ< / a > < / div > < div class = "ttdeci" > #define CHECK_EQ(val1, val2)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "base_2logging_8h_source.html#l00698" > base/logging.h:698< / a > < / div > < / div >
< div class = "ttc" id = "base_2logging_8h_html" > < div class = "ttname" > < a href = "base_2logging_8h.html" > logging.h< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_aafbe56ff1eada47dff1b4626d455498f" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#aafbe56ff1eada47dff1b4626d455498f" > operations_research::math_opt::IndexedModel::set_is_maximize< / a > < / div > < div class = "ttdeci" > void set_is_maximize(bool is_maximize)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00900" > indexed_model.h:900< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_linear_expression_html_a96ffc785b7b2135c7980c985883ffdd3" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_linear_expression.html#a96ffc785b7b2135c7980c985883ffdd3" > operations_research::math_opt::LinearExpression::offset< / a > < / div > < div class = "ttdeci" > double offset() const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "variable__and__expressions_8h_source.html#l00963" > variable_and_expressions.h:963< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_linear_expression_html" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_linear_expression.html" > operations_research::math_opt::LinearExpression< / a > < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "variable__and__expressions_8h_source.html#l00180" > variable_and_expressions.h:180< / a > < / div > < / div >
< div class = "ttc" id = "namespaceoperations__research_html" > < div class = "ttname" > < a href = "namespaceoperations__research.html" > operations_research< / a > < / div > < div class = "ttdoc" > Collection of objects used to extend the Constraint Solver library.< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "dense__doubly__linked__list_8h_source.html#l00021" > dense_doubly_linked_list.h:21< / a > < / div > < / div >
< div class = "ttc" id = "expr__array_8cc_html_a472a99923cbe11ae7b5a5d157d9ad465" > < div class = "ttname" > < a href = "expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465" > var< / a > < / div > < div class = "ttdeci" > IntVar * var< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "expr__array_8cc_source.html#l01874" > expr_array.cc:1874< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_variable_html" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_variable.html" > operations_research::math_opt::Variable< / a > < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "variable__and__expressions_8h_source.html#l00101" > variable_and_expressions.h:101< / a > < / div > < / div >
< div class = "ttc" id = "classoperations__research_1_1math__opt_1_1_indexed_model_html_a2c5977ec712e2c0a2b3eae8f35758eec" > < div class = "ttname" > < a href = "classoperations__research_1_1math__opt_1_1_indexed_model.html#a2c5977ec712e2c0a2b3eae8f35758eec" > operations_research::math_opt::IndexedModel::linear_objective_coefficient< / a > < / div > < div class = "ttdeci" > double linear_objective_coefficient(VariableId variable) const< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "indexed__model_8h_source.html#l00891" > indexed_model.h:891< / a > < / div > < / div >
2021-04-27 23:00:03 +02:00
< / div > <!-- fragment --> < / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- HTML footer for doxygen 1.8.18 -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "dir_a7cc1eeded8f693d0da6c729bc88c45a.html" > ortools< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_1defc00030ff81d309105e053121082f.html" > math_opt< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_dd5645fbbabcdccb47d1d6db92f0f35b.html" > cpp< / a > < / li > < li class = "navelem" > < a class = "el" href = "objective_8cc.html" > objective.cc< / a > < / li >
< li class = "footer" > Generated by
< a href = "http://www.doxygen.org/index.html" >
2021-09-20 15:57:27 +02:00
< img class = "footer" src = "doxygen.png" alt = "doxygen" / > < / a > 1.8.15 < / li >
2021-04-27 23:00:03 +02:00
< / ul >
< / div >
< / body >
< / html >