diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cedac9..c7dad87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -[Unreleased]## [0.5.5.2b7] +[Unreleased]## [0.5.7.1b0] + +## [0.5.7.0]- 2024-11-26 +### Changed +- BACKWARD INCOMPATIBILITY - ScenarioDbManager.__init__: changed default values for db_type=DatabaseType.SQLite. For other uses (DB2 or PostgreSQL, always specify the db_type. +- BACKWARD INCOMPATIBILITY - ScenarioDbManager.__init__: changed default values for enable_scenario_seq=True, future=True. This reflects the current best practices. +- BACKWARD INCOMPATIBILITY - Removed ScenarioDbManager from `dse_do_utils.__init__.py`. This avoids the dependency on sqlalchemy with use of dse_do_utils where the ScenarioDbManager is not used. +Introduces a slight backward incompatibility. Need to import as: `from dse_do_utils.scenariodbmanager import ScenarioDbManager` +- Removed (deprecated) `module_reload()` from `dse_do_utils.__init__.py`. In notebooks `autoreload` works well, +- Generics in ScenarioRunner +- Removed deprecated optional argument `dtypes` from `Core01DataManager.prepare_output_data_frames()` +- Fixed mutable default arguments in scenariodbmanager module +### Added +- CplexDot in core01_optimization_engine: generic function class to use groupby aggregation and the mdl.dot() function. +- PlotlyManager - self.ref_dm, self.ms_inputs, self.ms_outputs property declarations and documentation +- PlotlyManager.plotly_kpi_compare_bar_charts and .get_multi_scenario_table for scenario compare +- Core01DataManager and Core01OptimizationEngine: added support for parameter `mipGap`. Sets the `mdl.parameters.mip.tolerances.mipgap` if value > 0 +- DataManager.extract_solution adds option `allow_mixed_type_columns`. If True allows dvar/expr in column to be a regular Python value and not have the `solution_value` attribute ## [0.5.6.0]- 2023-05-13 ### Changed diff --git a/docs/doc_build/doctrees/dse_do_utils.doctree b/docs/doc_build/doctrees/dse_do_utils.doctree index e59d652..7988bbf 100644 Binary files a/docs/doc_build/doctrees/dse_do_utils.doctree and b/docs/doc_build/doctrees/dse_do_utils.doctree differ diff --git a/docs/doc_build/doctrees/environment.pickle b/docs/doc_build/doctrees/environment.pickle index 273110e..226abaf 100644 Binary files a/docs/doc_build/doctrees/environment.pickle and b/docs/doc_build/doctrees/environment.pickle differ diff --git a/docs/doc_build/html/.buildinfo b/docs/doc_build/html/.buildinfo index 05ce825..90b1aa1 100644 --- a/docs/doc_build/html/.buildinfo +++ b/docs/doc_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a9df07955c95961d749fd73c1e7644d5 +config: ef4c938c6f3ee2a22e6bb6b81cef0c3d tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/doc_build/html/_modules/dse_do_utils.html b/docs/doc_build/html/_modules/dse_do_utils.html deleted file mode 100644 index 856634c..0000000 --- a/docs/doc_build/html/_modules/dse_do_utils.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - dse_do_utils — DSE DO Utils 0.5.6.0 documentation - - - - - - - - - - - - - - - - - -
-
-
-
- -

Source code for dse_do_utils

-# Copyright IBM All Rights Reserved.
-# SPDX-License-Identifier: Apache-2.0
-
-from .version import __version__
-from .datamanager import DataManager
-from .optimizationengine import OptimizationEngine
-from .scenariomanager import ScenarioManager
-from .scenariodbmanager import ScenarioDbManager
-# from .scenariopicker import ScenarioPicker
-# from .deployeddomodel import DeployedDOModel
-# from .mapmanager import MapManager
-
-name = "dse_do_utils"
-
-
-
[docs]def module_reload(): - """DEPRECATED. Requires updates to Python 3.6 - Reloads all component modules. Use when you want to force a reload of this module with imp.reload(). - - This avoids having to code somewhat complex reloading logic in the notebook that is using this module. - - Challenge with imp.reload of dse-do_utils. The following is NOT (!) sufficient:: - - import imp - import dse_do_utils - imp.reload(dse_do_utils) - - The package dse_do_utils internally contains a number of sub modules that each contain a part of the code. - This keeps development easier and more organized. But to make importing easier, the classes are exposed - in the top level `init.py`, which allows for a simple import statement like from dse_do_utils import ScenarioManager. - Unfortunately, reloading the top-level module dse_do_utils doesn't force a reload of the internal modules. - - In case of subclassing, reloading needs to be done in the right order, i.e. first the parent classes. - - Usage:: - - import imp - import dse_do_utils # You have to do the import, otherwise not possible to do the next 2 steps - dse_do_utils.module_reload() #This function - imp.reload(dse_do_utils) # Necessary to ensure all following expressions `from dse_do_utils import class` are using the updated classes - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager # This needs to be done AFTER the reload to refresh the definitions - - - Note that this function assumes that the set of classes and component modules is not part of the update. - If it is, you may need to add another reload:: - - import imp - import dse_do_utils # You have to do the import, otherwise not possible to do the next 2 steps - imp.reload(dse_do_utils) # To reload this function - dse_do_utils.module_reload() #This function - imp.reload(dse_do_utils) # Necessary to ensure all future expressions `from dse_do_utils import class` are using the updated classes - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager # This needs to be done AFTER the reload to refresh the definitions - - - If not using this function, in the notebook you would need to do the following (or the relevant parts of it):: - - import imp - import dse_do_utils - imp.reload(dse_do_utils.datamanager) - imp.reload(dse_do_utils.optimizationengine) - imp.reload(dse_do_utils.scenariomanager) - imp.reload(dse_do_utils.scenariopicker) - imp.reload(dse_do_utils.deployeddomodel) - imp.reload(dse_do_utils.mapmanager) - imp.reload(dse_do_utils) - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager - - Returns: - - """ - import importlib - import datamanager - import optimizationengine - import scenariomanager - import scenariopicker - import deployeddomodel - import mapmanager - import multiscenariomanager - importlib.reload(datamanager) - importlib.reload(optimizationengine) - importlib.reload(scenariomanager) - importlib.reload(scenariopicker) - importlib.reload(deployeddomodel) - importlib.reload(mapmanager) - importlib.reload(multiscenariomanager)
- - # The imports below cannot be done here. - # You need to redo the class imports from the notebook that is calling this function - - # from .version import __version__ - # from .datamanager import DataManager - # from .optimizationengine import OptimizationEngine - # from .scenariomanager import ScenarioManager - # from .scenariopicker import ScenarioPicker - # from .deployeddomodel import DeployedDOModel - # from .mapmanager import MapManager -
- -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html b/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html index 2a5c215..438f96b 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html +++ b/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html @@ -6,7 +6,7 @@ - dse_do_utils.cpd25utilities — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.cpd25utilities — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

Navigation

  • modules |
  • - - - + + @@ -213,9 +212,8 @@

    Navigation

  • modules |
  • - + - diff --git a/docs/doc_build/html/_modules/dse_do_utils/datamanager.html b/docs/doc_build/html/_modules/dse_do_utils/datamanager.html index 4352009..ed6d990 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/datamanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/datamanager.html @@ -6,7 +6,7 @@ - dse_do_utils.datamanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.datamanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + + @@ -70,7 +69,7 @@

    Source code for dse_do_utils.datamanager

     
         It typically contains the input and output dictionaries with DataFrames that came from
         or will be inserted into a DO scenario.
    -    In addition it will hold any intermediate data.
    +    In addition, it will hold any intermediate data.
         It holds methods that operate on and convert the data.
         When used in combination with an optimization engine, it should not contain the
         docplex code that creates or interacts with the docplex Model. (That is the task of the OptimizationEngine.)
    @@ -86,7 +85,10 @@ 

    Source code for dse_do_utils.datamanager

         def __init__(self, inputs: Optional[Inputs] = None, outputs: Optional[Outputs] = None):
             self.inputs = inputs
             self.outputs = outputs
    -        return
    +
    +        # Parameters:
    +        self.params: Optional[pd.DataFrame] = None
    +        self.param = types.SimpleNamespace()
     
     
    [docs] def prepare_data_frames(self): if (self.inputs is not None) and (len(self.inputs) > 0): @@ -405,7 +407,8 @@

    Source code for dse_do_utils.datamanager

     
    [docs] @staticmethod def extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | Dict[str, str]] = None, drop_column_names: List[str] = None, drop: bool = True, epsilon: float = None, round_decimals: int = None, - solution_column_name_post_fix: str = 'Sol') -> pd.DataFrame: + solution_column_name_post_fix: str = 'Sol', + allow_mixed_type_columns: bool = False) -> pd.DataFrame: """Generalized routine to extract a solution value. Can remove the dvar column from the df to be able to have a clean df for export into scenario. @@ -427,7 +430,7 @@

    Source code for dse_do_utils.datamanager

                 round_decimals (int): round the solution value by number of decimals. If None, no rounding.
                 If 0, rounding to integer value.
                 solution_column_name_post_fix (str): Postfix for the name of the solution column. Default = 'Sol'
    -
    +            allow_mixed_type_columns (bool): If True, will allow the column not to have the `solution_value` attribute, i.e. be a plain Python value, not a CPLEX dvar or expression
             """
     
     
    @@ -442,7 +445,12 @@ 

    Source code for dse_do_utils.datamanager

                 for xDVarName, solution_column_name in dvar_column_dict.items():
                     if xDVarName in df.columns:
                         # solution_column_name = f'{xDVarName}Sol'
    -                    df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]]
    +                    # df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]]
    +                    if allow_mixed_type_columns:
    +                        df[solution_column_name] = [dvar.solution_value if hasattr(dvar, 'solution_value') else dvar for
    +                                                dvar in df[xDVarName]]  # VT_20241029: allow expression to be a constant
    +                    else:
    +                        df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]]
                         if drop:
                             df = df.drop([xDVarName], axis=1)
                         if epsilon is not None:
    @@ -539,9 +547,8 @@ 

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html index 3e1d23a..e2aad61 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html +++ b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html @@ -6,7 +6,7 @@ - dse_do_utils.deployeddomodel — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.deployeddomodel — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -289,7 +288,7 @@

    Source code for dse_do_utils.deployeddomodel

    #         self.outputs = self.get_outputs(job_details)
         #         self.solve_details = self.get_solve_details(job_details)
     
    -
    [docs] def solve_v2(self, inputs: Inputs, max_oaas_time_limit_sec: int = None, max_run_time_sec: int = None): +
    [docs] def solve_v2(self, inputs: Inputs, max_oaas_time_limit_sec: int = None, max_run_time_sec: int = None) -> dict: """Master routine. Initializes the job, starts the execution, monitors the results, post-processes the solution and cleans-up after. Args: @@ -498,9 +497,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html b/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html index a94713b..14be243 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html +++ b/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html @@ -6,7 +6,7 @@ - dse_do_utils.domodeldeployer — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.domodeldeployer — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -798,9 +797,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html b/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html index 777f775..c836f0e 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html +++ b/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html @@ -6,7 +6,7 @@ - dse_do_utils.domodelexporter — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.domodelexporter — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -344,9 +343,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html b/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html index d8264d3..7f42d6d 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html @@ -6,7 +6,7 @@ - dse_do_utils.mapmanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.mapmanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -405,9 +404,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html b/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html index bfb28f6..270a995 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html @@ -6,7 +6,7 @@ - dse_do_utils.multiscenariomanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.multiscenariomanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -334,9 +333,8 @@

    Navigation

  • modules |
  • - + - diff --git a/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html b/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html index 1b51d8d..72bec50 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html +++ b/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html @@ -6,7 +6,7 @@ - dse_do_utils.optimizationengine — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.optimizationengine — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + + @@ -171,7 +170,7 @@

    Source code for dse_do_utils.optimizationengine

    < """Returns pd.Series[SemiIntegerVarType].""" return pd.Series(mdl.semiinteger_var_list(df.index, lb, **kargs), index=df.index, dtype='object')
    -
    [docs] def solve(self, refine_conflict: bool = False, **kwargs) -> docplex.mp.solution.SolveSolution: +
    [docs] def solve(self, refine_conflict: Optional[bool] = False, **kwargs) -> docplex.mp.solution.SolveSolution: # TODO: enable export_as_lp_path()? # self.export_as_lp_path(lp_file_name=self.mdl.name) # TODO: use self.solve_kwargs if **kwargs is empty/None. Or merge them? @@ -384,9 +383,43 @@

    Source code for dse_do_utils.optimizationengine

    < integer_series = pd.Series(integer_list, index=df.index) return integer_series
    +
    [docs] @staticmethod + def cp_integer_var_series_s_v2(mdl: cp.CpoModel, df: pd.DataFrame, min=None, max=None, name=None, + domain=None) -> pd.Series: + """Returns pd.Series[docplex.cp.expression.CpoIntVar]. + If name is not None, will generate unique names based on pattern: '{name}_{index of df}' + If multi-index df, keys are separated by '_', e.g. 'xDvar_1_2_3' + """ + + if name is None: + integer_list = mdl.integer_var_list(df.shape[0], min, max, name, domain) + else: + integer_list = [] + for ix in df.index: + new_name = f"{name}_{OptimizationEngine._get_index_as_str(ix)}" + integer_list.append(mdl.integer_var(min, max, new_name, domain)) + integer_series = pd.Series(integer_list, index=df.index) + return integer_series
    + + @staticmethod + def _get_index_as_str(ix) -> str: + """Convert an index of a DF to a string. For naming dvars and constraints. + If df has a multi-index, the ix is a tuple.""" + if type(ix) is tuple: # If muli-index + name = '_'.join(map(str, ix)) + else: + name = str(ix) + # elif isinstance(ix, str): + # new_name = f"{name}_{ix}" + # elif isinstance(ix, int): + # new_name = f"{name}_{ix}" + # else: + # new_name = f"{name}_{str(ix)}" + return name +
    [docs] def cp_integer_var_series(self, df, **kwargs) -> pd.Series: """Returns pd.Series[docplex.cp.expression.CpoIntVar]""" - return OptimizationEngine.cp_integer_var_series_s(self.mdl, df=df, **kwargs)
    + return OptimizationEngine.cp_integer_var_series_s_v2(self.mdl, df=df, **kwargs)
    [docs] @staticmethod def cp_binary_var_series_s(mdl: cp.CpoModel, df: pd.DataFrame, **kwargs) -> pd.Series: @@ -459,9 +492,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html b/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html index 237bf80..5d5b54f 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html @@ -6,7 +6,7 @@ - dse_do_utils.plotlymanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.plotlymanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -48,10 +47,13 @@

    Navigation

    Source code for dse_do_utils.plotlymanager

     # Copyright IBM All Rights Reserved.
     # SPDX-License-Identifier: Apache-2.0
    -from typing import Generic, TypeVar
    +from typing import Generic, TypeVar, Optional, Dict
     
    +import pandas as pd
    +import plotly.express as px
    +import plotly.graph_objs as go
     # from typing import List, Dict, Tuple, Optional
    -from dse_do_utils.datamanager import DataManager
    +from dse_do_utils.datamanager import DataManager, Inputs
     
     # import plotly
     # import plotly.graph_objs as go
    @@ -77,6 +79,15 @@ 

    Source code for dse_do_utils.plotlymanager

         def __init__(self, dm: DM):
             self.dm: DM = dm
     
    +        # Used by DoDashApp for scenario compare, when the Reference Scenario is selected
    +        # This supports scenario compare visualizations
    +        self.ref_dm: Optional[DM] = None  # A DataManager based on the reference scenario
    +        # Used by the DoDashApp for scenario compare, when multiple scenarios are selected for compare
    +        # These DataFrames are 'multi-scenario': they have an additional colum with the scenarioName.
    +        # One 'multi-scenario' df contains data for the same scenario table from multiple scenarios
    +        self.ms_inputs: Dict[str, pd.DataFrame] = None  # Dict[TableName, 'multi-scenario' dataframe]
    +        self.ms_outputs: Dict[str, pd.DataFrame] = None  # Dict[TableName, 'multi-scenario' dataframe]
    +
     
    [docs] def get_plotly_fig_m(self, id): """DEPRECATED. Not used in dse_do_dashboard package. On the instance `self`, call the method named by id['index'] @@ -90,7 +101,96 @@

    Source code for dse_do_utils.plotlymanager

             On the instance `self`, call the method named by get_tab_layout_{page_id}.
             Used in dse_do_dashboard Plotly-Dash dashboards
             """
    -        return getattr(self, f"get_tab_layout_{page_id}")()
    + return getattr(self, f"get_tab_layout_{page_id}")()
    + + ################################################################### + # For scenario-compare in dse-do-dashboard + ################################################################### +
    [docs] def plotly_kpi_compare_bar_charts(self, figs_per_row: int = 3, orientation: str = 'v') -> [[go.Figure]]: + """ + Generalized compare of KPIs between scenarios. Creates a list-of-list of go.Figure, i.e. rows of figures, + for the PlotlyRowsVisualizationPage. + Each KPI gets its own bar-chart, comparing the scenarios. + + Supports 3 cases: + 1. Multi-scenario compare based on the Reference Scenarios multi-checkbox select on the Home page. + 2. Compare the current select scenario with the Reference Scenario selected on the Home page. + 3. Single scenario view based on the currently selected scenario + + Args: + figs_per_row: int - Maximum number of figures per row + orientation: str - `h' (horizontal) or `v` (vertical) + + Returns: + figures in rows ([[go.Figure]]) - bar-charts in rows + + """ + figs = [] + if self.get_multi_scenario_compare_selected(): + df = self.get_multi_scenario_table('kpis') + elif self.get_reference_scenario_compare_selected(): + ref_df = self.ref_dm.kpis.reset_index() + ref_df['scenario_name'] = 'Reference' + selected_df = self.dm.kpis.reset_index() + selected_df['scenario_name'] = 'Current' + df = pd.concat([selected_df, ref_df]) + else: + df = self.dm.kpis.reset_index() + df['scenario_name'] = 'Current' + + for kpi_name, group in df.groupby('NAME'): + labels = {'scenario_name': 'Scenario', 'VALUE': kpi_name} + title = f'{kpi_name}' + if orientation == 'v': + fig = px.bar(group, x='scenario_name', y='VALUE', orientation='v', color='scenario_name', labels=labels, + title=title) + else: + fig = px.bar(group, y='scenario_name', x='VALUE', orientation='h', color='scenario_name', + labels=labels) + fig.update_layout(xaxis_title=None) + fig.update_layout(yaxis_title=None) + fig.update_layout(showlegend=False) + figs.append(fig) + + # Split list of figures in list-of-lists with maximum size of n: + n = figs_per_row + figs = [figs[i:i + n] for i in range(0, len(figs), n)] + return figs
    + +
    [docs] def get_multi_scenario_compare_selected(self) -> bool: + """Returns True if the user has selected multi-scenario compare. + """ + ms_enabled = (isinstance(self.ms_outputs, dict) + and isinstance(self.ms_inputs, dict) + and 'Scenario' in self.ms_inputs.keys() + and self.ms_inputs['Scenario'].shape[0] > 0 + ) + return ms_enabled
    + +
    [docs] def get_reference_scenario_compare_selected(self) -> bool: + """Returns True if the user has selected (single) reference-scenario compare + """ + ms_selected = self.get_multi_scenario_compare_selected() + ref_selected = isinstance(self.ref_dm, DataManager) + return not ms_selected and ref_selected
    + +
    [docs] def get_multi_scenario_table(self, table_name: str) -> Optional[pd.DataFrame]: + """Gets the df from the table named `table_name` in either inputs or outputs. + If necessary (i.e. when using scenario_seq), merges the Scenario table, so it has the scenario_name as column. + DataFrame is NOT indexed! + """ + if table_name in self.ms_inputs.keys(): + df = self.ms_inputs[table_name] + elif table_name in self.ms_outputs.keys(): + df = self.ms_outputs[table_name] + else: + df = None + + if df is not None: + if "scenario_name" not in df.columns: + df = df.merge(self.ms_inputs['Scenario'], on='scenario_seq') # Requires scenario_seq. Merges-in the scenario_name. + + return df
    @@ -122,9 +222,8 @@

    Navigation

  • modules |
  • - + - diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html b/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html index a125c28..d5f6292 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariodbmanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.scenariodbmanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + + @@ -78,6 +77,7 @@

    Source code for dse_do_utils.scenariodbmanager

    import re from sqlalchemy import exc, MetaData from sqlalchemy import Table, Column, String, Integer, Float, ForeignKey, ForeignKeyConstraint +import enum # Typing aliases from dse_do_utils import ScenarioManager @@ -85,7 +85,6 @@

    Source code for dse_do_utils.scenariodbmanager

    Inputs = Dict[str, pd.DataFrame] Outputs = Dict[str, pd.DataFrame] -import enum

    [docs]class DatabaseType(enum.Enum): """Used in ScenarioDbManager.__init__ to specify the type of DB it is connecting to.""" @@ -100,8 +99,8 @@

    Source code for dse_do_utils.scenariodbmanager

    """ def __init__(self, db_table_name: str, - columns_metadata: List[sqlalchemy.Column] = [], - constraints_metadata: List[ForeignKeyConstraint] = []): + columns_metadata=None, + constraints_metadata=None): """ Warning: Do not use mixed case names for the db_table_name. Supplying a mixed-case is not working well and is causing DB FK errors. @@ -114,9 +113,13 @@

    Source code for dse_do_utils.scenariodbmanager

    :param columns_metadata: :param constraints_metadata: """ + if constraints_metadata is None: + constraints_metadata = [] + if columns_metadata is None: + columns_metadata = [] self.db_table_name = db_table_name # ScenarioDbTable.camel_case_to_snake_case(db_table_name) # To make sure it is a proper DB table name. Also allows us to use the scenario table name. - self.columns_metadata = self.resolve_metadata_column_conflicts(columns_metadata) + self.columns_metadata: List[sqlalchemy.Column] = self.resolve_metadata_column_conflicts(columns_metadata) self.constraints_metadata = constraints_metadata self.dtype = None if not db_table_name.islower() and not db_table_name.isupper(): ## I.e. is mixed_case @@ -536,10 +539,10 @@

    Source code for dse_do_utils.scenariodbmanager

    def __init__(self, input_db_tables: Dict[str, ScenarioDbTable], output_db_tables: Dict[str, ScenarioDbTable], credentials=None, schema: str = None, echo: bool = False, multi_scenario: bool = True, enable_transactions: bool = True, enable_sqlite_fk: bool = True, enable_astype: bool = True, - enable_debug_print: bool = False, enable_scenario_seq: bool = False, - db_type: DatabaseType = DatabaseType.DB2, + enable_debug_print: bool = False, enable_scenario_seq: bool = True, + db_type: DatabaseType = DatabaseType.SQLite, use_custom_naming_convention: bool = False, - future: bool = False, + future: bool = True, ): """Create a ScenarioDbManager. @@ -2049,8 +2052,180 @@

    Source code for dse_do_utils.scenariodbmanager

    if 'scenario_seq' in df.columns: df = df.drop(columns=['scenario_seq']) new_outputs[scenario_table_name] = df - return new_inputs, new_outputs

    + return new_inputs, new_outputs
    + + ##################################################################################################### + # Insert, Update, Delete row + ##################################################################################################### +
    [docs] def insert_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._insert_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._insert_table_row(scenario_table_name, scenario_name, values, self.engine)
    + + def _insert_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """DRAFT. Insert one row of data. + TODO: handle update if it already exists: 'upsert' + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). + connection + """ + # raise NotImplementedError + + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot insert data into DB.") + + # TODO: add scenario_seq to values + # TODO: if values is a sequence, we need to convert to a Dict so that we can add a value? + scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + if scenario_seq is not None: + values['scenario_seq'] = scenario_seq + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot insert row.") + stmt = ( + sqlalchemy.insert(db_table.get_sa_table()).values(values) + ) + try: + if connection is None: + self.engine.execute(stmt) + else: + connection.execute(stmt) + + except exc.IntegrityError as e: + print("++++++++++++Integrity Error+++++++++++++") + print(e) + except exc.StatementError as e: + print("++++++++++++Statement Error+++++++++++++") + print(e) + +
    [docs] def update_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._update_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._update_table_row(scenario_table_name, scenario_name, values, self.engine)
    + + def _update_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """DRAFT. Update one row of data. + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). + connection + """ + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot insert data into DB.") + + scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + if scenario_seq is not None: + values['scenario_seq'] = scenario_seq + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot insert row.") + + # Split values in 2 parts: + # 1. The primary keys + # 2. The other columns + primary_keys = [c.name for c in db_table.columns_metadata if c.primary_key and c.name != 'scenario_seq'and c.name != 'scenario_name' ] + pk_values = {k: v for k,v in values.items() if k in primary_keys} + pk_conditions = [(db_table.get_sa_column(k) == v) for k, v in pk_values.items()] # TODO: + column_values = {k: v for k,v in values.items() if k not in primary_keys and k not in['scenario_seq', 'scenario_name']} # remove PK values + t: sqlalchemy.Table = db_table.get_sa_table() + + if self.enable_scenario_seq: + if (scenario_seq := self._get_scenario_seq(scenario_name, connection)) is not None: + # print(f"ScenarioSeq = {scenario_seq}") + sql = t.update().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)).values(column_values) + # connection.execute(sql) # VT20230204: Duplicate execute? Will be done anyway at the end of this method! + else: + raise ValueError(f"No scenario with name {scenario_name} exists") + else: + sql = t.update().where(sqlalchemy.and_((t.c.scenario_name == scenario_name), *pk_conditions)).values(column_values) + + # TODO: this does NOT fail if the row doesn't exist. It simply doesn;t do anything !? How can we have this fail, so we can do an insert? + connection.execute(sql) + + +
    [docs] def upsert_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._upsert_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._upsert_table_row(scenario_table_name, scenario_name, values, self.engine)
    + + def _upsert_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """Updates or inserts a row in a DB table. + Assumes the values contain all primary key values. + Other columns are optional. + If row exists, will update the row. If row doesn't exist, will do an insert. + Update also supports partial updates of non-pk fields. + Beware that a None will result in a NULL. + + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + scenario_name (str): scenario_name + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). Must include values for all PK columns. + connection + + Raises errors for: + Unknown scenario_name + Primary Key value not in values + """ + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot upsert data into DB.") + + # scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + # if scenario_seq is not None: + # values['scenario_seq'] = scenario_seq + # else: + # raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot upsert row.") + + # Split values in 2 parts: + # 1. The primary keys + # 2. The other columns + primary_keys = [c.name for c in db_table.columns_metadata if c.primary_key and c.name != 'scenario_seq'and c.name != 'scenario_name' ] + if not all(pk in values.keys() for pk in primary_keys): + raise ValueError(f"Not all required primary keys {primary_keys} specified in upsert request {values}") + # for pk in primary_keys: + # if pk not in values.keys(): + # raise ValueError(f"Primary key {pk} value not specified in upsert request") + pk_values = {k: v for k,v in values.items() if k in primary_keys} + pk_conditions = [(db_table.get_sa_column(k) == v) for k, v in pk_values.items()] + column_values = {k: v for k,v in values.items() if k not in primary_keys and k not in['scenario_seq', 'scenario_name']} # remove PK values + t: sqlalchemy.Table = db_table.get_sa_table() + + if self.enable_scenario_seq: + if (scenario_seq := self._get_scenario_seq(scenario_name, connection)) is not None: + # print(f"ScenarioSeq = {scenario_seq}") + # sql_exists = sqlalchemy.exists().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)) + sql_select = t.select().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)) #.exists() + res = connection.execute(sql_select) + count = res.rowcount + if count > 0: + # Update existing record + sql_update = t.update().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)).values(column_values) + connection.execute(sql_update) + else: + # Insert new record + sql_insert = t.insert().values(values) + connection.execute(sql_insert) + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot upsert row.") + else: + raise NotImplementedError(f"Upsert only supports enable_scenario_seq")
    + # TODO: implement. Easy to do. + # sql = t.update().where(sqlalchemy.and_((t.c.scenario_name == scenario_name), *pk_conditions)).values(column_values) + # connection.execute(sql) ####################################################################################################### # Input Tables ####################################################################################################### @@ -2131,9 +2306,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html b/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html index 1649a48..7360ca0 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariomanager — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.scenariomanager — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -1318,9 +1317,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html b/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html index 5aa48ba..aa8d856 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariopicker — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.scenariopicker — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + + @@ -259,9 +258,8 @@

    Navigation

  • modules |
  • - + - diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariorunner.html b/docs/doc_build/html/_modules/dse_do_utils/scenariorunner.html index 9e0335e..0431ffe 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariorunner.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariorunner.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariorunner — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.scenariorunner — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + + @@ -59,9 +58,9 @@

    Source code for dse_do_utils.scenariorunner

     
     from dse_do_utils import ScenarioManager, OptimizationEngine
     from dse_do_utils.datamanager import Inputs, Outputs, DataManager
    -from dse_do_utils.scenariodbmanager import ScenarioDbManager
    +from dse_do_utils.scenariodbmanager import ScenarioDbManager, DatabaseType
     from logging import Logger, getLogger
    -from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union
    +from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union, TypeVar, Generic
     
     from dse_do_utils.scenariomanager import Platform
     
    @@ -90,7 +89,10 @@ 

    Source code for dse_do_utils.scenariorunner

         template_scenario_name: Optional[str] = None  # 'TemplateScenario'
    -
    [docs]class ScenarioGenerator(): +SC = TypeVar('SC', bound='ScenarioConfig') + + +
    [docs]class ScenarioGenerator(Generic[SC]): """Generates a variation of a scenario, i.e. `inputs` dataset, driven by a ScenarioConfig. To be subclassed. This base class implements overrides of the Parameter table. @@ -108,10 +110,10 @@

    Source code for dse_do_utils.scenariorunner

     
         def __init__(self,
                      inputs: Inputs,
    -                 scenario_config: ScenarioConfig) -> None:
    +                 scenario_config: SC) -> None:
             self._logger: Logger = getLogger(__name__)
             self.inputs: Inputs = inputs.copy()  # Only copy of dict
    -        self.scenario_config: ScenarioConfig = scenario_config
    +        self.scenario_config: SC = scenario_config
     
     
    [docs] def generate_scenario(self): """Generate a variation of the base_inputs. To be overridden. @@ -392,7 +394,7 @@

    Source code for dse_do_utils.scenariorunner

             Set bulk to False to get more granular DB insert errors, i.e. per record.
             TODO: add a data_check() on the DataManager for additional checks."""
             self._logger.info('Checking input data via SQLite and DataManager')
    -        self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class()
    +        self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class(db_type=DatabaseType.SQLite)
             self.sqlite_scenario_db_manager.create_schema()
             self.sqlite_scenario_db_manager.replace_scenario_in_db(scenario_name, deepcopy(inputs), {}, bulk=bulk)
     
    @@ -409,7 +411,7 @@ 

    Source code for dse_do_utils.scenariorunner

             TODO: add a data_check() on the DataManager for additional checks."""
             self._logger.info('Checking output data via SQLite and DataManager')
             if self.sqlite_scenario_db_manager is None:
    -            self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class()
    +            self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class(db_type=DatabaseType.SQLite)
                 self.sqlite_scenario_db_manager.create_schema()
                 self.sqlite_scenario_db_manager.replace_scenario_in_db(scenario_name, deepcopy(inputs), deepcopy(outputs), bulk=bulk)
             else:
    @@ -557,9 +559,8 @@ 

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/dse_do_utils/utilities.html b/docs/doc_build/html/_modules/dse_do_utils/utilities.html index a9c96a2..ed2e3bd 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/utilities.html +++ b/docs/doc_build/html/_modules/dse_do_utils/utilities.html @@ -6,7 +6,7 @@ - dse_do_utils.utilities — DSE DO Utils 0.5.6.0 documentation + dse_do_utils.utilities — DSE DO Utils 0.5.7.0 documentation @@ -33,9 +33,8 @@

    Navigation

  • modules |
  • - - - + +
    @@ -166,10 +165,40 @@

    Source code for dse_do_utils.utilities

     
         Index columns are added at the tail of the tuple, so to be compatible with code that uses the position of the fields in the tuple.
         Inspired by https://stackoverflow.com/questions/46151666/iterate-over-pandas-dataframe-with-multiindex-by-index-names.
    +
    +    Notes:
    +        * Does NOT work when df.Index has no names
    +    TODO: does not work if only Index and no columns
    +    TODO: test the combinations where row or Index are not tuples. Is row always a tuple?
         """
         Row = namedtuple("Row", ['Index', *df.columns, *df.index.names])
         for row in df.itertuples():
    -        yield Row(*(row + row.Index))
    + # Option1 - Fails when Index is not a tuple + # yield Row(*(row + row.Index)) + + # Option 2 - In case the df has no columns? + if isinstance(row.Index, tuple): + yield Row(*(row + row.Index)) + else: + yield Row(*row, row.Index)
    + + # Option 3 - not necessary? + # if isinstance(row, tuple): + # if isinstance(row.Index, tuple): + # yield Row(*(row + row.Index)) + # else: + # yield Row(*row,row.Index) + # else: + # if isinstance(row.Index, tuple): + # yield Row(row, *row.Index) + # else: + # yield Row(row,row.Index) + + + # if isinstance(row, tuple): + # # + # yield Row(*((row) + (row.Index))) + # if isinstance(row, tuple):
    @@ -202,9 +231,8 @@

    Navigation

  • modules |
  • - + -
    diff --git a/docs/doc_build/html/_modules/index.html b/docs/doc_build/html/_modules/index.html index cd556db..16990d2 100644 --- a/docs/doc_build/html/_modules/index.html +++ b/docs/doc_build/html/_modules/index.html @@ -6,7 +6,7 @@ - Overview: module code — DSE DO Utils 0.5.6.0 documentation + Overview: module code — DSE DO Utils 0.5.7.0 documentation @@ -33,7 +33,7 @@

    Navigation

  • modules |
  • - +
    @@ -44,7 +44,6 @@

    Navigation

    @@ -90,7 +89,7 @@

    Navigation

  • modules |
  • - +
    diff --git a/docs/doc_build/html/_static/bizstyle.js b/docs/doc_build/html/_static/bizstyle.js index b084e74..8b9cd77 100644 --- a/docs/doc_build/html/_static/bizstyle.js +++ b/docs/doc_build/html/_static/bizstyle.js @@ -23,7 +23,7 @@ const initialiseBizStyle = () => { } window.addEventListener("resize", - () => (document.querySelector("li.nav-item-0 a").innerText = (window.innerWidth <= 776) ? "Top" : "DSE DO Utils 0.5.6.0 documentation") + () => (document.querySelector("li.nav-item-0 a").innerText = (window.innerWidth <= 776) ? "Top" : "DSE DO Utils 0.5.7.0 documentation") ) if (document.readyState !== "loading") initialiseBizStyle() diff --git a/docs/doc_build/html/_static/documentation_options.js b/docs/doc_build/html/_static/documentation_options.js index ef385b5..45c5bb1 100644 --- a/docs/doc_build/html/_static/documentation_options.js +++ b/docs/doc_build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.5.6.0', + VERSION: '0.5.7.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/doc_build/html/dse_do_utils.html b/docs/doc_build/html/dse_do_utils.html index ba2862b..8a64a2b 100644 --- a/docs/doc_build/html/dse_do_utils.html +++ b/docs/doc_build/html/dse_do_utils.html @@ -7,7 +7,7 @@ - dse_do_utils package — DSE DO Utils 0.5.6.0 documentation + dse_do_utils package — DSE DO Utils 0.5.7.0 documentation @@ -38,7 +38,7 @@

    Navigation

  • previous |
  • - + @@ -194,7 +194,7 @@

    Submodules
    -static extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | Dict[str, str]] = None, drop_column_names: List[str] = None, drop: bool = True, epsilon: float = None, round_decimals: int = None, solution_column_name_post_fix: str = 'Sol') pd.DataFrame[source]¶
    +static extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | Dict[str, str]] = None, drop_column_names: List[str] = None, drop: bool = True, epsilon: float = None, round_decimals: int = None, solution_column_name_post_fix: str = 'Sol', allow_mixed_type_columns: bool = False) pd.DataFrame[source]¶

    Generalized routine to extract a solution value. Can remove the dvar column from the df to be able to have a clean df for export into scenario.

    In some cases, CPLEX extracted values for continuous dvars can have very small values instead of zeros. @@ -333,6 +333,7 @@

    Submodules
    -solve_v2(inputs: Dict[str, DataFrame], max_oaas_time_limit_sec: Optional[int] = None, max_run_time_sec: Optional[int] = None)[source]¶
    +solve_v2(inputs: Dict[str, DataFrame], max_oaas_time_limit_sec: Optional[int] = None, max_run_time_sec: Optional[int] = None) dict[source]¶

    Master routine. Initializes the job, starts the execution, monitors the results, post-processes the solution and cleans-up after.

    Parameters:
    @@ -1537,6 +1538,14 @@

    Submodules**kwargs, see docplex.cp.expression.integer_var_list (http://ibmdecisionoptimization.github.io/docplex-doc/cp/docplex.cp.expression.py.html#docplex.cp.expression.integer_var_list)

    +
    +
    +static cp_integer_var_series_s_v2(mdl: CpoModel, df: DataFrame, min=None, max=None, name=None, domain=None) Series[source]¶
    +

    Returns pd.Series[docplex.cp.expression.CpoIntVar]. +If name is not None, will generate unique names based on pattern: ‘{name}_{index of df}’ +If multi-index df, keys are separated by ‘_’, e.g. ‘xDvar_1_2_3’

    +
    +
    cp_interval_var_series(df, **kargs) Series[source]¶
    @@ -1725,7 +1734,7 @@

    Submodules
    -solve(refine_conflict: bool = False, **kwargs) SolveSolution[source]¶
    +solve(refine_conflict: Optional[bool] = False, **kwargs) SolveSolution[source]¶

    @@ -1750,6 +1759,20 @@

    Submodules +
    +get_multi_scenario_compare_selected() bool[source]¶
    +

    Returns True if the user has selected multi-scenario compare.

    +
    + +
    +
    +get_multi_scenario_table(table_name: str) Optional[DataFrame][source]¶
    +

    Gets the df from the table named table_name in either inputs or outputs. +If necessary (i.e. when using scenario_seq), merges the Scenario table, so it has the scenario_name as column. +DataFrame is NOT indexed!

    +
    +
    get_plotly_fig_m(id)[source]¶
    @@ -1759,6 +1782,39 @@

    Submodules +
    +get_reference_scenario_compare_selected() bool[source]¶
    +

    Returns True if the user has selected (single) reference-scenario compare

    +

    + +
    +
    +plotly_kpi_compare_bar_charts(figs_per_row: int = 3, orientation: str = 'v') [[<class 'plotly.graph_objs._figure.Figure'>]][source]¶
    +

    Generalized compare of KPIs between scenarios. Creates a list-of-list of go.Figure, i.e. rows of figures, +for the PlotlyRowsVisualizationPage. +Each KPI gets its own bar-chart, comparing the scenarios.

    +
    +
    Supports 3 cases:
      +
    1. Multi-scenario compare based on the Reference Scenarios multi-checkbox select on the Home page.

    2. +
    3. Compare the current select scenario with the Reference Scenario selected on the Home page.

    4. +
    5. Single scenario view based on the currently selected scenario

    6. +
    +
    +
    +
    +
    Parameters:
    +
      +
    • figs_per_row – int - Maximum number of figures per row

    • +
    • orientation – str - h’ (horizontal) or `v (vertical)

    • +
    +
    +
    Returns:
    +

    figures in rows ([[go.Figure]]) - bar-charts in rows

    +
    +
    +
    + @@ -1907,7 +1963,7 @@

    Submodules
    -class dse_do_utils.scenariodbmanager.ScenarioDbManager(input_db_tables: Dict[str, ScenarioDbTable], output_db_tables: Dict[str, ScenarioDbTable], credentials=None, schema: Optional[str] = None, echo: bool = False, multi_scenario: bool = True, enable_transactions: bool = True, enable_sqlite_fk: bool = True, enable_astype: bool = True, enable_debug_print: bool = False, enable_scenario_seq: bool = False, db_type: DatabaseType = DatabaseType.DB2, use_custom_naming_convention: bool = False, future: bool = False)[source]¶
    +class dse_do_utils.scenariodbmanager.ScenarioDbManager(input_db_tables: Dict[str, ScenarioDbTable], output_db_tables: Dict[str, ScenarioDbTable], credentials=None, schema: Optional[str] = None, echo: bool = False, multi_scenario: bool = True, enable_transactions: bool = True, enable_sqlite_fk: bool = True, enable_astype: bool = True, enable_debug_print: bool = False, enable_scenario_seq: bool = True, db_type: DatabaseType = DatabaseType.SQLite, use_custom_naming_convention: bool = False, future: bool = True)[source]¶

    Bases: object

    TODO: documentation!

    @@ -2016,6 +2072,11 @@

    Submodules +
    +insert_table_row(scenario_table_name: str, scenario_name: str, values)[source]¶
    +

    +
    insert_tables_in_db(inputs: Dict[str, DataFrame] = {}, outputs: Dict[str, DataFrame] = {}, bulk: bool = True, auto_insert: bool = False, connection=None) int[source]¶
    @@ -2136,11 +2197,21 @@

    Submodules +
    +update_table_row(scenario_table_name: str, scenario_name: str, values)[source]¶
    +

    + +
    +
    +upsert_table_row(scenario_table_name: str, scenario_name: str, values)[source]¶
    +
    +
    -class dse_do_utils.scenariodbmanager.ScenarioDbTable(db_table_name: str, columns_metadata: List[Column] = [], constraints_metadata: List[ForeignKeyConstraint] = [])[source]¶
    +class dse_do_utils.scenariodbmanager.ScenarioDbTable(db_table_name: str, columns_metadata=None, constraints_metadata=None)[source]¶

    Bases: ABC

    Abstract class. Subclass to be able to define table schema definition, i.e. column name, data types, primary and foreign keys. Only columns that are specified and included in the DB insert.

    @@ -3242,8 +3313,8 @@

    Submodules
    -class dse_do_utils.scenariorunner.ScenarioGenerator(inputs: Dict[str, DataFrame], scenario_config: ScenarioConfig)[source]¶
    -

    Bases: object

    +class dse_do_utils.scenariorunner.ScenarioGenerator(inputs: Dict[str, DataFrame], scenario_config: SC)[source]¶ +

    Bases: Generic[SC]

    Generates a variation of a scenario, i.e. inputs dataset, driven by a ScenarioConfig. To be subclassed. This base class implements overrides of the Parameter table. @@ -3421,6 +3492,12 @@

    Submoduleshttps://stackoverflow.com/questions/46151666/iterate-over-pandas-dataframe-with-multiindex-by-index-names.

    +

    Notes

    +
      +
    • Does NOT work when df.Index has no names

    • +
    +

    TODO: does not work if only Index and no columns +TODO: test the combinations where row or Index are not tuples. Is row always a tuple?

    @@ -3454,57 +3531,6 @@

    Submodules

    Module contents¶

    -
    -
    -dse_do_utils.module_reload()[source]¶
    -

    DEPRECATED. Requires updates to Python 3.6 -Reloads all component modules. Use when you want to force a reload of this module with imp.reload().

    -

    This avoids having to code somewhat complex reloading logic in the notebook that is using this module.

    -

    Challenge with imp.reload of dse-do_utils. The following is NOT (!) sufficient:

    -
    import imp
    -import dse_do_utils
    -imp.reload(dse_do_utils)
    -
    -
    -

    The package dse_do_utils internally contains a number of sub modules that each contain a part of the code. -This keeps development easier and more organized. But to make importing easier, the classes are exposed -in the top level init.py, which allows for a simple import statement like from dse_do_utils import ScenarioManager. -Unfortunately, reloading the top-level module dse_do_utils doesn’t force a reload of the internal modules.

    -

    In case of subclassing, reloading needs to be done in the right order, i.e. first the parent classes.

    -

    Usage:

    -
    import imp
    -import dse_do_utils  # You have to do the import, otherwise not possible to do the next 2 steps
    -dse_do_utils.module_reload()  #This function
    -imp.reload(dse_do_utils)  # Necessary to ensure all following expressions `from dse_do_utils import class` are using the updated classes
    -from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager  # This needs to be done AFTER the reload to refresh the definitions
    -
    -
    -

    Note that this function assumes that the set of classes and component modules is not part of the update. -If it is, you may need to add another reload:

    -
    import imp
    -import dse_do_utils  # You have to do the import, otherwise not possible to do the next 2 steps
    -imp.reload(dse_do_utils)  # To reload this function
    -dse_do_utils.module_reload()  #This function
    -imp.reload(dse_do_utils)  # Necessary to ensure all future expressions `from dse_do_utils import class` are using the updated classes
    -from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager  # This needs to be done AFTER the reload to refresh the definitions
    -
    -
    -

    If not using this function, in the notebook you would need to do the following (or the relevant parts of it):

    -
    import imp
    -import dse_do_utils
    -imp.reload(dse_do_utils.datamanager)
    -imp.reload(dse_do_utils.optimizationengine)
    -imp.reload(dse_do_utils.scenariomanager)
    -imp.reload(dse_do_utils.scenariopicker)
    -imp.reload(dse_do_utils.deployeddomodel)
    -imp.reload(dse_do_utils.mapmanager)
    -imp.reload(dse_do_utils)
    -from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager
    -
    -
    -

    Returns:

    -
    - @@ -3671,6 +3697,7 @@

    Table of Contents

  • OptimizationEngine.cp_binary_var_series_s()
  • OptimizationEngine.cp_integer_var_series()
  • OptimizationEngine.cp_integer_var_series_s()
  • +
  • OptimizationEngine.cp_integer_var_series_s_v2()
  • OptimizationEngine.cp_interval_var_series()
  • OptimizationEngine.cp_interval_var_series_s()
  • OptimizationEngine.create_do_model()
  • @@ -3695,7 +3722,11 @@

    Table of Contents

  • dse_do_utils.plotlymanager module @@ -3741,6 +3772,7 @@

    Table of Contents

  • ScenarioDbManager.get_scenarios_df()
  • ScenarioDbManager.insert_scenarios_from_zip()
  • ScenarioDbManager.insert_scenarios_in_db()
  • +
  • ScenarioDbManager.insert_table_row()
  • ScenarioDbManager.insert_tables_in_db()
  • ScenarioDbManager.read_multi_scenario_tables_from_db()
  • ScenarioDbManager.read_scenario_from_db()
  • @@ -3752,6 +3784,8 @@

    Table of Contents

  • ScenarioDbManager.replace_scenario_tables_in_db()
  • ScenarioDbManager.update_cell_changes_in_db()
  • ScenarioDbManager.update_scenario_output_tables_in_db()
  • +
  • ScenarioDbManager.update_table_row()
  • +
  • ScenarioDbManager.upsert_table_row()
  • ScenarioDbTable
  • dse_do_utils.version module
  • -
  • Module contents -
  • +
  • Module contents
  • @@ -3953,7 +3984,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/genindex.html b/docs/doc_build/html/genindex.html index a972b5e..c68cdb5 100644 --- a/docs/doc_build/html/genindex.html +++ b/docs/doc_build/html/genindex.html @@ -6,7 +6,7 @@ - Index — DSE DO Utils 0.5.6.0 documentation + Index — DSE DO Utils 0.5.7.0 documentation @@ -33,7 +33,7 @@

    Navigation

  • modules |
  • - + @@ -158,6 +158,8 @@

    C

  • cp_integer_var_series() (dse_do_utils.optimizationengine.OptimizationEngine method)
  • cp_integer_var_series_s() (dse_do_utils.optimizationengine.OptimizationEngine static method) +
  • +
  • cp_integer_var_series_s_v2() (dse_do_utils.optimizationengine.OptimizationEngine static method)
  • cp_interval_var_series() (dse_do_utils.optimizationengine.OptimizationEngine method)
  • @@ -545,8 +547,12 @@

    G

  • get_log() (dse_do_utils.deployeddomodel.DeployedDOModel static method)
  • get_model_py() (dse_do_utils.domodeldeployer.DOModelDeployerLocal method) +
  • +
  • get_multi_scenario_compare_selected() (dse_do_utils.plotlymanager.PlotlyManager method)
  • get_multi_scenario_data() (dse_do_utils.multiscenariomanager.MultiScenarioManager method) +
  • +
  • get_multi_scenario_table() (dse_do_utils.plotlymanager.PlotlyManager method)
  • get_outputs() (dse_do_utils.deployeddomodel.DeployedDOModel static method)
  • @@ -563,6 +569,8 @@

    G

  • get_project_id() (dse_do_utils.domodelexporter.DOModelExporter static method)
  • get_raw_table_by_name() (dse_do_utils.datamanager.DataManager method) +
  • +
  • get_reference_scenario_compare_selected() (dse_do_utils.plotlymanager.PlotlyManager method)
  • get_root_directory() (dse_do_utils.multiscenariomanager.MultiScenarioManager method) @@ -664,6 +672,8 @@

    I

  • (dse_do_utils.scenariodbmanager.ScenarioDbTable method)
  • +
  • insert_table_row() (dse_do_utils.scenariodbmanager.ScenarioDbManager method) +
  • insert_tables_in_db() (dse_do_utils.scenariodbmanager.ScenarioDbManager method)
  • integer_var_series() (dse_do_utils.optimizationengine.OptimizationEngine method) @@ -775,8 +785,6 @@

    M

  • diff --git a/docs/doc_build/html/index.html b/docs/doc_build/html/index.html index 2cd42a3..d0065db 100644 --- a/docs/doc_build/html/index.html +++ b/docs/doc_build/html/index.html @@ -7,7 +7,7 @@ - Welcome to DSE DO Utils documentation! — DSE DO Utils 0.5.6.0 documentation + Welcome to DSE DO Utils documentation! — DSE DO Utils 0.5.7.0 documentation @@ -38,7 +38,7 @@

    Navigation

  • next |
  • - + @@ -134,7 +134,7 @@

    Navigation

  • next |
  • - + diff --git a/docs/doc_build/html/modules.html b/docs/doc_build/html/modules.html index 42907ae..70c6914 100644 --- a/docs/doc_build/html/modules.html +++ b/docs/doc_build/html/modules.html @@ -7,7 +7,7 @@ - dse_do_utils — DSE DO Utils 0.5.6.0 documentation + dse_do_utils — DSE DO Utils 0.5.7.0 documentation @@ -42,7 +42,7 @@

    Navigation

  • previous |
  • - + @@ -209,6 +209,7 @@

    dse_do_utilsOptimizationEngine.cp_binary_var_series_s()
  • OptimizationEngine.cp_integer_var_series()
  • OptimizationEngine.cp_integer_var_series_s()
  • +
  • OptimizationEngine.cp_integer_var_series_s_v2()
  • OptimizationEngine.cp_interval_var_series()
  • OptimizationEngine.cp_interval_var_series_s()
  • OptimizationEngine.create_do_model()
  • @@ -233,7 +234,11 @@

    dse_do_utilsdse_do_utils.plotlymanager module @@ -279,6 +284,7 @@

    dse_do_utilsScenarioDbManager.get_scenarios_df()
  • ScenarioDbManager.insert_scenarios_from_zip()
  • ScenarioDbManager.insert_scenarios_in_db()
  • +
  • ScenarioDbManager.insert_table_row()
  • ScenarioDbManager.insert_tables_in_db()
  • ScenarioDbManager.read_multi_scenario_tables_from_db()
  • ScenarioDbManager.read_scenario_from_db()
  • @@ -290,6 +296,8 @@

    dse_do_utilsScenarioDbManager.replace_scenario_tables_in_db()
  • ScenarioDbManager.update_cell_changes_in_db()
  • ScenarioDbManager.update_scenario_output_tables_in_db()
  • +
  • ScenarioDbManager.update_table_row()
  • +
  • ScenarioDbManager.upsert_table_row()
  • ScenarioDbTable
  • @@ -507,7 +512,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/objects.inv b/docs/doc_build/html/objects.inv index e05ba41..2e2d79a 100644 Binary files a/docs/doc_build/html/objects.inv and b/docs/doc_build/html/objects.inv differ diff --git a/docs/doc_build/html/py-modindex.html b/docs/doc_build/html/py-modindex.html index 99410f8..318a062 100644 --- a/docs/doc_build/html/py-modindex.html +++ b/docs/doc_build/html/py-modindex.html @@ -6,7 +6,7 @@ - Python Module Index — DSE DO Utils 0.5.6.0 documentation + Python Module Index — DSE DO Utils 0.5.7.0 documentation @@ -36,7 +36,7 @@

    Navigation

  • modules |
  • - + @@ -175,7 +175,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/readme_link.html b/docs/doc_build/html/readme_link.html index bc26979..bada7ea 100644 --- a/docs/doc_build/html/readme_link.html +++ b/docs/doc_build/html/readme_link.html @@ -7,7 +7,7 @@ - Read me — DSE DO Utils 0.5.6.0 documentation + Read me — DSE DO Utils 0.5.7.0 documentation @@ -42,7 +42,7 @@

    Navigation

  • previous |
  • - + @@ -235,7 +235,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/search.html b/docs/doc_build/html/search.html index fb83390..49f4cdc 100644 --- a/docs/doc_build/html/search.html +++ b/docs/doc_build/html/search.html @@ -6,7 +6,7 @@ - Search — DSE DO Utils 0.5.6.0 documentation + Search — DSE DO Utils 0.5.7.0 documentation @@ -39,7 +39,7 @@

    Navigation

  • modules |
  • - + @@ -99,7 +99,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/searchindex.js b/docs/doc_build/html/searchindex.js index f4d393d..61f9b70 100644 --- a/docs/doc_build/html/searchindex.js +++ b/docs/doc_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["dse_do_utils", "index", "modules", "readme_link"], "filenames": ["dse_do_utils.rst", "index.rst", "modules.rst", "readme_link.rst"], "titles": ["dse_do_utils package", "Welcome to DSE DO Utils documentation!", "dse_do_utils", "Read me"], "terms": {"add_file_as_data_asset_cpd25": [0, 2], "file_nam": 0, "str": 0, "none": [0, 3], "sourc": [0, 3], "add": [0, 3], "file": [0, 3], "locat": [0, 3], "project_data": [0, 3], "data_asset": [0, 3], "data": [0, 3], "asset": [0, 3], "watson": 0, "studio": 0, "project": [0, 3], "so": 0, "appear": 0, "ui": 0, "can": [0, 3], "export": [0, 3], "paramet": [0, 2], "name": 0, "includ": 0, "extens": 0, "add_file_path_as_data_asset_cpd25": [0, 2], "file_path": 0, "asset_nam": 0, "option": 0, "appli": 0, "cpdv2": 0, "5": [0, 1], "work": [0, 3], "ani": [0, 3], "allow": [0, 3], "view": 0, "download": [0, 3], "from": [0, 3], "need": 0, "call": 0, "after": 0, "ha": 0, "been": 0, "save": 0, "regularli": 0, "system": [0, 3], "typic": [0, 3], "would": 0, "ensur": 0, "i": [0, 3], "visibl": 0, "usag": [0, 3], "write": [0, 3], "some": [0, 3], "an": [0, 3], "exampl": 0, "myfil": 0, "csv": [0, 3], "open": 0, "w": [0, 3], "f": 0, "hello": 0, "world": 0, "bewar": 0, "same": 0, "now": 0, "exist": [0, 3], "2": 0, "differ": [0, 3], "place": [0, 3], "In": 0, "cloud": [0, 3], "object": 0, "storag": 0, "co": 0, "As": 0, "chang": 0, "independ": 0, "caus": 0, "inconsist": 0, "full": 0, "path": 0, "default": [0, 3], "If": 0, "extract": 0, "add_file_path_as_data_asset_wsc": [0, 2], "home": 0, "dsxuser": 0, "o": 0, "environ": [0, 1], "pwd": 0, "project_lib": 0, "requir": [0, 1], "write_data_asset_as_file_cpd25": [0, 2], "assum": 0, "make": 0, "access": [0, 3], "thing": 0, "like": [0, 3], "load": 0, "disk": 0, "pip": [0, 3], "instal": [0, 1], "import": [0, 1], "us": [0, 3], "current": 0, "directori": 0, "write_data_asset_as_file_wsc": [0, 2], "For": [0, 3], "cpd": [0, 3], "leav": 0, "class": [0, 1], "input": 0, "dict": 0, "datafram": 0, "output": 0, "base": 0, "A": [0, 3], "contain": [0, 3], "origin": 0, "scenario": [0, 3], "intermedi": 0, "It": 0, "dictionari": 0, "came": 0, "insert": 0, "do": 0, "addit": 0, "hold": 0, "method": 0, "oper": 0, "convert": 0, "when": [0, 3], "combin": [0, 3], "optim": [0, 3], "engin": [0, 3], "should": 0, "docplex": [0, 3], "code": [0, 3], "creat": [0, 3], "interact": [0, 3], "model": [0, 1], "That": 0, "task": 0, "One": 0, "reason": 0, "separ": 0, "re": 0, "e": [0, 3], "g": [0, 3], "visual": [0, 3], "notebook": [0, 3], "prepar": 0, "select": 0, "renam": 0, "column": 0, "index": [0, 1], "assign": 0, "them": 0, "direct": 0, "attribut": 0, "set": 0, "pre": [0, 3], "process": [0, 3], "also": [0, 3], "member": 0, "properti": 0, "static": 0, "apply_and_concat": [0, 2], "field": 0, "func": 0, "column_nam": [0, 2], "multipl": [0, 3], "one": 0, "lambda": 0, "function": [0, 3], "http": 0, "stackoverflow": 0, "com": 0, "question": 0, "23690284": 0, "panda": 0, "return": 0, "valu": 0, "row": 0, "def": 0, "my_funct": 0, "my_input_valu": 0, "my_output_value_1": 0, "1": [0, 3], "my_output_value_2": 0, "my_output_value1": 0, "df": 0, "my_input_column_nam": 0, "my_output_column_name_1": 0, "my_output_column_name_2": 0, "have": [0, 3], "result": 0, "new": 0, "deprec": 0, "sinc": 0, "0": [0, 3], "done": 0, "plain": 0, "altern": 0, "pd": 0, "seri": 0, "axi": 0, "The": [0, 3], "argument": 0, "tupl": 0, "n": 0, "element": 0, "list": 0, "match": 0, "number": 0, "modifi": 0, "df_crossjoin_ai": [0, 2], "df1": 0, "df2": 0, "kwarg": 0, "cross": 0, "join": 0, "cartesian": 0, "product": 0, "between": [0, 3], "two": 0, "constant": 0, "temporari": 0, "kei": 0, "accept": 0, "ar": [0, 3], "singl": 0, "multi": 0, "un": 0, "indic": 0, "merg": 0, "keyword": 0, "pass": 0, "df_crossjoin_mi": [0, 2], "both": [0, 3], "multiindex": 0, "otherwis": 0, "unnam": 0, "df_crossjoin_si": [0, 2], "see": [0, 3], "github": [0, 3], "pydata": 0, "issu": 0, "5401": 0, "mkonrad": 0, "net": 0, "2016": 0, "04": 0, "16": 0, "html": 0, "extract_solut": [0, 2], "extract_dvar_nam": 0, "drop_column_nam": 0, "drop": [0, 3], "bool": 0, "true": 0, "epsilon": 0, "float": 0, "round_decim": 0, "int": 0, "solution_column_name_post_fix": 0, "sol": 0, "gener": 0, "routin": 0, "solut": 0, "remov": 0, "dvar": [0, 3], "abl": [0, 3], "clean": 0, "case": [0, 3], "cplex": [0, 3], "continu": 0, "veri": 0, "small": 0, "instead": 0, "zero": 0, "thi": [0, 3], "And": 0, "posit": 0, "clip": 0, "neg": 0, "integ": 0, "round": 0, "nearest": 0, "larger": 0, "than": 0, "precis": 0, "where": 0, "all": [0, 3], "below": 0, "threshold": 0, "decim": 0, "postfix": 0, "get_parameter_valu": [0, 2], "param": 0, "param_nam": 0, "param_typ": 0, "default_valu": 0, "value_format": 0, "y": 0, "m": 0, "d": [0, 3], "h": 0, "": 0, "get": 0, "tabl": [0, 3], "note": 0, "mix": 0, "type": 0, "depend": [0, 3], "what": 0, "other": [0, 3], "explicit": 0, "convers": 0, "expect": 0, "valid": 0, "datetim": 0, "format": 0, "get_raw_table_by_nam": [0, 2], "table_nam": [0, 2], "raw": 0, "non": 0, "prep_paramet": [0, 2], "blank": 0, "instanc": 0, "prepare_data_fram": [0, 2], "prepare_input_data_fram": [0, 2], "placehold": 0, "frame": 0, "particular": [0, 3], "sure": 0, "test": 0, "we": 0, "dashenterpris": 0, "app": 0, "whole": 0, "mytabl": 0, "self": 0, "my_tabl": 0, "set_index": 0, "id": 0, "verify_integr": 0, "prepare_output_data_fram": [0, 2], "kpi": 0, "print_hello": [0, 2], "FOR": 0, "print": 0, "string": 0, "messag": 0, "To": [0, 3], "reload": 0, "cell": [0, 3], "dm": 0, "upload": [0, 3], "wsl": 0, "autoreload": 0, "rerun": 0, "second": 0, "onli": [0, 3], "verifi": 0, "updat": 0, "imp": 0, "start": 0, "print_inputs_outputs_summari": [0, 2], "summari": 0, "along": 0, "set_paramet": [0, 2], "easi": [0, 3], "time_limit": 0, "overridden": 0, "super": 0, "simplenamespac": 0, "individu": 0, "easili": 0, "wml_credenti": 0, "space_nam": 0, "deployed_model_nam": 0, "deployment_id": 0, "default_max_oaas_time_limit_sec": 0, "default_max_run_time_sec": 0, "600": 0, "monitor_loop_delay_sec": 0, "cpd3": [0, 3], "ibm_watson_machine_learn": 0, "apicli": 0, "major": 0, "step": 0, "configur": [0, 3], "intern": 0, "former": [0, 3], "watsonmachinelearningapicli": 0, "commun": 0, "deploi": 0, "solv": [0, 2], "job": 0, "monitor": 0, "run": [0, 3], "loop": 0, "state": 0, "onc": 0, "complet": 0, "mdl": 0, "solve_payload": 0, "get_solve_payload": [0, 2], "payload": 0, "job_detail": 0, "job_uid": 0, "execute_model_v1": 0, "monitor_execution_v1": 0, "extract_solution_v1": 0, "simplest": 0, "statu": 0, "solve_statu": 0, "todo": 0, "debug": 0, "mode": 0, "log": 0, "kill": 0, "stop": 0, "poll": 0, "interv": 0, "execute_model_v2": [0, 2], "max_oaas_time_limit_sec": 0, "wml": [0, 1], "time": 0, "limit": 0, "extract_solution_v2": [0, 2], "get_deployment_id": [0, 2], "model_nam": 0, "find": 0, "get_job_statu": [0, 2], "job_statu": 0, "queu": 0, "fail": 0, "cancel": 0, "rtype": 0, "get_job_status_v2": [0, 2], "retriev": 0, "either": 0, "get_log": [0, 2], "txt": 0, "line": 0, "log_lin": 0, "get_output": [0, 2], "get_solve_detail": [0, 2], "get_solve_details_object": [0, 2], "progress_current_object": 0, "progress_best_object": 0, "get_solve_statu": [0, 2], "retreiv": 0, "get_space_id": [0, 2], "space_id": 0, "monitor_execution_v2": [0, 2], "max_run_time_sec": 0, "execut": 0, "period": 0, "api": [0, 3], "store": [0, 3], "execution_status_json": 0, "execution_statu": 0, "out": 0, "delet": 0, "total": 0, "exce": 0, "maximum": 0, "befor": 0, "must": 0, "master": 0, "initi": 0, "post": [0, 3], "up": [0, 3], "overrid": 0, "constructor": 0, "follow": [0, 3], "order": 0, "retrieve_solve_configur": 0, "set_output_settings_in_solve_configur": 0, "retrieve_debug_materi": 0, "cleanup": 0, "solve_v2": [0, 2], "scenario_nam": [0, 2], "package_path": 0, "deployment_nam": 0, "xxx": 0, "deployment_descript": 0, "tmp_dir": 0, "4": [0, 3], "builder": [0, 1], "md": [0, 3], "deployment_uid": 0, "deploy_model": [0, 2], "how": 0, "python": [0, 3], "root": 0, "specifi": 0, "py": 0, "These": 0, "my_modul": 0, "myclass": 0, "similar": 0, "experi": 0, "anywher": 0, "jupyterlab": [0, 3], "conda": [0, 3], "create_arch": [0, 2], "main_file_path": 0, "archiv": 0, "folder": 0, "main": [0, 1], "written": 0, "create_model_arch": [0, 2], "surround": 0, "boilerpl": 0, "3": [0, 3], "create_model_directori": [0, 2], "Will": 0, "clear": 0, "first": 0, "create_package_extens": [0, 2], "yaml_file_path": 0, "create_software_specif": [0, 2], "pkg_ext_id": 0, "package_extens": 0, "create_zip_package_extens": [0, 2], "package_zip_filepath": 0, "githubusercont": 0, "ipynb": 0, "browser": 0, "chrome": 0, "color_mod": 0, "auto": 0, "commit": 0, "37188b1a8b48be2bef34b35b55f01cba0d29ed19": 0, "devic": 0, "unknown": 0, "enc_url": 0, "68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f49424d2f776174736f6e2d6d616368696e652d6c6561726e696e672d73616d706c65732f333731383862316138623438626532626566333462333562353566303163626130643239656431392f637064342e302f6e6f7465626f6f6b732f707974686f6e5f73646b2f6465706c6f796d656e74732f637573746f6d5f6c6962726172792f5573652532307363696b69742d6c6561726e253230616e64253230637573746f6d2532306c696272617279253230746f2532307072656469637425323074656d70657261747572652e6970796e62": 0, "logged_in": 0, "fals": 0, "nwo": 0, "ibm": [0, 3], "2fwatson": 0, "machin": 0, "learn": 0, "sampl": 0, "cpd4": [0, 3], "2fnotebook": 0, "2fpython_sdk": 0, "2fdeploy": 0, "2fcustom_librari": 0, "2fuse": 0, "scikit": 0, "custom": 0, "librari": 0, "predict": 0, "temperatur": 0, "platform": [0, 2], "android": 0, "repository_id": 0, "277618282": 0, "repository_typ": 0, "repositori": [0, 3], "98": 0, "deploy_arch": [0, 2], "model_archive_file_path": 0, "Then": [0, 3], "deploy": [0, 3], "uid": 0, "necessari": 0, "get_scenario": [0, 2], "get_wml_create_deployment_meta_prop": [0, 2], "meta_prop": 0, "creation": 0, "get_wml_create_store_model_meta_prop": [0, 2], "sw_spec_id": 0, "guid_from_space_nam": [0, 2], "space": 0, "handl": 0, "except": 0, "found": 0, "wml_create_deploy": [0, 2], "model_uid": 0, "wml_store_model": [0, 2], "write_main_fil": [0, 2], "templat": 0, "header": 0, "footer": 0, "write_yaml_fil": [0, 2], "yml": 0, "domodeldeployerloc": [0, 2], "experiment": 0, "pleas": 0, "There": 0, "aspect": 0, "hard": 0, "review": 0, "saa": 0, "pip_zip": 0, "zip": [0, 3], "dataplatform": 0, "doc": 0, "wsj": 0, "analyz": 0, "ml": 0, "softwar": 0, "spec": 0, "context": 0, "cpdaa": [0, 2], "get_model_pi": [0, 2], "usual": 0, "node": 0, "too": 0, "slow": 0, "somehow": 0, "extend": 0, "overhead": 0, "itself": 0, "quickli": 0, "still": 0, "give": 0, "thread": 0, "do_model_nam": [0, 2], "longer": [0, 3], "avail": [0, 3], "cpdv3": [0, 3], "cpd2": 0, "curl": 0, "web": 0, "request": 0, "By": 0, "stamp": 0, "wai": 0, "anoth": 0, "cluster": 0, "command": 0, "copi": 0, "past": 0, "termin": 0, "support": 0, "me": [0, 1], "export_do_model": [0, 2], "pattern": 0, "_export_": 0, "yyyymmdd_hhmm": 0, "model1": 0, "model2": 0, "project_id": 0, "user": 0, "collabor": 0, "next": 0, "productionplan": 0, "ef365b2c": 0, "9f28": 0, "447a": 0, "a933": 0, "5de6560a1cfa": 0, "access_tok": 0, "user_nam": 0, "password": 0, "accesstoken": 0, "cpd_cluster_host": 0, "dse": [0, 3], "cp4d25": 0, "cluster4": 0, "cpolab": 0, "access_token": 0, "b7bf7fd8": 0, "aa50": 0, "4bd2": 0, "8364": 0, "02ea6d480895": 0, "cluster_nam": 0, "token": 0, "get_access_token_curl": [0, 2], "get_do_model_export_curl": [0, 2], "xxxxxx": 0, "abov": 0, "git": 0, "bash": 0, "part": 0, "window": 0, "automat": [0, 3], "variabl": 0, "target": [0, 1], "pars": 0, "page": [0, 1], "manual": 0, "show": 0, "firefox": 0, "menu": [0, 3], "develop": [0, 3], "control": 0, "just": 0, "data_id": 0, "21c8ac71": 0, "26c1": 0, "49a5": 0, "a567": 0, "d4c69a0d8158": 0, "mai": 0, "search": [0, 1], "get_project_id": [0, 2], "project_nam": 0, "page_sourc": 0, "full_project_nam": 0, "provid": [0, 3], "entri": 0, "user_access_token": 0, "NOT": [0, 3], "runtime_env_apsx_url": 0, "remot": 0, "url": 0, "alia": 0, "datascienceelit": 0, "within": [0, 3], "br": 0, "end": 0, "get_access_token_web": [0, 2], "respons": 0, "person": 0, "get_do_model_export_web": [0, 2], "write_do_model_to_fil": [0, 2], "data_manag": 0, "zoom_start": 0, "width": 0, "100": 0, "height": 0, "layer_control_posit": 0, "topleft": 0, "build": 0, "folium": [0, 3], "map": [0, 3], "futur": 0, "around": [0, 3], "popup": 0, "469": 0, "speed": 0, "km": 0, "strftime": 0, "spd": 0, "tooltip": 0, "doesn": 0, "t": 0, "yet": 0, "50": 0, "785": 0, "6": [0, 3], "wsl1": 0, "doe": 0, "seem": 0, "add_bar_chart_in_map": [0, 2], "coord": 0, "quantiti": 0, "bar_width": 0, "20": 0, "bar_height_per_unit": 0, "border_color": 0, "background_color": 0, "draw": 0, "bar": 0, "chart": 0, "anchor": 0, "botton": 0, "left": 0, "expand": 0, "right": 0, "mani": [0, 3], "cycl": 0, "through": 0, "defin": 0, "color": 0, "60131314": 0, "star": 0, "marker": 0, "io": 0, "plugin": 0, "beautifyicon": 0, "add_full_screen": [0, 2], "screen": 0, "button": 0, "top": 0, "corner": 0, "unfortun": 0, "jupyt": 0, "ok": 0, "here": 0, "nbviewer": 0, "org": 0, "blob": 0, "add_layer_control": [0, 2], "create_blank_map": [0, 2], "get_arrow": [0, 2], "blue": 0, "size": 0, "n_arrow": 0, "add_to": 0, "arrow": 0, "hypothet": 0, "correctli": 0, "rotat": 0, "plot": 0, "lat": 0, "lon": 0, "repres": 0, "eg": 0, "41": 0, "1132": 0, "96": 0, "1993": 0, "3810": 0, "95": 0, "8021": 0, "polylin": 0, "whatev": 0, "featuregroup": 0, "ad": 0, "medium": 0, "bobhaffn": 0, "25a0fe88e4": 0, "get_bear": [0, 2], "p1": 0, "p2": 0, "compass": 0, "bear": 0, "namedtupl": 0, "gist": 0, "jerom": 0, "2005586": 0, "get_html_tabl": [0, 2], "sequenc": 0, "each": 0, "get_popup_t": [0, 2], "child": 0, "popup_t": 0, "property_1": 0, "value_1": 0, "property_2": 0, "value_2": 0, "icon": 0, "Or": 0, "counti": 0, "add_child": 0, "quot": 0, "text": 0, "problem": 0, "avoid": 0, "replac": 0, "someth": 0, "els": 0, "parse_html": 0, "prevent": 0, "despit": 0, "suggest": 0, "get_tooltip_t": [0, 2], "definit": 0, "conveni": 0, "tooltip_t": 0, "pair": 0, "kansas_city_coord": [0, 2], "39": 0, "085594": 0, "94": 0, "585241": 0, "local_root": 0, "project_access_token": 0, "manag": 0, "excel": [0, 3], "spreadsheet": 0, "look": 0, "relev": 0, "filter": 0, "cogno": 0, "dataset": 0, "_multi_output": 0, "xlsx": 0, "my": 0, "msm": 0, "get_multi_scenario_data": [0, 2], "write_data_to_excel": [0, 2], "add_data_file_to_project": [0, 2], "cp4dv2": 0, "env_is_wscloud": [0, 2], "get_all_scenario_nam": [0, 2], "get_scenarios_df": [0, 2], "get_data_directori": [0, 2], "get_dd_client": [0, 2], "client": [0, 3], "dd_scenario": 0, "get_root_directori": [0, 2], "dsx": 0, "rais": 0, "valueerror": 0, "ones": 0, "more": [0, 3], "later": 0, "load_data_from_scenario": [0, 2], "faster": 0, "merge_scenario_data": [0, 2], "data_by_scenario": 0, "excel_file_nam": 0, "myprogresslisten": [0, 2], "mp": 0, "c": 0, "common": 0, "dse_do_utils_publicgithub": 0, "decis": [0, 3], "utilities_v3": 0, "venv": 0, "lib": 0, "site": 0, "solutionlisten": 0, "notify_progress": [0, 2], "progress_data": 0, "progressdata": 0, "about": 0, "point": 0, "tree": 0, "myoptimizationengin": 0, "solve_kwarg": 0, "export_lp": [0, 2], "export_sav": [0, 2], "export_lp_path": [0, 2], "is_cpo_model": 0, "add_mip_progress_kpi": [0, 2], "mip_gap_kpi_nam": 0, "gap": [0, 3], "solve_time_kpi_nam": 0, "best_bound_kpi_nam": 0, "best": 0, "bound": 0, "solution_count_kpi_nam": 0, "count": 0, "solve_phase_kpi_nam": 0, "phase": 0, "binary_var_seri": [0, 2], "karg": 0, "binaryvartyp": 0, "binary_var_series_": [0, 2], "core": 0, "continuous_var_seri": [0, 2], "continuousvartyp": 0, "continuous_var_series_": [0, 2], "cp_binary_var_seri": [0, 2], "cp": [0, 3], "express": 0, "cpointvar": 0, "cp_binary_var_series_": [0, 2], "cpomodel": 0, "integer_var_list": 0, "ibmdecisionoptim": 0, "binary_var_list": 0, "cp_integer_var_seri": [0, 2], "cp_integer_var_series_": [0, 2], "cp_interval_var_seri": [0, 2], "cpointervalvar": 0, "cp_interval_var_series_": [0, 2], "interval_var_list": 0, "highlight": 0, "create_do_model": [0, 2], "union": 0, "kwag": 0, "export_as_cpo": [0, 2], "copy_to_csv": 0, "cpo": 0, "dsx_project_dir": 0, "local": [0, 2], "filenam": 0, "lp": [0, 3], "establish": 0, "export_as_cpo_": [0, 2], "export_model": 0, "export_as_lp": [0, 2], "export_as_lp_path": [0, 2], "lp_file_nam": 0, "my_lp_fil": 0, "conflict": 0, "which": 0, "signatur": 0, "export_as_lp_": [0, 2], "get_kpi_output_t": [0, 2], "integer_var_seri": [0, 2], "most": 0, "effect": 0, "practic": 0, "xdvar": 0, "integervartyp": 0, "integer_var_series_": [0, 2], "semicontinuous_var_seri": [0, 2], "lb": 0, "semicontinuousvartyp": 0, "semicontinuous_var_series_": [0, 2], "semiinteger_var_seri": [0, 2], "semiintegervartyp": 0, "semiinteger_var_series_": [0, 2], "refine_conflict": 0, "solvesolut": 0, "plotli": 0, "get_dash_tab_layout_m": [0, 2], "page_id": 0, "Not": 0, "dse_do_dashboard": 0, "On": 0, "get_tab_layout_": 0, "dash": 0, "dashboard": 0, "get_plotly_fig_m": [0, 2], "callback": 0, "fig": 0, "autoscenariodbt": [0, 2], "db_table_nam": 0, "scenariodbt": [0, 2], "design": [0, 3], "regular": 0, "At": 0, "create_schema": [0, 2], "insert_table_in_db_bulk": [0, 2], "sqlalchemi": 0, "advantag": 0, "No": 0, "per": 0, "disadvantag": 0, "primari": 0, "foreign": 0, "relat": 0, "thu": 0, "check": 0, "miss": 0, "relationship": 0, "mean": 0, "cannot": 0, "happen": 0, "structur": 0, "create_table_metadata": [0, 2], "metadata": 0, "schema": 0, "multi_scenario": 0, "reflect": 0, "dure": 0, "get_sa_t": [0, 2], "mgr": 0, "connect": [0, 3], "being": 0, "transact": 0, "businesskpit": [0, 2], "business_kpi": 0, "extended_columns_metadata": 0, "databasetyp": [0, 2], "enum": 0, "__init__": 0, "db": 0, "db2": [0, 2], "postgresql": [0, 2], "sqlite": [0, 2], "dbcellupd": [0, 2], "row_index": [0, 2], "current_valu": [0, 2], "previous_valu": [0, 2], "row_idx": [0, 2], "kpitabl": [0, 2], "parametert": [0, 2], "input_db_t": 0, "output_db_t": 0, "credenti": 0, "echo": 0, "enable_transact": 0, "enable_sqlite_fk": 0, "enable_astyp": 0, "enable_debug_print": 0, "enable_scenario_seq": [0, 2], "db_type": 0, "use_custom_naming_convent": 0, "document": [0, 3], "add_scenario_name_to_df": [0, 2], "overwrit": 0, "alreadi": 0, "add_scenario_seq_to_df": [0, 2], "scenario_seq": 0, "scenarioseq": 0, "delete_scenario_from_db": [0, 2], "enabl": 0, "delete_scenario_name_column": [0, 2], "delete_scenario_seq_column": [0, 2], "drop_all_t": [0, 2], "duplicate_scenario_in_db": [0, 2], "source_scenario_nam": 0, "target_scenario_nam": 0, "duplic": 0, "get_custom_naming_convent": [0, 2], "convent": 0, "en": 0, "constraint": 0, "get_scenario_db_t": [0, 2], "get_scenario_sa_t": [0, 2], "cach": 0, "procedur": 0, "dodashapp": 0, "insert_scenarios_from_zip": [0, 2], "filepath": 0, "skip": 0, "insert_scenarios_in_db": [0, 2], "bulk": 0, "back": 0, "evalu": 0, "insert_tables_in_db": [0, 2], "auto_insert": 0, "wa": 0, "attempt": 0, "without": 0, "you": 0, "want": 0, "read_multi_scenario_tables_from_db": [0, 2], "input_table_nam": 0, "output_table_nam": 0, "read": [0, 1], "empti": 0, "read_scenario_from_db": [0, 2], "multi_thread": 0, "lead": 0, "perform": 0, "improv": 0, "fix": 0, "omit": 0, "read_scenario_input_tables_from_db": [0, 2], "alwai": 0, "read_scenario_table_from_db": [0, 2], "scenario_table_nam": 0, "read_scenario_tables_from_db": [0, 2], "rename_scenario_in_db": [0, 2], "replace_scenario_in_db": [0, 2], "ordereddict": 0, "replace_scenario_tables_in_db": [0, 2], "untest": 0, "update_cell_changes_in_db": [0, 2], "db_cell_upd": 0, "update_scenario_output_tables_in_db": [0, 2], "given": 0, "touch": 0, "effici": 0, "columns_metadata": 0, "constraints_metadata": 0, "foreignkeyconstraint": 0, "abc": 0, "abstract": 0, "subclass": [0, 3], "add_scenario_name_to_fk_constraint": [0, 2], "fkc": 0, "add_scenario_seq_to_fk_constraint": [0, 2], "camel_case_to_snake_cas": [0, 2], "dbm": [0, 2], "df_column_names_to_snake_cas": [0, 2], "camelcas": 0, "snake_cas": 0, "extend_columns_constraint": [0, 2], "sql": 0, "columns_ext": 0, "constraints_ext": 0, "scenariodbtablesubclass": 0, "help": 0, "mutabl": 0, "mykei": 0, "primary_kei": 0, "myvalu": 0, "fixnannonenul": [0, 2], "nan": 0, "turn": 0, "null": 0, "vt20230106": 0, "incarn": 0, "potenti": 0, "na": 0, "get_db_table_nam": [0, 2], "get_df_column_nam": [0, 2], "present": 0, "get_df_column_names_2": [0, 2], "vt": 0, "20220829": 0, "db_tabl": 0, "table_metadata": 0, "properli": 0, "simpli": 0, "truncat": 0, "length": 0, "less": 0, "proper": 0, "reduc": 0, "get_sa_column": [0, 2], "db_column_nam": 0, "astyp": 0, "datatyp": 0, "sqlachemi": 0, "resolve_metadata_column_conflict": [0, 2], "sqlcol": [0, 2], "scenarioseqt": [0, 2], "scenariot": [0, 2], "enumer": 0, "cpd25": [0, 2], "cpd40": [0, 2], "template_scenario_nam": [0, 2], "local_relative_data_path": 0, "data_directori": 0, "sheet": 0, "__index__": 0, "keep": 0, "track": 0, "restor": 0, "31": 0, "mymodel": 0, "myexcelfil": 0, "overwritten": 0, "sm": 0, "scenario_1": 0, "load_data_from_excel": [0, 2], "write_data_into_scenario": [0, 2], "dd": [0, 3], "ignor": [0, 3], "excel_test": 0, "excel_output_file_nam": 0, "csv_directori": 0, "load_data_from_csv": [0, 2], "myexcelfileoutput": 0, "add_data_file_to_project_": [0, 2], "never": 0, "cp4daa": [0, 3], "add_data_file_using_project_lib": [0, 2], "wsuser": 0, "add_data_file_using_ws_lib": [0, 2], "ibm_watson_studio_lib": 0, "cp4dv4": 0, "add_data_file_using_ws_lib_": [0, 2], "add_data_into_scenario": [0, 2], "add_data_into_scenario_": [0, 2], "explicitli": 0, "could": 0, "add_file_as_data_asset": [0, 2], "regist": 0, "add_file_as_data_asset_": [0, 2], "2022": 0, "01": 0, "21": 0, "incorrect": 0, "cpsaa": 0, "autodetect": 0, "clear_scenario_data": [0, 2], "categori": 0, "create_new_scenario": [0, 2], "model_build": 0, "new_scenario_nam": 0, "therebi": 0, "decision_optimization_cli": 0, "detect_platform": [0, 2], "env_is_cpd25": [0, 2], "env_is_cpd40": [0, 2], "cpdv4": [0, 1], "access_project_or_spac": 0, "wslib": 0, "howev": [0, 3], "ugli": 0, "error": 0, "warn": 0, "env_is_dsx": [0, 2], "export_model_as_lp": [0, 2], "exclud": 0, "modelbuild": 0, "get_do_scenario": [0, 2], "entiti": 0, "get_kpis_table_as_datafram": [0, 2], "compat": 0, "represent": 0, "do4w": 0, "get_unique_file_nam": [0, 2], "load_data": [0, 2], "load_from_excel": 0, "input_csv_name_pattern": 0, "output_csv_name_pattern": 0, "glob": 0, "rel": 0, "read_csv": 0, "load_data_from_csv_": [0, 2], "csv_name_pattern": 0, "root_dir": 0, "load_data_from_excel_": [0, 2], "xl": 0, "excelfil": 0, "table_index_sheet": 0, "_table_index_": 0, "df_dict": 0, "driven": 0, "off": 0, "certain": 0, "applic": 0, "restrict": 0, "wil": 0, "those": 0, "categor": 0, "accordingli": 0, "thei": 0, "refer": 0, "translat": 0, "abbrevi": 0, "load_data_from_parquet": [0, 2], "input_name_pattern": 0, "parquet": 0, "output_name_pattern": 0, "read_parquet": 0, "load_data_from_parquet_": [0, 2], "file_name_pattern": 0, "load_data_from_scenario_": [0, 2], "load_data_from_zip_csv_": [0, 2], "zip_file_path": 0, "file_size_limit": 0, "byte": 0, "impli": 0, "print_table_nam": [0, 2], "replace_data_in_scenario": [0, 2], "replace_data_into_scenario_": [0, 2], "update_solve_output_into_scenario": [0, 2], "write_data_into_scenario_": [0, 2], "reliabl": 0, "write_data_to_csv": [0, 2], "arg": 0, "write_data_to_csv_": [0, 2], "unique_file_nam": 0, "_": 0, "_output": 0, "throw": 0, "permissionerror": 0, "flag": 0, "uniqu": 0, "write_data_to_excel_": [0, 2], "writer": 0, "excelwrit": 0, "due": 0, "charact": 0, "record": 0, "write_data_to_parquet": [0, 2], "write_data_to_parquet_": [0, 2], "write_data_to_zip_csv_": [0, 2], "to_csv": 0, "widget": [0, 2], "sp": 0, "my_do_model": 0, "get_scenario_picker_ui": [0, 2], "load_selected_scenario_data": [0, 2], "down": [0, 3], "box": 0, "refresh": 0, "maintain": 0, "default_scenario": [0, 2], "therefor": 0, "last": 0, "my_default_scenario": 0, "picker": 0, "forc": 0, "scenariorefreshbutton": [0, 2], "inner": 0, "get_scenario_refresh_button": [0, 2], "get_scenario_select_drop_down": [0, 2], "dropdown": 0, "get_selected_scenario": [0, 2], "ipywidget": 0, "runconfig": [0, 2], "insert_inputs_in_db": [0, 2], "insert_outputs_in_db": [0, 2], "new_schema": [0, 2], "insert_in_do": [0, 2], "write_output_to_excel": [0, 2], "enable_data_check": [0, 2], "enable_data_check_output": [0, 2], "data_check_bulk_insert": [0, 2], "log_level": [0, 2], "enable_refine_conflict": [0, 2], "scenarioconfig": [0, 2], "scenario_x": 0, "scenariogener": [0, 2], "scenario_config": 0, "variat": 0, "implement": 0, "myscenariogener": 0, "generate_scenario": [0, 2], "new_input": 0, "mytable1": 0, "generate_my_table1": 0, "reset_index": 0, "mytable2": 0, "generate_my_table2": 0, "base_input": 0, "generate_my_t": 0, "get_paramet": [0, 2], "scenario_db_manag": 0, "optimization_engine_class": 0, "core01optimizationengin": 0, "data_manager_class": 0, "core01datamanag": 0, "scenario_db_manager_class": 0, "scenario_generator_class": 0, "my_model": 0, "local_platform": 0, "fine": 0, "though": 0, "create_new_db_schema": [0, 2], "data_check_input": [0, 2], "data_check": 0, "deepcopi": 0, "alter": 0, "basic": [0, 3], "resolv": 0, "granular": 0, "data_check_output": [0, 2], "deriv": 0, "baselin": 0, "specif": 0, "run_config": 0, "load_input_data_from_excel": [0, 2], "run_model": [0, 2], "run_multipl": [0, 2], "run_onc": [0, 2], "write_output_data_to_excel": [0, 2], "add_sys_path": [0, 2], "new_path": 0, "sy": 0, "www": 0, "oreilli": 0, "cookbook": 0, "0596001673": 0, "ch04s23": 0, "challeng": 0, "better": 0, "do_util": 0, "convert_s": [0, 2], "size_byt": 0, "describ": 0, "5194057": 0, "df_itertuples_with_index_nam": [0, 2], "itertupl": 0, "much": 0, "easier": 0, "normal": 0, "index_a": 0, "index_b": 0, "know": 0, "from_product": 0, "rang": 0, "my_column": 0, "len": 0, "over": 0, "tail": 0, "inspir": 0, "46151666": 0, "iter": 0, "list_file_hierarchi": [0, 2], "startpath": 0, "hierarch": 0, "current_dir": 0, "getcwd": 0, "parent_dir": 0, "abspath": 0, "pardir": 0, "parent_dir_2": 0, "grand": 0, "parent": 0, "truth": 0, "setup": 0, "conf": 0, "popul": 0, "458550": 0, "standard": 0, "emb": 0, "module_reload": [0, 2], "compon": 0, "somewhat": 0, "complex": 0, "logic": 0, "suffici": 0, "sub": 0, "organ": 0, "But": 0, "expos": 0, "level": 0, "init": 0, "simpl": 0, "statement": 0, "possibl": 0, "dse_do_util": 1, "scope": 1, "modul": [1, 2], "packag": [1, 2, 3], "submodul": 2, "cpd25util": 2, "datamanag": [2, 3], "deployeddomodel": 2, "domodeldeploy": 2, "domodelexport": 2, "mapmanag": [2, 3], "multiscenariomanag": 2, "optimizationengin": [2, 3], "plotly_cpd_workaround": 2, "plotlymanag": 2, "scenariodbmanag": 2, "scenariomanag": [2, 3], "scenariopick": [2, 3], "scenariorunn": 2, "util": [2, 3], "version": [2, 3], "content": 2, "pak": 3, "githubpag": 3, "v0": 3, "neither": 3, "spreadhseet": 3, "mostli": 3, "script": 3, "share": 3, "manipul": 3, "crossjoin": 3, "pick": 3, "v4": 3, "channel": 3, "pypi": 3, "air": 3, "internet": 3, "wheel": 3, "yaml": 3, "userf": 3, "5b4": 3, "py3": 3, "whl": 3, "put": 3, "move": 3, "installationreadm": 3, "detail": 3, "ore": 3, "cp4d": 3, "prem": 3, "might": 3, "intend": 3, "outsid": 3, "interfac": 3}, "objects": {"": [[0, 0, 0, "-", "dse_do_utils"]], "dse_do_utils": [[0, 0, 0, "-", "cpd25utilities"], [0, 0, 0, "-", "datamanager"], [0, 0, 0, "-", "deployeddomodel"], [0, 0, 0, "-", "domodeldeployer"], [0, 0, 0, "-", "domodelexporter"], [0, 0, 0, "-", "mapmanager"], [0, 1, 1, "", "module_reload"], [0, 0, 0, "-", "multiscenariomanager"], [0, 0, 0, "-", "optimizationengine"], [0, 0, 0, "-", "plotly_cpd_workaround"], [0, 0, 0, "-", "plotlymanager"], [0, 0, 0, "-", "scenariodbmanager"], [0, 0, 0, "-", "scenariomanager"], [0, 0, 0, "-", "scenariopicker"], [0, 0, 0, "-", "scenariorunner"], [0, 0, 0, "-", "utilities"], [0, 0, 0, "-", "version"]], "dse_do_utils.cpd25utilities": [[0, 1, 1, "", "add_file_as_data_asset_cpd25"], [0, 1, 1, "", "add_file_path_as_data_asset_cpd25"], [0, 1, 1, "", "add_file_path_as_data_asset_wsc"], [0, 1, 1, "", "write_data_asset_as_file_cpd25"], [0, 1, 1, "", "write_data_asset_as_file_wsc"]], "dse_do_utils.datamanager": [[0, 2, 1, "", "DataManager"]], "dse_do_utils.datamanager.DataManager": [[0, 3, 1, "", "apply_and_concat"], [0, 3, 1, "", "df_crossjoin_ai"], [0, 3, 1, "", "df_crossjoin_mi"], [0, 3, 1, "", "df_crossjoin_si"], [0, 3, 1, "", "extract_solution"], [0, 3, 1, "", "get_parameter_value"], [0, 3, 1, "", "get_raw_table_by_name"], [0, 3, 1, "", "prep_parameters"], [0, 3, 1, "", "prepare_data_frames"], [0, 3, 1, "", "prepare_input_data_frames"], [0, 3, 1, "", "prepare_output_data_frames"], [0, 3, 1, "", "print_hello"], [0, 3, 1, "", "print_inputs_outputs_summary"], [0, 3, 1, "", "set_parameters"]], "dse_do_utils.deployeddomodel": [[0, 2, 1, "", "DeployedDOModel"]], "dse_do_utils.deployeddomodel.DeployedDOModel": [[0, 3, 1, "", "execute_model_v2"], [0, 3, 1, "", "extract_solution_v2"], [0, 3, 1, "", "get_deployment_id"], [0, 3, 1, "", "get_job_status"], [0, 3, 1, "", "get_job_status_v2"], [0, 3, 1, "", "get_log"], [0, 3, 1, "", "get_outputs"], [0, 3, 1, "", "get_solve_details"], [0, 3, 1, "", "get_solve_details_objective"], [0, 3, 1, "", "get_solve_payload"], [0, 3, 1, "", "get_solve_status"], [0, 3, 1, "", "get_space_id"], [0, 3, 1, "", "monitor_execution_v2"], [0, 3, 1, "", "solve"], [0, 3, 1, "", "solve_v2"]], "dse_do_utils.domodeldeployer": [[0, 2, 1, "", "DOModelDeployer"], [0, 2, 1, "", "DOModelDeployerLocal"]], "dse_do_utils.domodeldeployer.DOModelDeployer": [[0, 3, 1, "", "create_archive"], [0, 3, 1, "", "create_model_archive"], [0, 3, 1, "", "create_model_directory"], [0, 3, 1, "", "create_package_extension"], [0, 3, 1, "", "create_software_specification"], [0, 3, 1, "", "create_zip_package_extension"], [0, 3, 1, "", "deploy_archive"], [0, 3, 1, "", "deploy_model"], [0, 3, 1, "", "get_scenario"], [0, 3, 1, "", "get_wml_create_deployment_meta_props"], [0, 3, 1, "", "get_wml_create_store_model_meta_props"], [0, 3, 1, "", "guid_from_space_name"], [0, 3, 1, "", "wml_create_deployment"], [0, 3, 1, "", "wml_store_model"], [0, 3, 1, "", "write_main_file"], [0, 3, 1, "", "write_yaml_file"]], "dse_do_utils.domodeldeployer.DOModelDeployerLocal": [[0, 3, 1, "", "create_archive"], [0, 3, 1, "", "create_model_archive"], [0, 3, 1, "", "create_model_directory"], [0, 3, 1, "", "create_package_extension"], [0, 3, 1, "", "create_software_specification"], [0, 3, 1, "", "create_zip_package_extension"], [0, 3, 1, "", "deploy_archive"], [0, 3, 1, "", "deploy_model"], [0, 3, 1, "", "get_model_py"], [0, 3, 1, "", "get_wml_create_deployment_meta_props"], [0, 3, 1, "", "get_wml_create_store_model_meta_props"], [0, 3, 1, "", "guid_from_space_name"], [0, 3, 1, "", "wml_create_deployment"], [0, 3, 1, "", "wml_store_model"], [0, 3, 1, "", "write_main_file"], [0, 3, 1, "", "write_yaml_file"]], "dse_do_utils.domodelexporter": [[0, 2, 1, "", "DOModelExporter"]], "dse_do_utils.domodelexporter.DOModelExporter": [[0, 3, 1, "", "export_do_models"], [0, 3, 1, "", "get_access_token_curl"], [0, 3, 1, "", "get_access_token_web"], [0, 3, 1, "", "get_do_model_export_curl"], [0, 3, 1, "", "get_do_model_export_web"], [0, 3, 1, "", "get_project_id"], [0, 3, 1, "", "write_do_model_to_file"]], "dse_do_utils.mapmanager": [[0, 2, 1, "", "MapManager"]], "dse_do_utils.mapmanager.MapManager": [[0, 3, 1, "", "add_bar_chart_in_map"], [0, 3, 1, "", "add_full_screen"], [0, 3, 1, "", "add_layer_control"], [0, 3, 1, "", "create_blank_map"], [0, 3, 1, "", "get_arrows"], [0, 3, 1, "", "get_bearing"], [0, 3, 1, "", "get_html_table"], [0, 3, 1, "", "get_popup_table"], [0, 3, 1, "", "get_tooltip_table"], [0, 4, 1, "", "kansas_city_coord"]], "dse_do_utils.multiscenariomanager": [[0, 2, 1, "", "MultiScenarioManager"]], "dse_do_utils.multiscenariomanager.MultiScenarioManager": [[0, 3, 1, "", "add_data_file_to_project"], [0, 3, 1, "", "env_is_wscloud"], [0, 3, 1, "", "get_all_scenario_names"], [0, 3, 1, "", "get_data_directory"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_multi_scenario_data"], [0, 3, 1, "", "get_root_directory"], [0, 3, 1, "", "get_scenarios_df"], [0, 3, 1, "", "load_data_from_scenario"], [0, 3, 1, "", "merge_scenario_data"], [0, 3, 1, "", "write_data_to_excel"]], "dse_do_utils.optimizationengine": [[0, 2, 1, "", "MyProgressListener"], [0, 2, 1, "", "OptimizationEngine"]], "dse_do_utils.optimizationengine.MyProgressListener": [[0, 3, 1, "", "notify_progress"]], "dse_do_utils.optimizationengine.OptimizationEngine": [[0, 3, 1, "", "add_mip_progress_kpis"], [0, 3, 1, "", "binary_var_series"], [0, 3, 1, "", "binary_var_series_s"], [0, 3, 1, "", "continuous_var_series"], [0, 3, 1, "", "continuous_var_series_s"], [0, 3, 1, "", "cp_binary_var_series"], [0, 3, 1, "", "cp_binary_var_series_s"], [0, 3, 1, "", "cp_integer_var_series"], [0, 3, 1, "", "cp_integer_var_series_s"], [0, 3, 1, "", "cp_interval_var_series"], [0, 3, 1, "", "cp_interval_var_series_s"], [0, 3, 1, "", "create_do_model"], [0, 3, 1, "", "export_as_cpo"], [0, 3, 1, "", "export_as_cpo_s"], [0, 3, 1, "", "export_as_lp"], [0, 3, 1, "", "export_as_lp_path"], [0, 3, 1, "", "export_as_lp_s"], [0, 3, 1, "", "get_kpi_output_table"], [0, 3, 1, "", "integer_var_series"], [0, 3, 1, "", "integer_var_series_s"], [0, 3, 1, "", "semicontinuous_var_series"], [0, 3, 1, "", "semicontinuous_var_series_s"], [0, 3, 1, "", "semiinteger_var_series"], [0, 3, 1, "", "semiinteger_var_series_s"], [0, 3, 1, "", "solve"]], "dse_do_utils.plotlymanager": [[0, 2, 1, "", "PlotlyManager"]], "dse_do_utils.plotlymanager.PlotlyManager": [[0, 3, 1, "", "get_dash_tab_layout_m"], [0, 3, 1, "", "get_plotly_fig_m"]], "dse_do_utils.scenariodbmanager": [[0, 2, 1, "", "AutoScenarioDbTable"], [0, 2, 1, "", "BusinessKpiTable"], [0, 2, 1, "", "DatabaseType"], [0, 2, 1, "", "DbCellUpdate"], [0, 2, 1, "", "KpiTable"], [0, 2, 1, "", "ParameterTable"], [0, 2, 1, "", "ScenarioDbManager"], [0, 2, 1, "", "ScenarioDbTable"], [0, 2, 1, "", "ScenarioSeqTable"], [0, 2, 1, "", "ScenarioTable"]], "dse_do_utils.scenariodbmanager.AutoScenarioDbTable": [[0, 3, 1, "", "create_table_metadata"], [0, 3, 1, "", "get_sa_table"], [0, 3, 1, "", "insert_table_in_db_bulk"]], "dse_do_utils.scenariodbmanager.DatabaseType": [[0, 4, 1, "", "DB2"], [0, 4, 1, "", "PostgreSQL"], [0, 4, 1, "", "SQLite"]], "dse_do_utils.scenariodbmanager.DbCellUpdate": [[0, 4, 1, "", "column_name"], [0, 4, 1, "", "current_value"], [0, 4, 1, "", "previous_value"], [0, 4, 1, "", "row_idx"], [0, 4, 1, "", "row_index"], [0, 4, 1, "", "scenario_name"], [0, 4, 1, "", "table_name"]], "dse_do_utils.scenariodbmanager.ScenarioDbManager": [[0, 3, 1, "", "add_scenario_name_to_dfs"], [0, 3, 1, "", "add_scenario_seq_to_dfs"], [0, 3, 1, "", "create_schema"], [0, 3, 1, "", "delete_scenario_from_db"], [0, 3, 1, "", "delete_scenario_name_column"], [0, 3, 1, "", "delete_scenario_seq_column"], [0, 3, 1, "", "drop_all_tables"], [0, 3, 1, "", "duplicate_scenario_in_db"], [0, 3, 1, "", "get_custom_naming_convention"], [0, 3, 1, "", "get_scenario_db_table"], [0, 3, 1, "", "get_scenario_sa_table"], [0, 3, 1, "", "get_scenarios_df"], [0, 3, 1, "", "insert_scenarios_from_zip"], [0, 3, 1, "", "insert_scenarios_in_db"], [0, 3, 1, "", "insert_tables_in_db"], [0, 3, 1, "", "read_multi_scenario_tables_from_db"], [0, 3, 1, "", "read_scenario_from_db"], [0, 3, 1, "", "read_scenario_input_tables_from_db"], [0, 3, 1, "", "read_scenario_table_from_db"], [0, 3, 1, "", "read_scenario_tables_from_db"], [0, 3, 1, "", "rename_scenario_in_db"], [0, 3, 1, "", "replace_scenario_in_db"], [0, 3, 1, "", "replace_scenario_tables_in_db"], [0, 3, 1, "", "update_cell_changes_in_db"], [0, 3, 1, "", "update_scenario_output_tables_in_db"]], "dse_do_utils.scenariodbmanager.ScenarioDbTable": [[0, 3, 1, "", "add_scenario_name_to_fk_constraint"], [0, 3, 1, "", "add_scenario_seq_to_fk_constraint"], [0, 3, 1, "", "camel_case_to_snake_case"], [0, 3, 1, "", "create_table_metadata"], [0, 5, 1, "", "dbm"], [0, 3, 1, "", "df_column_names_to_snake_case"], [0, 5, 1, "", "enable_scenario_seq"], [0, 3, 1, "", "extend_columns_constraints"], [0, 3, 1, "", "fixNanNoneNull"], [0, 3, 1, "", "get_db_table_name"], [0, 3, 1, "", "get_df_column_names"], [0, 3, 1, "", "get_df_column_names_2"], [0, 3, 1, "", "get_sa_column"], [0, 3, 1, "", "get_sa_table"], [0, 3, 1, "", "insert_table_in_db_bulk"], [0, 3, 1, "", "resolve_metadata_column_conflicts"], [0, 3, 1, "", "sqlcol"]], "dse_do_utils.scenariomanager": [[0, 2, 1, "", "Platform"], [0, 2, 1, "", "ScenarioManager"]], "dse_do_utils.scenariomanager.Platform": [[0, 4, 1, "", "CPD25"], [0, 4, 1, "", "CPD40"], [0, 4, 1, "", "CPDaaS"], [0, 4, 1, "", "Local"]], "dse_do_utils.scenariomanager.ScenarioManager": [[0, 3, 1, "", "add_data_file_to_project_s"], [0, 3, 1, "", "add_data_file_using_project_lib"], [0, 3, 1, "", "add_data_file_using_ws_lib"], [0, 3, 1, "", "add_data_file_using_ws_lib_s"], [0, 3, 1, "", "add_data_into_scenario"], [0, 3, 1, "", "add_data_into_scenario_s"], [0, 3, 1, "", "add_file_as_data_asset"], [0, 3, 1, "", "add_file_as_data_asset_s"], [0, 3, 1, "", "clear_scenario_data"], [0, 3, 1, "", "create_new_scenario"], [0, 3, 1, "", "detect_platform"], [0, 3, 1, "", "env_is_cpd25"], [0, 3, 1, "", "env_is_cpd40"], [0, 3, 1, "", "env_is_dsx"], [0, 3, 1, "", "env_is_wscloud"], [0, 3, 1, "", "export_model_as_lp"], [0, 3, 1, "", "get_data_directory"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_do_scenario"], [0, 3, 1, "", "get_kpis_table_as_dataframe"], [0, 3, 1, "", "get_root_directory"], [0, 3, 1, "", "get_unique_file_name"], [0, 3, 1, "", "insert_scenarios_from_zip"], [0, 3, 1, "", "load_data"], [0, 3, 1, "", "load_data_from_csv"], [0, 3, 1, "", "load_data_from_csv_s"], [0, 3, 1, "", "load_data_from_excel"], [0, 3, 1, "", "load_data_from_excel_s"], [0, 3, 1, "", "load_data_from_parquet"], [0, 3, 1, "", "load_data_from_parquet_s"], [0, 3, 1, "", "load_data_from_scenario"], [0, 3, 1, "", "load_data_from_scenario_s"], [0, 3, 1, "", "load_data_from_zip_csv_s"], [0, 3, 1, "", "print_table_names"], [0, 3, 1, "", "replace_data_in_scenario"], [0, 3, 1, "", "replace_data_into_scenario_s"], [0, 3, 1, "", "update_solve_output_into_scenario"], [0, 3, 1, "", "write_data_into_scenario"], [0, 3, 1, "", "write_data_into_scenario_s"], [0, 3, 1, "", "write_data_to_csv"], [0, 3, 1, "", "write_data_to_csv_s"], [0, 3, 1, "", "write_data_to_excel"], [0, 3, 1, "", "write_data_to_excel_s"], [0, 3, 1, "", "write_data_to_parquet"], [0, 3, 1, "", "write_data_to_parquet_s"], [0, 3, 1, "", "write_data_to_zip_csv_s"]], "dse_do_utils.scenariopicker": [[0, 2, 1, "", "ScenarioPicker"]], "dse_do_utils.scenariopicker.ScenarioPicker": [[0, 2, 1, "", "ScenarioRefreshButton"], [0, 4, 1, "", "default_scenario"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_scenario_picker_ui"], [0, 3, 1, "", "get_scenario_refresh_button"], [0, 3, 1, "", "get_scenario_select_drop_down"], [0, 3, 1, "", "get_selected_scenario"], [0, 3, 1, "", "load_selected_scenario_data"], [0, 4, 1, "", "widgets"]], "dse_do_utils.scenariorunner": [[0, 2, 1, "", "RunConfig"], [0, 2, 1, "", "ScenarioConfig"], [0, 2, 1, "", "ScenarioGenerator"], [0, 2, 1, "", "ScenarioRunner"]], "dse_do_utils.scenariorunner.RunConfig": [[0, 4, 1, "", "data_check_bulk_insert"], [0, 4, 1, "", "do_model_name"], [0, 4, 1, "", "enable_data_check"], [0, 4, 1, "", "enable_data_check_outputs"], [0, 4, 1, "", "enable_refine_conflict"], [0, 4, 1, "", "export_lp"], [0, 4, 1, "", "export_lp_path"], [0, 4, 1, "", "export_sav"], [0, 4, 1, "", "insert_in_do"], [0, 4, 1, "", "insert_inputs_in_db"], [0, 4, 1, "", "insert_outputs_in_db"], [0, 4, 1, "", "log_level"], [0, 4, 1, "", "new_schema"], [0, 4, 1, "", "template_scenario_name"], [0, 4, 1, "", "write_output_to_excel"]], "dse_do_utils.scenariorunner.ScenarioConfig": [[0, 4, 1, "", "parameters"], [0, 4, 1, "", "scenario_name"]], "dse_do_utils.scenariorunner.ScenarioGenerator": [[0, 3, 1, "", "generate_scenario"], [0, 3, 1, "", "get_parameters"]], "dse_do_utils.scenariorunner.ScenarioRunner": [[0, 3, 1, "", "create_new_db_schema"], [0, 3, 1, "", "data_check_inputs"], [0, 3, 1, "", "data_check_outputs"], [0, 3, 1, "", "generate_scenario"], [0, 3, 1, "", "insert_in_do"], [0, 3, 1, "", "insert_inputs_in_db"], [0, 3, 1, "", "insert_outputs_in_db"], [0, 3, 1, "", "load_input_data_from_excel"], [0, 3, 1, "", "run_model"], [0, 3, 1, "", "run_multiple"], [0, 3, 1, "", "run_once"], [0, 3, 1, "", "write_output_data_to_excel"]], "dse_do_utils.utilities": [[0, 1, 1, "", "add_sys_path"], [0, 1, 1, "", "convert_size"], [0, 1, 1, "", "df_itertuples_with_index_names"], [0, 1, 1, "", "list_file_hierarchy"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method", "4": "py:attribute", "5": "py:property"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "property", "Python property"]}, "titleterms": {"dse_do_util": [0, 2, 3], "packag": 0, "submodul": 0, "cpd25util": 0, "modul": [0, 3], "datamanag": 0, "deployeddomodel": 0, "domodeldeploy": 0, "domodelexport": 0, "mapmanag": 0, "multiscenariomanag": 0, "optimizationengin": 0, "plotly_cpd_workaround": 0, "plotlymanag": 0, "scenariodbmanag": 0, "scenariomanag": 0, "scenariopick": 0, "scenariorunn": 0, "util": [0, 1], "version": 0, "content": [0, 1], "welcom": 1, "dse": 1, "do": [1, 3], "document": 1, "indic": 1, "tabl": 1, "read": 3, "me": 3, "import": 3, "main": 3, "class": 3, "instal": 3, "cpdv4": 3, "5": 3, "custom": 3, "environ": 3, "target": 3, "model": 3, "builder": 3, "wml": 3, "scope": 3, "requir": 3}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"dse_do_utils package": [[0, "dse-do-utils-package"]], "Submodules": [[0, "submodules"]], "dse_do_utils.cpd25utilities module": [[0, "module-dse_do_utils.cpd25utilities"]], "dse_do_utils.datamanager module": [[0, "module-dse_do_utils.datamanager"]], "dse_do_utils.deployeddomodel module": [[0, "module-dse_do_utils.deployeddomodel"]], "dse_do_utils.domodeldeployer module": [[0, "module-dse_do_utils.domodeldeployer"]], "dse_do_utils.domodelexporter module": [[0, "module-dse_do_utils.domodelexporter"]], "dse_do_utils.mapmanager module": [[0, "module-dse_do_utils.mapmanager"]], "dse_do_utils.multiscenariomanager module": [[0, "module-dse_do_utils.multiscenariomanager"]], "dse_do_utils.optimizationengine module": [[0, "module-dse_do_utils.optimizationengine"]], "dse_do_utils.plotly_cpd_workaround module": [[0, "module-dse_do_utils.plotly_cpd_workaround"]], "dse_do_utils.plotlymanager module": [[0, "module-dse_do_utils.plotlymanager"]], "dse_do_utils.scenariodbmanager module": [[0, "module-dse_do_utils.scenariodbmanager"]], "dse_do_utils.scenariomanager module": [[0, "module-dse_do_utils.scenariomanager"]], "dse_do_utils.scenariopicker module": [[0, "module-dse_do_utils.scenariopicker"]], "dse_do_utils.scenariorunner module": [[0, "module-dse_do_utils.scenariorunner"]], "dse_do_utils.utilities module": [[0, "module-dse_do_utils.utilities"]], "dse_do_utils.version module": [[0, "module-dse_do_utils.version"]], "Module contents": [[0, "module-dse_do_utils"]], "Welcome to DSE DO Utils documentation!": [[1, "welcome-to-dse-do-utils-documentation"]], "Contents:": [[1, null]], "Indices and tables": [[1, "indices-and-tables"]], "dse_do_utils": [[2, "dse-do-utils"]], "Read me": [[3, "read-me"]], "DSE_DO_Utils": [[3, "dse-do-utils"]], "Important": [[3, "important"]], "Main classes:": [[3, "main-classes"]], "Installation on CPDv4.5": [[3, "installation-on-cpdv4-5"]], "Install in customized environment": [[3, "install-in-customized-environment"]], "Import": [[3, "import"]], "Target environments": [[3, "target-environments"]], "DO Model Builder and WML environments": [[3, "do-model-builder-and-wml-environments"]], "Scope of classes/modules": [[3, "scope-of-classes-modules"]], "Requirements": [[3, "requirements"]]}, "indexentries": {"autoscenariodbtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable"]], "businesskpitable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.BusinessKpiTable"]], "cpd25 (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPD25"]], "cpd40 (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPD40"]], "cpdaas (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPDaaS"]], "db2 (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.DB2"]], "domodeldeployer (class in dse_do_utils.domodeldeployer)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer"]], "domodeldeployerlocal (class in dse_do_utils.domodeldeployer)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal"]], "domodelexporter (class in dse_do_utils.domodelexporter)": [[0, "dse_do_utils.domodelexporter.DOModelExporter"]], "datamanager (class in dse_do_utils.datamanager)": [[0, "dse_do_utils.datamanager.DataManager"]], "databasetype (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType"]], "dbcellupdate (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate"]], "deployeddomodel (class in dse_do_utils.deployeddomodel)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel"]], "kpitable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.KpiTable"]], "local (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.Local"]], "mapmanager (class in dse_do_utils.mapmanager)": [[0, "dse_do_utils.mapmanager.MapManager"]], "multiscenariomanager (class in dse_do_utils.multiscenariomanager)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager"]], "myprogresslistener (class in dse_do_utils.optimizationengine)": [[0, "dse_do_utils.optimizationengine.MyProgressListener"]], "optimizationengine (class in dse_do_utils.optimizationengine)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine"]], "parametertable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ParameterTable"]], "platform (class in dse_do_utils.scenariomanager)": [[0, "dse_do_utils.scenariomanager.Platform"]], "plotlymanager (class in dse_do_utils.plotlymanager)": [[0, "dse_do_utils.plotlymanager.PlotlyManager"]], "postgresql (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.PostgreSQL"]], "runconfig (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.RunConfig"]], "sqlite (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.SQLite"]], "scenarioconfig (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig"]], "scenariodbmanager (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager"]], "scenariodbtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable"]], "scenariogenerator (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator"]], "scenariomanager (class in dse_do_utils.scenariomanager)": [[0, "dse_do_utils.scenariomanager.ScenarioManager"]], "scenariopicker (class in dse_do_utils.scenariopicker)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker"]], "scenariopicker.scenariorefreshbutton (class in dse_do_utils.scenariopicker)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.ScenarioRefreshButton"]], "scenariorunner (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner"]], "scenarioseqtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioSeqTable"]], "scenariotable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioTable"]], "add_bar_chart_in_map() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.add_bar_chart_in_map"]], "add_data_file_to_project() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.add_data_file_to_project"]], "add_data_file_to_project_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_to_project_s"]], "add_data_file_using_project_lib() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_project_lib"]], "add_data_file_using_ws_lib() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_ws_lib"]], "add_data_file_using_ws_lib_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_ws_lib_s"]], "add_data_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_into_scenario"]], "add_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_into_scenario_s"]], "add_file_as_data_asset() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_file_as_data_asset"]], "add_file_as_data_asset_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_as_data_asset_cpd25"]], "add_file_as_data_asset_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_file_as_data_asset_s"]], "add_file_path_as_data_asset_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_path_as_data_asset_cpd25"]], "add_file_path_as_data_asset_wsc() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_path_as_data_asset_wsc"]], "add_full_screen() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.add_full_screen"]], "add_layer_control() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.add_layer_control"]], "add_mip_progress_kpis() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.add_mip_progress_kpis"]], "add_scenario_name_to_dfs() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.add_scenario_name_to_dfs"]], "add_scenario_name_to_fk_constraint() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.add_scenario_name_to_fk_constraint"]], "add_scenario_seq_to_dfs() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.add_scenario_seq_to_dfs"]], "add_scenario_seq_to_fk_constraint() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.add_scenario_seq_to_fk_constraint"]], "add_sys_path() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.add_sys_path"]], "apply_and_concat() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.apply_and_concat"]], "binary_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.binary_var_series"]], "binary_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.binary_var_series_s"]], "camel_case_to_snake_case() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.camel_case_to_snake_case"]], "clear_scenario_data() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.clear_scenario_data"]], "column_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.column_name"]], "continuous_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.continuous_var_series"]], "continuous_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.continuous_var_series_s"]], "convert_size() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.convert_size"]], "cp_binary_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_binary_var_series"]], "cp_binary_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_binary_var_series_s"]], "cp_integer_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_integer_var_series"]], "cp_integer_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_integer_var_series_s"]], "cp_interval_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_interval_var_series"]], "cp_interval_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_interval_var_series_s"]], "create_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_archive"]], "create_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_archive"]], "create_blank_map() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.create_blank_map"]], "create_do_model() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.create_do_model"]], "create_model_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_model_archive"]], "create_model_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_model_archive"]], "create_model_directory() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_model_directory"]], "create_model_directory() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_model_directory"]], "create_new_db_schema() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.create_new_db_schema"]], "create_new_scenario() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.create_new_scenario"]], "create_package_extension() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_package_extension"]], "create_package_extension() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_package_extension"]], "create_schema() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.create_schema"]], "create_software_specification() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_software_specification"]], "create_software_specification() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_software_specification"]], "create_table_metadata() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.create_table_metadata"]], "create_table_metadata() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.create_table_metadata"]], "create_zip_package_extension() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_zip_package_extension"]], "create_zip_package_extension() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_zip_package_extension"]], "current_value (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.current_value"]], "data_check_bulk_insert (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.data_check_bulk_insert"]], "data_check_inputs() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.data_check_inputs"]], "data_check_outputs() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.data_check_outputs"]], "dbm (dse_do_utils.scenariodbmanager.scenariodbtable property)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.dbm"]], "default_scenario (dse_do_utils.scenariopicker.scenariopicker attribute)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.default_scenario"]], "delete_scenario_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_from_db"]], "delete_scenario_name_column() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_name_column"]], "delete_scenario_seq_column() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_seq_column"]], "deploy_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.deploy_archive"]], "deploy_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.deploy_archive"]], "deploy_model() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.deploy_model"]], "deploy_model() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.deploy_model"]], "detect_platform() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.detect_platform"]], "df_column_names_to_snake_case() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.df_column_names_to_snake_case"]], "df_crossjoin_ai() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_ai"]], "df_crossjoin_mi() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_mi"]], "df_crossjoin_si() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_si"]], "df_itertuples_with_index_names() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.df_itertuples_with_index_names"]], "do_model_name (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.do_model_name"]], "drop_all_tables() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.drop_all_tables"]], "dse_do_utils": [[0, "module-dse_do_utils"]], "dse_do_utils.cpd25utilities": [[0, "module-dse_do_utils.cpd25utilities"]], "dse_do_utils.datamanager": [[0, "module-dse_do_utils.datamanager"]], "dse_do_utils.deployeddomodel": [[0, "module-dse_do_utils.deployeddomodel"]], "dse_do_utils.domodeldeployer": [[0, "module-dse_do_utils.domodeldeployer"]], "dse_do_utils.domodelexporter": [[0, "module-dse_do_utils.domodelexporter"]], "dse_do_utils.mapmanager": [[0, "module-dse_do_utils.mapmanager"]], "dse_do_utils.multiscenariomanager": [[0, "module-dse_do_utils.multiscenariomanager"]], "dse_do_utils.optimizationengine": [[0, "module-dse_do_utils.optimizationengine"]], "dse_do_utils.plotly_cpd_workaround": [[0, "module-dse_do_utils.plotly_cpd_workaround"]], "dse_do_utils.plotlymanager": [[0, "module-dse_do_utils.plotlymanager"]], "dse_do_utils.scenariodbmanager": [[0, "module-dse_do_utils.scenariodbmanager"]], "dse_do_utils.scenariomanager": [[0, "module-dse_do_utils.scenariomanager"]], "dse_do_utils.scenariopicker": [[0, "module-dse_do_utils.scenariopicker"]], "dse_do_utils.scenariorunner": [[0, "module-dse_do_utils.scenariorunner"]], "dse_do_utils.utilities": [[0, "module-dse_do_utils.utilities"]], "dse_do_utils.version": [[0, "module-dse_do_utils.version"]], "duplicate_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.duplicate_scenario_in_db"]], "enable_data_check (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_data_check"]], "enable_data_check_outputs (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_data_check_outputs"]], "enable_refine_conflict (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_refine_conflict"]], "enable_scenario_seq (dse_do_utils.scenariodbmanager.scenariodbtable property)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.enable_scenario_seq"]], "env_is_cpd25() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_cpd25"]], "env_is_cpd40() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_cpd40"]], "env_is_dsx() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_dsx"]], "env_is_wscloud() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.env_is_wscloud"]], "env_is_wscloud() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_wscloud"]], "execute_model_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.execute_model_v2"]], "export_as_cpo() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_cpo"]], "export_as_cpo_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_cpo_s"]], "export_as_lp() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp"]], "export_as_lp_path() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp_path"]], "export_as_lp_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp_s"]], "export_do_models() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.export_do_models"]], "export_lp (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_lp"]], "export_lp_path (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_lp_path"]], "export_model_as_lp() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.export_model_as_lp"]], "export_sav (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_sav"]], "extend_columns_constraints() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.extend_columns_constraints"]], "extract_solution() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.extract_solution"]], "extract_solution_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.extract_solution_v2"]], "fixnannonenull() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.fixNanNoneNull"]], "generate_scenario() (dse_do_utils.scenariorunner.scenariogenerator method)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator.generate_scenario"]], "generate_scenario() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.generate_scenario"]], "get_access_token_curl() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_access_token_curl"]], "get_access_token_web() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_access_token_web"]], "get_all_scenario_names() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_all_scenario_names"]], "get_arrows() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_arrows"]], "get_bearing() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_bearing"]], "get_custom_naming_convention() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_custom_naming_convention"]], "get_dash_tab_layout_m() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_dash_tab_layout_m"]], "get_data_directory() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_data_directory"]], "get_data_directory() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_data_directory"]], "get_db_table_name() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_db_table_name"]], "get_dd_client() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_dd_client"]], "get_dd_client() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_dd_client"]], "get_dd_client() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_dd_client"]], "get_deployment_id() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_deployment_id"]], "get_df_column_names() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_df_column_names"]], "get_df_column_names_2() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_df_column_names_2"]], "get_do_model_export_curl() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_do_model_export_curl"]], "get_do_model_export_web() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_do_model_export_web"]], "get_do_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_do_scenario"]], "get_html_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_html_table"]], "get_job_status() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_job_status"]], "get_job_status_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_job_status_v2"]], "get_kpi_output_table() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.get_kpi_output_table"]], "get_kpis_table_as_dataframe() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_kpis_table_as_dataframe"]], "get_log() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_log"]], "get_model_py() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_model_py"]], "get_multi_scenario_data() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_multi_scenario_data"]], "get_outputs() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_outputs"]], "get_parameter_value() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.get_parameter_value"]], "get_parameters() (dse_do_utils.scenariorunner.scenariogenerator method)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator.get_parameters"]], "get_plotly_fig_m() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_plotly_fig_m"]], "get_popup_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_popup_table"]], "get_project_id() (dse_do_utils.domodelexporter.domodelexporter static method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_project_id"]], "get_raw_table_by_name() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.get_raw_table_by_name"]], "get_root_directory() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_root_directory"]], "get_root_directory() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_root_directory"]], "get_sa_column() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_sa_column"]], "get_sa_table() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.get_sa_table"]], "get_sa_table() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_sa_table"]], "get_scenario() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_scenario"]], "get_scenario_db_table() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenario_db_table"]], "get_scenario_picker_ui() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_picker_ui"]], "get_scenario_refresh_button() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_refresh_button"]], "get_scenario_sa_table() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenario_sa_table"]], "get_scenario_select_drop_down() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_select_drop_down"]], "get_scenarios_df() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_scenarios_df"]], "get_scenarios_df() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenarios_df"]], "get_selected_scenario() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_selected_scenario"]], "get_solve_details() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_details"]], "get_solve_details_objective() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_details_objective"]], "get_solve_payload() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_payload"]], "get_solve_status() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_status"]], "get_space_id() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_space_id"]], "get_tooltip_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_tooltip_table"]], "get_unique_file_name() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_unique_file_name"]], "get_wml_create_deployment_meta_props() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_wml_create_deployment_meta_props"]], "get_wml_create_deployment_meta_props() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_wml_create_deployment_meta_props"]], "get_wml_create_store_model_meta_props() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_wml_create_store_model_meta_props"]], "get_wml_create_store_model_meta_props() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_wml_create_store_model_meta_props"]], "guid_from_space_name() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.guid_from_space_name"]], "guid_from_space_name() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.guid_from_space_name"]], "insert_in_do (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_in_do"]], "insert_in_do() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_in_do"]], "insert_inputs_in_db (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_inputs_in_db"]], "insert_inputs_in_db() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_inputs_in_db"]], "insert_outputs_in_db (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_outputs_in_db"]], "insert_outputs_in_db() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_outputs_in_db"]], "insert_scenarios_from_zip() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_scenarios_from_zip"]], "insert_scenarios_from_zip() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.insert_scenarios_from_zip"]], "insert_scenarios_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_scenarios_in_db"]], "insert_table_in_db_bulk() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.insert_table_in_db_bulk"]], "insert_table_in_db_bulk() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.insert_table_in_db_bulk"]], "insert_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_tables_in_db"]], "integer_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.integer_var_series"]], "integer_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.integer_var_series_s"]], "kansas_city_coord (dse_do_utils.mapmanager.mapmanager attribute)": [[0, "dse_do_utils.mapmanager.MapManager.kansas_city_coord"]], "list_file_hierarchy() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.list_file_hierarchy"]], "load_data() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data"]], "load_data_from_csv() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_csv"]], "load_data_from_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_csv_s"]], "load_data_from_excel() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_excel"]], "load_data_from_excel_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_excel_s"]], "load_data_from_parquet() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_parquet"]], "load_data_from_parquet_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_parquet_s"]], "load_data_from_scenario() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.load_data_from_scenario"]], "load_data_from_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_scenario"]], "load_data_from_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_scenario_s"]], "load_data_from_zip_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_zip_csv_s"]], "load_input_data_from_excel() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.load_input_data_from_excel"]], "load_selected_scenario_data() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.load_selected_scenario_data"]], "log_level (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.log_level"]], "merge_scenario_data() (dse_do_utils.multiscenariomanager.multiscenariomanager static method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.merge_scenario_data"]], "module": [[0, "module-dse_do_utils"], [0, "module-dse_do_utils.cpd25utilities"], [0, "module-dse_do_utils.datamanager"], [0, "module-dse_do_utils.deployeddomodel"], [0, "module-dse_do_utils.domodeldeployer"], [0, "module-dse_do_utils.domodelexporter"], [0, "module-dse_do_utils.mapmanager"], [0, "module-dse_do_utils.multiscenariomanager"], [0, "module-dse_do_utils.optimizationengine"], [0, "module-dse_do_utils.plotly_cpd_workaround"], [0, "module-dse_do_utils.plotlymanager"], [0, "module-dse_do_utils.scenariodbmanager"], [0, "module-dse_do_utils.scenariomanager"], [0, "module-dse_do_utils.scenariopicker"], [0, "module-dse_do_utils.scenariorunner"], [0, "module-dse_do_utils.utilities"], [0, "module-dse_do_utils.version"]], "module_reload() (in module dse_do_utils)": [[0, "dse_do_utils.module_reload"]], "monitor_execution_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.monitor_execution_v2"]], "new_schema (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.new_schema"]], "notify_progress() (dse_do_utils.optimizationengine.myprogresslistener method)": [[0, "dse_do_utils.optimizationengine.MyProgressListener.notify_progress"]], "parameters (dse_do_utils.scenariorunner.scenarioconfig attribute)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig.parameters"]], "prep_parameters() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prep_parameters"]], "prepare_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_data_frames"]], "prepare_input_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_input_data_frames"]], "prepare_output_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_output_data_frames"]], "previous_value (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.previous_value"]], "print_hello() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.print_hello"]], "print_inputs_outputs_summary() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.print_inputs_outputs_summary"]], "print_table_names() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.print_table_names"]], "read_multi_scenario_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_multi_scenario_tables_from_db"]], "read_scenario_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_from_db"]], "read_scenario_input_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_input_tables_from_db"]], "read_scenario_table_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_table_from_db"]], "read_scenario_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_tables_from_db"]], "rename_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.rename_scenario_in_db"]], "replace_data_in_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.replace_data_in_scenario"]], "replace_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.replace_data_into_scenario_s"]], "replace_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.replace_scenario_in_db"]], "replace_scenario_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.replace_scenario_tables_in_db"]], "resolve_metadata_column_conflicts() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.resolve_metadata_column_conflicts"]], "row_idx (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.row_idx"]], "row_index (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.row_index"]], "run_model() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_model"]], "run_multiple() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_multiple"]], "run_once() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_once"]], "scenario_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.scenario_name"]], "scenario_name (dse_do_utils.scenariorunner.scenarioconfig attribute)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig.scenario_name"]], "semicontinuous_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semicontinuous_var_series"]], "semicontinuous_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semicontinuous_var_series_s"]], "semiinteger_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semiinteger_var_series"]], "semiinteger_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semiinteger_var_series_s"]], "set_parameters() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.set_parameters"]], "solve() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.solve"]], "solve() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.solve"]], "solve_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.solve_v2"]], "sqlcol() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.sqlcol"]], "table_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.table_name"]], "template_scenario_name (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.template_scenario_name"]], "update_cell_changes_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.update_cell_changes_in_db"]], "update_scenario_output_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.update_scenario_output_tables_in_db"]], "update_solve_output_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.update_solve_output_into_scenario"]], "widgets (dse_do_utils.scenariopicker.scenariopicker attribute)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.widgets"]], "wml_create_deployment() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.wml_create_deployment"]], "wml_create_deployment() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.wml_create_deployment"]], "wml_store_model() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.wml_store_model"]], "wml_store_model() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.wml_store_model"]], "write_data_asset_as_file_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.write_data_asset_as_file_cpd25"]], "write_data_asset_as_file_wsc() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.write_data_asset_as_file_wsc"]], "write_data_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_into_scenario"]], "write_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_into_scenario_s"]], "write_data_to_csv() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_csv"]], "write_data_to_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_csv_s"]], "write_data_to_excel() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.write_data_to_excel"]], "write_data_to_excel() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_excel"]], "write_data_to_excel_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_excel_s"]], "write_data_to_parquet() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_parquet"]], "write_data_to_parquet_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_parquet_s"]], "write_data_to_zip_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_zip_csv_s"]], "write_do_model_to_file() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.write_do_model_to_file"]], "write_main_file() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.write_main_file"]], "write_main_file() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.write_main_file"]], "write_output_data_to_excel() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.write_output_data_to_excel"]], "write_output_to_excel (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.write_output_to_excel"]], "write_yaml_file() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.write_yaml_file"]], "write_yaml_file() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.write_yaml_file"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["dse_do_utils", "index", "modules", "readme_link"], "filenames": ["dse_do_utils.rst", "index.rst", "modules.rst", "readme_link.rst"], "titles": ["dse_do_utils package", "Welcome to DSE DO Utils documentation!", "dse_do_utils", "Read me"], "terms": {"add_file_as_data_asset_cpd25": [0, 2], "file_nam": 0, "str": 0, "none": [0, 3], "sourc": [0, 3], "add": [0, 3], "file": [0, 3], "locat": [0, 3], "project_data": [0, 3], "data_asset": [0, 3], "data": [0, 3], "asset": [0, 3], "watson": 0, "studio": 0, "project": [0, 3], "so": 0, "appear": 0, "ui": 0, "can": [0, 3], "export": [0, 3], "paramet": [0, 2], "name": 0, "includ": 0, "extens": 0, "add_file_path_as_data_asset_cpd25": [0, 2], "file_path": 0, "asset_nam": 0, "option": 0, "appli": 0, "cpdv2": 0, "5": [0, 1], "work": [0, 3], "ani": [0, 3], "allow": [0, 3], "view": 0, "download": [0, 3], "from": [0, 3], "need": 0, "call": 0, "after": 0, "ha": 0, "been": 0, "save": 0, "regularli": 0, "system": [0, 3], "typic": [0, 3], "would": 0, "ensur": 0, "i": [0, 3], "visibl": 0, "usag": [0, 3], "write": [0, 3], "some": [0, 3], "an": [0, 3], "exampl": 0, "myfil": 0, "csv": [0, 3], "open": 0, "w": [0, 3], "f": 0, "hello": 0, "world": 0, "bewar": 0, "same": 0, "now": 0, "exist": [0, 3], "2": 0, "differ": [0, 3], "place": [0, 3], "In": 0, "cloud": [0, 3], "object": 0, "storag": 0, "co": 0, "As": 0, "chang": 0, "independ": 0, "caus": 0, "inconsist": 0, "full": 0, "path": 0, "default": [0, 3], "If": 0, "extract": 0, "add_file_path_as_data_asset_wsc": [0, 2], "home": 0, "dsxuser": 0, "o": 0, "environ": [0, 1], "pwd": 0, "project_lib": 0, "requir": [0, 1], "write_data_asset_as_file_cpd25": [0, 2], "assum": 0, "make": 0, "access": [0, 3], "thing": 0, "like": [0, 3], "load": 0, "disk": 0, "pip": [0, 3], "instal": [0, 1], "import": [0, 1], "us": [0, 3], "current": 0, "directori": 0, "write_data_asset_as_file_wsc": [0, 2], "For": [0, 3], "cpd": [0, 3], "leav": 0, "class": [0, 1], "input": 0, "dict": 0, "datafram": 0, "output": 0, "base": 0, "A": [0, 3], "contain": [0, 3], "origin": 0, "scenario": [0, 3], "intermedi": 0, "It": 0, "dictionari": 0, "came": 0, "insert": 0, "do": 0, "addit": 0, "hold": 0, "method": 0, "oper": 0, "convert": 0, "when": [0, 3], "combin": [0, 3], "optim": [0, 3], "engin": [0, 3], "should": 0, "docplex": [0, 3], "code": [0, 3], "creat": [0, 3], "interact": [0, 3], "model": [0, 1], "That": 0, "task": 0, "One": 0, "reason": 0, "separ": 0, "re": 0, "e": [0, 3], "g": [0, 3], "visual": [0, 3], "notebook": [0, 3], "prepar": 0, "select": 0, "renam": 0, "column": 0, "index": [0, 1], "assign": 0, "them": 0, "direct": 0, "attribut": 0, "set": 0, "pre": [0, 3], "process": [0, 3], "also": [0, 3], "member": 0, "properti": 0, "static": 0, "apply_and_concat": [0, 2], "field": 0, "func": 0, "column_nam": [0, 2], "multipl": [0, 3], "one": 0, "lambda": 0, "function": [0, 3], "http": 0, "stackoverflow": 0, "com": 0, "question": 0, "23690284": 0, "panda": 0, "return": 0, "valu": 0, "row": 0, "def": 0, "my_funct": 0, "my_input_valu": 0, "my_output_value_1": 0, "1": [0, 3], "my_output_value_2": 0, "my_output_value1": 0, "df": 0, "my_input_column_nam": 0, "my_output_column_name_1": 0, "my_output_column_name_2": 0, "have": [0, 3], "result": 0, "new": 0, "deprec": 0, "sinc": 0, "0": [0, 3], "done": 0, "plain": 0, "altern": 0, "pd": 0, "seri": 0, "axi": 0, "The": [0, 3], "argument": 0, "tupl": 0, "n": 0, "element": 0, "list": 0, "match": 0, "number": 0, "modifi": 0, "df_crossjoin_ai": [0, 2], "df1": 0, "df2": 0, "kwarg": 0, "cross": 0, "join": 0, "cartesian": 0, "product": 0, "between": [0, 3], "two": 0, "constant": 0, "temporari": 0, "kei": 0, "accept": 0, "ar": [0, 3], "singl": 0, "multi": 0, "un": 0, "indic": 0, "merg": 0, "keyword": 0, "pass": 0, "df_crossjoin_mi": [0, 2], "both": [0, 3], "multiindex": 0, "otherwis": 0, "unnam": 0, "df_crossjoin_si": [0, 2], "see": [0, 3], "github": [0, 3], "pydata": 0, "issu": 0, "5401": 0, "mkonrad": 0, "net": 0, "2016": 0, "04": 0, "16": 0, "html": 0, "extract_solut": [0, 2], "extract_dvar_nam": 0, "drop_column_nam": 0, "drop": [0, 3], "bool": 0, "true": 0, "epsilon": 0, "float": 0, "round_decim": 0, "int": 0, "solution_column_name_post_fix": 0, "sol": 0, "allow_mixed_type_column": 0, "fals": 0, "gener": 0, "routin": 0, "solut": 0, "remov": 0, "dvar": [0, 3], "abl": [0, 3], "clean": 0, "case": [0, 3], "cplex": [0, 3], "continu": 0, "veri": 0, "small": 0, "instead": 0, "zero": 0, "thi": [0, 3], "And": 0, "posit": 0, "clip": 0, "neg": 0, "integ": 0, "round": 0, "nearest": 0, "larger": 0, "than": 0, "precis": 0, "where": 0, "all": [0, 3], "below": 0, "threshold": 0, "decim": 0, "postfix": 0, "solution_valu": 0, "python": [0, 3], "express": 0, "get_parameter_valu": [0, 2], "param": 0, "param_nam": 0, "param_typ": 0, "default_valu": 0, "value_format": 0, "y": 0, "m": 0, "d": [0, 3], "h": 0, "": 0, "get": 0, "tabl": [0, 3], "note": 0, "mix": 0, "type": 0, "depend": [0, 3], "what": 0, "other": [0, 3], "explicit": 0, "convers": 0, "expect": 0, "valid": 0, "datetim": 0, "format": 0, "get_raw_table_by_nam": [0, 2], "table_nam": [0, 2], "raw": 0, "non": 0, "prep_paramet": [0, 2], "blank": 0, "instanc": 0, "prepare_data_fram": [0, 2], "prepare_input_data_fram": [0, 2], "placehold": 0, "frame": 0, "particular": [0, 3], "sure": 0, "test": 0, "we": 0, "dashenterpris": 0, "app": 0, "whole": 0, "mytabl": 0, "self": 0, "my_tabl": 0, "set_index": 0, "id": 0, "verify_integr": 0, "prepare_output_data_fram": [0, 2], "kpi": 0, "print_hello": [0, 2], "FOR": 0, "print": 0, "string": 0, "messag": 0, "To": [0, 3], "reload": 0, "cell": [0, 3], "dm": 0, "upload": [0, 3], "wsl": 0, "autoreload": 0, "rerun": 0, "second": 0, "onli": [0, 3], "verifi": 0, "updat": 0, "imp": 0, "start": 0, "print_inputs_outputs_summari": [0, 2], "summari": 0, "along": 0, "set_paramet": [0, 2], "easi": [0, 3], "time_limit": 0, "overridden": 0, "super": 0, "simplenamespac": 0, "individu": 0, "easili": 0, "wml_credenti": 0, "space_nam": 0, "deployed_model_nam": 0, "deployment_id": 0, "default_max_oaas_time_limit_sec": 0, "default_max_run_time_sec": 0, "600": 0, "monitor_loop_delay_sec": 0, "cpd3": [0, 3], "ibm_watson_machine_learn": 0, "apicli": 0, "major": 0, "step": 0, "configur": [0, 3], "intern": 0, "former": [0, 3], "watsonmachinelearningapicli": 0, "commun": 0, "deploi": 0, "solv": [0, 2], "job": 0, "monitor": 0, "run": [0, 3], "loop": 0, "state": 0, "onc": 0, "complet": 0, "mdl": 0, "solve_payload": 0, "get_solve_payload": [0, 2], "payload": 0, "job_detail": 0, "job_uid": 0, "execute_model_v1": 0, "monitor_execution_v1": 0, "extract_solution_v1": 0, "simplest": 0, "statu": 0, "solve_statu": 0, "todo": 0, "debug": 0, "mode": 0, "log": 0, "kill": 0, "stop": 0, "poll": 0, "interv": 0, "execute_model_v2": [0, 2], "max_oaas_time_limit_sec": 0, "wml": [0, 1], "time": 0, "limit": 0, "extract_solution_v2": [0, 2], "get_deployment_id": [0, 2], "model_nam": 0, "find": 0, "get_job_statu": [0, 2], "job_statu": 0, "queu": 0, "fail": 0, "cancel": 0, "rtype": 0, "get_job_status_v2": [0, 2], "retriev": 0, "either": 0, "get_log": [0, 2], "txt": 0, "line": 0, "log_lin": 0, "get_output": [0, 2], "get_solve_detail": [0, 2], "get_solve_details_object": [0, 2], "progress_current_object": 0, "progress_best_object": 0, "get_solve_statu": [0, 2], "retreiv": 0, "get_space_id": [0, 2], "space_id": 0, "monitor_execution_v2": [0, 2], "max_run_time_sec": 0, "execut": 0, "period": 0, "api": [0, 3], "store": [0, 3], "execution_status_json": 0, "execution_statu": 0, "out": 0, "delet": 0, "total": 0, "exce": 0, "maximum": 0, "befor": 0, "must": 0, "master": 0, "initi": 0, "post": [0, 3], "up": [0, 3], "overrid": 0, "constructor": 0, "follow": [0, 3], "order": 0, "retrieve_solve_configur": 0, "set_output_settings_in_solve_configur": 0, "retrieve_debug_materi": 0, "cleanup": 0, "solve_v2": [0, 2], "scenario_nam": [0, 2], "package_path": 0, "deployment_nam": 0, "xxx": 0, "deployment_descript": 0, "tmp_dir": 0, "4": [0, 3], "builder": [0, 1], "md": [0, 3], "deployment_uid": 0, "deploy_model": [0, 2], "how": 0, "root": 0, "specifi": 0, "py": 0, "These": 0, "my_modul": 0, "myclass": 0, "similar": 0, "experi": 0, "anywher": 0, "jupyterlab": [0, 3], "conda": [0, 3], "create_arch": [0, 2], "main_file_path": 0, "archiv": 0, "folder": 0, "main": [0, 1], "written": 0, "create_model_arch": [0, 2], "surround": 0, "boilerpl": 0, "3": [0, 3], "create_model_directori": [0, 2], "Will": 0, "clear": 0, "first": 0, "create_package_extens": [0, 2], "yaml_file_path": 0, "create_software_specif": [0, 2], "pkg_ext_id": 0, "package_extens": 0, "create_zip_package_extens": [0, 2], "package_zip_filepath": 0, "githubusercont": 0, "ipynb": 0, "browser": 0, "chrome": 0, "color_mod": 0, "auto": 0, "commit": 0, "37188b1a8b48be2bef34b35b55f01cba0d29ed19": 0, "devic": 0, "unknown": 0, "enc_url": 0, "68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f49424d2f776174736f6e2d6d616368696e652d6c6561726e696e672d73616d706c65732f333731383862316138623438626532626566333462333562353566303163626130643239656431392f637064342e302f6e6f7465626f6f6b732f707974686f6e5f73646b2f6465706c6f796d656e74732f637573746f6d5f6c6962726172792f5573652532307363696b69742d6c6561726e253230616e64253230637573746f6d2532306c696272617279253230746f2532307072656469637425323074656d70657261747572652e6970796e62": 0, "logged_in": 0, "nwo": 0, "ibm": [0, 3], "2fwatson": 0, "machin": 0, "learn": 0, "sampl": 0, "cpd4": [0, 3], "2fnotebook": 0, "2fpython_sdk": 0, "2fdeploy": 0, "2fcustom_librari": 0, "2fuse": 0, "scikit": 0, "custom": 0, "librari": 0, "predict": 0, "temperatur": 0, "platform": [0, 2], "android": 0, "repository_id": 0, "277618282": 0, "repository_typ": 0, "repositori": [0, 3], "98": 0, "deploy_arch": [0, 2], "model_archive_file_path": 0, "Then": [0, 3], "deploy": [0, 3], "uid": 0, "necessari": 0, "get_scenario": [0, 2], "get_wml_create_deployment_meta_prop": [0, 2], "meta_prop": 0, "creation": 0, "get_wml_create_store_model_meta_prop": [0, 2], "sw_spec_id": 0, "guid_from_space_nam": [0, 2], "space": 0, "handl": 0, "except": 0, "found": 0, "wml_create_deploy": [0, 2], "model_uid": 0, "wml_store_model": [0, 2], "write_main_fil": [0, 2], "templat": 0, "header": 0, "footer": 0, "write_yaml_fil": [0, 2], "yml": 0, "domodeldeployerloc": [0, 2], "experiment": 0, "pleas": 0, "There": 0, "aspect": 0, "hard": 0, "review": 0, "saa": 0, "pip_zip": 0, "zip": [0, 3], "dataplatform": 0, "doc": 0, "wsj": 0, "analyz": 0, "ml": 0, "softwar": 0, "spec": 0, "context": 0, "cpdaa": [0, 2], "get_model_pi": [0, 2], "usual": 0, "node": 0, "too": 0, "slow": 0, "somehow": 0, "extend": 0, "overhead": 0, "itself": 0, "quickli": 0, "still": 0, "give": 0, "thread": 0, "do_model_nam": [0, 2], "longer": [0, 3], "avail": [0, 3], "cpdv3": [0, 3], "cpd2": 0, "curl": 0, "web": 0, "request": 0, "By": 0, "stamp": 0, "wai": 0, "anoth": 0, "cluster": 0, "command": 0, "copi": 0, "past": 0, "termin": 0, "support": 0, "me": [0, 1], "export_do_model": [0, 2], "pattern": 0, "_export_": 0, "yyyymmdd_hhmm": 0, "model1": 0, "model2": 0, "project_id": 0, "user": 0, "collabor": 0, "next": 0, "productionplan": 0, "ef365b2c": 0, "9f28": 0, "447a": 0, "a933": 0, "5de6560a1cfa": 0, "access_tok": 0, "user_nam": 0, "password": 0, "accesstoken": 0, "cpd_cluster_host": 0, "dse": [0, 3], "cp4d25": 0, "cluster4": 0, "cpolab": 0, "access_token": 0, "b7bf7fd8": 0, "aa50": 0, "4bd2": 0, "8364": 0, "02ea6d480895": 0, "cluster_nam": 0, "token": 0, "get_access_token_curl": [0, 2], "get_do_model_export_curl": [0, 2], "xxxxxx": 0, "abov": 0, "git": 0, "bash": 0, "part": 0, "window": 0, "automat": [0, 3], "variabl": 0, "target": [0, 1], "pars": 0, "page": [0, 1], "manual": 0, "show": 0, "firefox": 0, "menu": [0, 3], "develop": [0, 3], "control": 0, "just": 0, "data_id": 0, "21c8ac71": 0, "26c1": 0, "49a5": 0, "a567": 0, "d4c69a0d8158": 0, "mai": 0, "search": [0, 1], "get_project_id": [0, 2], "project_nam": 0, "page_sourc": 0, "full_project_nam": 0, "provid": [0, 3], "entri": 0, "user_access_token": 0, "NOT": [0, 3], "runtime_env_apsx_url": 0, "remot": 0, "url": 0, "alia": 0, "datascienceelit": 0, "within": [0, 3], "br": 0, "end": 0, "get_access_token_web": [0, 2], "respons": 0, "person": 0, "get_do_model_export_web": [0, 2], "write_do_model_to_fil": [0, 2], "data_manag": 0, "zoom_start": 0, "width": 0, "100": 0, "height": 0, "layer_control_posit": 0, "topleft": 0, "build": 0, "folium": [0, 3], "map": [0, 3], "futur": 0, "around": [0, 3], "popup": 0, "469": 0, "speed": 0, "km": 0, "strftime": 0, "spd": 0, "tooltip": 0, "doesn": 0, "t": 0, "yet": 0, "50": 0, "785": 0, "6": [0, 3], "wsl1": 0, "doe": 0, "seem": 0, "add_bar_chart_in_map": [0, 2], "coord": 0, "quantiti": 0, "bar_width": 0, "20": 0, "bar_height_per_unit": 0, "border_color": 0, "background_color": 0, "draw": 0, "bar": 0, "chart": 0, "anchor": 0, "botton": 0, "left": 0, "expand": 0, "right": 0, "mani": [0, 3], "cycl": 0, "through": 0, "defin": 0, "color": 0, "60131314": 0, "star": 0, "marker": 0, "io": 0, "plugin": 0, "beautifyicon": 0, "add_full_screen": [0, 2], "screen": 0, "button": 0, "top": 0, "corner": 0, "unfortun": 0, "jupyt": 0, "ok": 0, "here": 0, "nbviewer": 0, "org": 0, "blob": 0, "add_layer_control": [0, 2], "create_blank_map": [0, 2], "get_arrow": [0, 2], "blue": 0, "size": 0, "n_arrow": 0, "add_to": 0, "arrow": 0, "hypothet": 0, "correctli": 0, "rotat": 0, "plot": 0, "lat": 0, "lon": 0, "repres": 0, "eg": 0, "41": 0, "1132": 0, "96": 0, "1993": 0, "3810": 0, "95": 0, "8021": 0, "polylin": 0, "whatev": 0, "featuregroup": 0, "ad": 0, "medium": 0, "bobhaffn": 0, "25a0fe88e4": 0, "get_bear": [0, 2], "p1": 0, "p2": 0, "compass": 0, "bear": 0, "namedtupl": 0, "gist": 0, "jerom": 0, "2005586": 0, "get_html_tabl": [0, 2], "sequenc": 0, "each": 0, "get_popup_t": [0, 2], "child": 0, "popup_t": 0, "property_1": 0, "value_1": 0, "property_2": 0, "value_2": 0, "icon": 0, "Or": 0, "counti": 0, "add_child": 0, "quot": 0, "text": 0, "problem": 0, "avoid": 0, "replac": 0, "someth": 0, "els": 0, "parse_html": 0, "prevent": 0, "despit": 0, "suggest": 0, "get_tooltip_t": [0, 2], "definit": 0, "conveni": 0, "tooltip_t": 0, "pair": 0, "kansas_city_coord": [0, 2], "39": 0, "085594": 0, "94": 0, "585241": 0, "local_root": 0, "project_access_token": 0, "manag": 0, "excel": [0, 3], "spreadsheet": 0, "look": 0, "relev": 0, "filter": 0, "cogno": 0, "dataset": 0, "_multi_output": 0, "xlsx": 0, "my": 0, "msm": 0, "get_multi_scenario_data": [0, 2], "write_data_to_excel": [0, 2], "add_data_file_to_project": [0, 2], "cp4dv2": 0, "env_is_wscloud": [0, 2], "get_all_scenario_nam": [0, 2], "get_scenarios_df": [0, 2], "get_data_directori": [0, 2], "get_dd_client": [0, 2], "client": [0, 3], "dd_scenario": 0, "get_root_directori": [0, 2], "dsx": 0, "rais": 0, "valueerror": 0, "ones": 0, "more": [0, 3], "later": 0, "load_data_from_scenario": [0, 2], "faster": 0, "merge_scenario_data": [0, 2], "data_by_scenario": 0, "excel_file_nam": 0, "myprogresslisten": [0, 2], "mp": 0, "c": 0, "common": 0, "dse_do_utils_publicgithub": 0, "decis": [0, 3], "utilities_v3": 0, "venv": 0, "lib": 0, "site": 0, "solutionlisten": 0, "notify_progress": [0, 2], "progress_data": 0, "progressdata": 0, "about": 0, "point": 0, "tree": 0, "myoptimizationengin": 0, "solve_kwarg": 0, "export_lp": [0, 2], "export_sav": [0, 2], "export_lp_path": [0, 2], "is_cpo_model": 0, "add_mip_progress_kpi": [0, 2], "mip_gap_kpi_nam": 0, "gap": [0, 3], "solve_time_kpi_nam": 0, "best_bound_kpi_nam": 0, "best": 0, "bound": 0, "solution_count_kpi_nam": 0, "count": 0, "solve_phase_kpi_nam": 0, "phase": 0, "binary_var_seri": [0, 2], "karg": 0, "binaryvartyp": 0, "binary_var_series_": [0, 2], "core": 0, "continuous_var_seri": [0, 2], "continuousvartyp": 0, "continuous_var_series_": [0, 2], "cp_binary_var_seri": [0, 2], "cp": [0, 3], "cpointvar": 0, "cp_binary_var_series_": [0, 2], "cpomodel": 0, "integer_var_list": 0, "ibmdecisionoptim": 0, "binary_var_list": 0, "cp_integer_var_seri": [0, 2], "cp_integer_var_series_": [0, 2], "cp_integer_var_series_s_v2": [0, 2], "min": 0, "max": 0, "domain": 0, "uniqu": 0, "_": 0, "xdvar_1_2_3": 0, "cp_interval_var_seri": [0, 2], "cpointervalvar": 0, "cp_interval_var_series_": [0, 2], "interval_var_list": 0, "highlight": 0, "create_do_model": [0, 2], "union": 0, "kwag": 0, "export_as_cpo": [0, 2], "copy_to_csv": 0, "cpo": 0, "dsx_project_dir": 0, "local": [0, 2], "filenam": 0, "lp": [0, 3], "establish": 0, "export_as_cpo_": [0, 2], "export_model": 0, "export_as_lp": [0, 2], "export_as_lp_path": [0, 2], "lp_file_nam": 0, "my_lp_fil": 0, "conflict": 0, "which": 0, "signatur": 0, "export_as_lp_": [0, 2], "get_kpi_output_t": [0, 2], "integer_var_seri": [0, 2], "most": 0, "effect": 0, "practic": 0, "xdvar": 0, "integervartyp": 0, "integer_var_series_": [0, 2], "semicontinuous_var_seri": [0, 2], "lb": 0, "semicontinuousvartyp": 0, "semicontinuous_var_series_": [0, 2], "semiinteger_var_seri": [0, 2], "semiintegervartyp": 0, "semiinteger_var_series_": [0, 2], "refine_conflict": 0, "solvesolut": 0, "plotli": 0, "get_dash_tab_layout_m": [0, 2], "page_id": 0, "Not": 0, "dse_do_dashboard": 0, "On": 0, "get_tab_layout_": 0, "dash": 0, "dashboard": 0, "get_multi_scenario_compare_select": [0, 2], "compar": 0, "get_multi_scenario_t": [0, 2], "scenario_seq": 0, "get_plotly_fig_m": [0, 2], "callback": 0, "fig": 0, "get_reference_scenario_compare_select": [0, 2], "refer": 0, "plotly_kpi_compare_bar_chart": [0, 2], "figs_per_row": 0, "orient": 0, "v": 0, "graph_obj": 0, "_figur": 0, "figur": 0, "go": 0, "plotlyrowsvisualizationpag": 0, "its": 0, "own": 0, "checkbox": 0, "per": 0, "horizont": 0, "vertic": 0, "autoscenariodbt": [0, 2], "db_table_nam": 0, "scenariodbt": [0, 2], "design": [0, 3], "regular": 0, "At": 0, "create_schema": [0, 2], "insert_table_in_db_bulk": [0, 2], "sqlalchemi": 0, "advantag": 0, "No": 0, "disadvantag": 0, "primari": 0, "foreign": 0, "relat": 0, "thu": 0, "check": 0, "miss": 0, "relationship": 0, "mean": 0, "cannot": 0, "happen": 0, "structur": 0, "create_table_metadata": [0, 2], "metadata": 0, "schema": 0, "multi_scenario": 0, "reflect": 0, "dure": 0, "get_sa_t": [0, 2], "mgr": 0, "connect": [0, 3], "being": 0, "transact": 0, "businesskpit": [0, 2], "business_kpi": 0, "extended_columns_metadata": 0, "databasetyp": [0, 2], "enum": 0, "__init__": 0, "db": 0, "db2": [0, 2], "postgresql": [0, 2], "sqlite": [0, 2], "dbcellupd": [0, 2], "row_index": [0, 2], "current_valu": [0, 2], "previous_valu": [0, 2], "row_idx": [0, 2], "kpitabl": [0, 2], "parametert": [0, 2], "input_db_t": 0, "output_db_t": 0, "credenti": 0, "echo": 0, "enable_transact": 0, "enable_sqlite_fk": 0, "enable_astyp": 0, "enable_debug_print": 0, "enable_scenario_seq": [0, 2], "db_type": 0, "use_custom_naming_convent": 0, "document": [0, 3], "add_scenario_name_to_df": [0, 2], "overwrit": 0, "alreadi": 0, "add_scenario_seq_to_df": [0, 2], "scenarioseq": 0, "delete_scenario_from_db": [0, 2], "enabl": 0, "delete_scenario_name_column": [0, 2], "delete_scenario_seq_column": [0, 2], "drop_all_t": [0, 2], "duplicate_scenario_in_db": [0, 2], "source_scenario_nam": 0, "target_scenario_nam": 0, "duplic": 0, "get_custom_naming_convent": [0, 2], "convent": 0, "en": 0, "constraint": 0, "get_scenario_db_t": [0, 2], "get_scenario_sa_t": [0, 2], "cach": 0, "procedur": 0, "dodashapp": 0, "insert_scenarios_from_zip": [0, 2], "filepath": 0, "skip": 0, "insert_scenarios_in_db": [0, 2], "bulk": 0, "back": 0, "evalu": 0, "insert_table_row": [0, 2], "scenario_table_nam": 0, "insert_tables_in_db": [0, 2], "auto_insert": 0, "wa": 0, "attempt": 0, "without": 0, "you": 0, "want": 0, "read_multi_scenario_tables_from_db": [0, 2], "input_table_nam": 0, "output_table_nam": 0, "read": [0, 1], "empti": 0, "read_scenario_from_db": [0, 2], "multi_thread": 0, "lead": 0, "perform": 0, "improv": 0, "fix": 0, "omit": 0, "read_scenario_input_tables_from_db": [0, 2], "alwai": 0, "read_scenario_table_from_db": [0, 2], "read_scenario_tables_from_db": [0, 2], "rename_scenario_in_db": [0, 2], "replace_scenario_in_db": [0, 2], "ordereddict": 0, "replace_scenario_tables_in_db": [0, 2], "untest": 0, "update_cell_changes_in_db": [0, 2], "db_cell_upd": 0, "update_scenario_output_tables_in_db": [0, 2], "given": 0, "touch": 0, "effici": 0, "update_table_row": [0, 2], "upsert_table_row": [0, 2], "columns_metadata": 0, "constraints_metadata": 0, "abc": 0, "abstract": 0, "subclass": [0, 3], "add_scenario_name_to_fk_constraint": [0, 2], "fkc": 0, "foreignkeyconstraint": 0, "add_scenario_seq_to_fk_constraint": [0, 2], "camel_case_to_snake_cas": [0, 2], "dbm": [0, 2], "df_column_names_to_snake_cas": [0, 2], "camelcas": 0, "snake_cas": 0, "extend_columns_constraint": [0, 2], "sql": 0, "columns_ext": 0, "constraints_ext": 0, "scenariodbtablesubclass": 0, "help": 0, "mutabl": 0, "mykei": 0, "primary_kei": 0, "myvalu": 0, "fixnannonenul": [0, 2], "nan": 0, "turn": 0, "null": 0, "vt20230106": 0, "incarn": 0, "potenti": 0, "na": 0, "get_db_table_nam": [0, 2], "get_df_column_nam": [0, 2], "present": 0, "get_df_column_names_2": [0, 2], "vt": 0, "20220829": 0, "db_tabl": 0, "table_metadata": 0, "properli": 0, "simpli": 0, "truncat": 0, "length": 0, "less": 0, "proper": 0, "reduc": 0, "get_sa_column": [0, 2], "db_column_nam": 0, "astyp": 0, "datatyp": 0, "sqlachemi": 0, "resolve_metadata_column_conflict": [0, 2], "sqlcol": [0, 2], "scenarioseqt": [0, 2], "scenariot": [0, 2], "enumer": 0, "cpd25": [0, 2], "cpd40": [0, 2], "template_scenario_nam": [0, 2], "local_relative_data_path": 0, "data_directori": 0, "sheet": 0, "__index__": 0, "keep": 0, "track": 0, "restor": 0, "31": 0, "mymodel": 0, "myexcelfil": 0, "overwritten": 0, "sm": 0, "scenario_1": 0, "load_data_from_excel": [0, 2], "write_data_into_scenario": [0, 2], "dd": [0, 3], "ignor": [0, 3], "excel_test": 0, "excel_output_file_nam": 0, "csv_directori": 0, "load_data_from_csv": [0, 2], "myexcelfileoutput": 0, "add_data_file_to_project_": [0, 2], "never": 0, "cp4daa": [0, 3], "add_data_file_using_project_lib": [0, 2], "wsuser": 0, "add_data_file_using_ws_lib": [0, 2], "ibm_watson_studio_lib": 0, "cp4dv4": 0, "add_data_file_using_ws_lib_": [0, 2], "add_data_into_scenario": [0, 2], "add_data_into_scenario_": [0, 2], "explicitli": 0, "could": 0, "add_file_as_data_asset": [0, 2], "regist": 0, "add_file_as_data_asset_": [0, 2], "2022": 0, "01": 0, "21": 0, "incorrect": 0, "cpsaa": 0, "autodetect": 0, "clear_scenario_data": [0, 2], "categori": 0, "create_new_scenario": [0, 2], "model_build": 0, "new_scenario_nam": 0, "therebi": 0, "decision_optimization_cli": 0, "detect_platform": [0, 2], "env_is_cpd25": [0, 2], "env_is_cpd40": [0, 2], "cpdv4": [0, 1], "access_project_or_spac": 0, "wslib": 0, "howev": [0, 3], "ugli": 0, "error": 0, "warn": 0, "env_is_dsx": [0, 2], "export_model_as_lp": [0, 2], "exclud": 0, "modelbuild": 0, "get_do_scenario": [0, 2], "entiti": 0, "get_kpis_table_as_datafram": [0, 2], "compat": 0, "represent": 0, "do4w": 0, "get_unique_file_nam": [0, 2], "load_data": [0, 2], "load_from_excel": 0, "input_csv_name_pattern": 0, "output_csv_name_pattern": 0, "glob": 0, "rel": 0, "read_csv": 0, "load_data_from_csv_": [0, 2], "csv_name_pattern": 0, "root_dir": 0, "load_data_from_excel_": [0, 2], "xl": 0, "excelfil": 0, "table_index_sheet": 0, "_table_index_": 0, "df_dict": 0, "driven": 0, "off": 0, "certain": 0, "applic": 0, "restrict": 0, "wil": 0, "those": 0, "categor": 0, "accordingli": 0, "thei": 0, "translat": 0, "abbrevi": 0, "load_data_from_parquet": [0, 2], "input_name_pattern": 0, "parquet": 0, "output_name_pattern": 0, "read_parquet": 0, "load_data_from_parquet_": [0, 2], "file_name_pattern": 0, "load_data_from_scenario_": [0, 2], "load_data_from_zip_csv_": [0, 2], "zip_file_path": 0, "file_size_limit": 0, "byte": 0, "impli": 0, "print_table_nam": [0, 2], "replace_data_in_scenario": [0, 2], "replace_data_into_scenario_": [0, 2], "update_solve_output_into_scenario": [0, 2], "write_data_into_scenario_": [0, 2], "reliabl": 0, "write_data_to_csv": [0, 2], "arg": 0, "write_data_to_csv_": [0, 2], "unique_file_nam": 0, "_output": 0, "throw": 0, "permissionerror": 0, "flag": 0, "write_data_to_excel_": [0, 2], "writer": 0, "excelwrit": 0, "due": 0, "charact": 0, "record": 0, "write_data_to_parquet": [0, 2], "write_data_to_parquet_": [0, 2], "write_data_to_zip_csv_": [0, 2], "to_csv": 0, "widget": [0, 2], "sp": 0, "my_do_model": 0, "get_scenario_picker_ui": [0, 2], "load_selected_scenario_data": [0, 2], "down": [0, 3], "box": 0, "refresh": 0, "maintain": 0, "default_scenario": [0, 2], "therefor": 0, "last": 0, "my_default_scenario": 0, "picker": 0, "forc": 0, "scenariorefreshbutton": [0, 2], "inner": 0, "get_scenario_refresh_button": [0, 2], "get_scenario_select_drop_down": [0, 2], "dropdown": 0, "get_selected_scenario": [0, 2], "ipywidget": 0, "runconfig": [0, 2], "insert_inputs_in_db": [0, 2], "insert_outputs_in_db": [0, 2], "new_schema": [0, 2], "insert_in_do": [0, 2], "write_output_to_excel": [0, 2], "enable_data_check": [0, 2], "enable_data_check_output": [0, 2], "data_check_bulk_insert": [0, 2], "log_level": [0, 2], "enable_refine_conflict": [0, 2], "scenarioconfig": [0, 2], "scenario_x": 0, "scenariogener": [0, 2], "scenario_config": 0, "sc": 0, "variat": 0, "implement": 0, "myscenariogener": 0, "generate_scenario": [0, 2], "new_input": 0, "mytable1": 0, "generate_my_table1": 0, "reset_index": 0, "mytable2": 0, "generate_my_table2": 0, "base_input": 0, "generate_my_t": 0, "get_paramet": [0, 2], "scenario_db_manag": 0, "optimization_engine_class": 0, "core01optimizationengin": 0, "data_manager_class": 0, "core01datamanag": 0, "scenario_db_manager_class": 0, "scenario_generator_class": 0, "my_model": 0, "local_platform": 0, "fine": 0, "though": 0, "create_new_db_schema": [0, 2], "data_check_input": [0, 2], "data_check": 0, "deepcopi": 0, "alter": 0, "basic": [0, 3], "resolv": 0, "granular": 0, "data_check_output": [0, 2], "deriv": 0, "baselin": 0, "specif": 0, "run_config": 0, "load_input_data_from_excel": [0, 2], "run_model": [0, 2], "run_multipl": [0, 2], "run_onc": [0, 2], "write_output_data_to_excel": [0, 2], "add_sys_path": [0, 2], "new_path": 0, "sy": 0, "www": 0, "oreilli": 0, "cookbook": 0, "0596001673": 0, "ch04s23": 0, "challeng": 0, "better": 0, "do_util": 0, "convert_s": [0, 2], "size_byt": 0, "describ": 0, "5194057": 0, "df_itertuples_with_index_nam": [0, 2], "itertupl": 0, "much": 0, "easier": 0, "normal": 0, "index_a": 0, "index_b": 0, "know": 0, "from_product": 0, "rang": 0, "my_column": 0, "len": 0, "over": 0, "tail": 0, "inspir": 0, "46151666": 0, "iter": 0, "list_file_hierarchi": [0, 2], "startpath": 0, "hierarch": 0, "current_dir": 0, "getcwd": 0, "parent_dir": 0, "abspath": 0, "pardir": 0, "parent_dir_2": 0, "grand": 0, "parent": 0, "truth": 0, "setup": 0, "conf": 0, "popul": 0, "458550": 0, "standard": 0, "emb": 0, "dse_do_util": 1, "scope": 1, "modul": [1, 2], "packag": [1, 2, 3], "submodul": 2, "cpd25util": 2, "datamanag": [2, 3], "deployeddomodel": 2, "domodeldeploy": 2, "domodelexport": 2, "mapmanag": [2, 3], "multiscenariomanag": 2, "optimizationengin": [2, 3], "plotly_cpd_workaround": 2, "plotlymanag": 2, "scenariodbmanag": 2, "scenariomanag": [2, 3], "scenariopick": [2, 3], "scenariorunn": 2, "util": [2, 3], "version": [2, 3], "content": 2, "pak": 3, "githubpag": 3, "v0": 3, "neither": 3, "spreadhseet": 3, "mostli": 3, "script": 3, "share": 3, "manipul": 3, "crossjoin": 3, "pick": 3, "v4": 3, "channel": 3, "pypi": 3, "air": 3, "internet": 3, "wheel": 3, "yaml": 3, "userf": 3, "5b4": 3, "py3": 3, "whl": 3, "put": 3, "move": 3, "installationreadm": 3, "detail": 3, "ore": 3, "cp4d": 3, "prem": 3, "might": 3, "intend": 3, "outsid": 3, "interfac": 3}, "objects": {"": [[0, 0, 0, "-", "dse_do_utils"]], "dse_do_utils": [[0, 0, 0, "-", "cpd25utilities"], [0, 0, 0, "-", "datamanager"], [0, 0, 0, "-", "deployeddomodel"], [0, 0, 0, "-", "domodeldeployer"], [0, 0, 0, "-", "domodelexporter"], [0, 0, 0, "-", "mapmanager"], [0, 0, 0, "-", "multiscenariomanager"], [0, 0, 0, "-", "optimizationengine"], [0, 0, 0, "-", "plotly_cpd_workaround"], [0, 0, 0, "-", "plotlymanager"], [0, 0, 0, "-", "scenariodbmanager"], [0, 0, 0, "-", "scenariomanager"], [0, 0, 0, "-", "scenariopicker"], [0, 0, 0, "-", "scenariorunner"], [0, 0, 0, "-", "utilities"], [0, 0, 0, "-", "version"]], "dse_do_utils.cpd25utilities": [[0, 1, 1, "", "add_file_as_data_asset_cpd25"], [0, 1, 1, "", "add_file_path_as_data_asset_cpd25"], [0, 1, 1, "", "add_file_path_as_data_asset_wsc"], [0, 1, 1, "", "write_data_asset_as_file_cpd25"], [0, 1, 1, "", "write_data_asset_as_file_wsc"]], "dse_do_utils.datamanager": [[0, 2, 1, "", "DataManager"]], "dse_do_utils.datamanager.DataManager": [[0, 3, 1, "", "apply_and_concat"], [0, 3, 1, "", "df_crossjoin_ai"], [0, 3, 1, "", "df_crossjoin_mi"], [0, 3, 1, "", "df_crossjoin_si"], [0, 3, 1, "", "extract_solution"], [0, 3, 1, "", "get_parameter_value"], [0, 3, 1, "", "get_raw_table_by_name"], [0, 3, 1, "", "prep_parameters"], [0, 3, 1, "", "prepare_data_frames"], [0, 3, 1, "", "prepare_input_data_frames"], [0, 3, 1, "", "prepare_output_data_frames"], [0, 3, 1, "", "print_hello"], [0, 3, 1, "", "print_inputs_outputs_summary"], [0, 3, 1, "", "set_parameters"]], "dse_do_utils.deployeddomodel": [[0, 2, 1, "", "DeployedDOModel"]], "dse_do_utils.deployeddomodel.DeployedDOModel": [[0, 3, 1, "", "execute_model_v2"], [0, 3, 1, "", "extract_solution_v2"], [0, 3, 1, "", "get_deployment_id"], [0, 3, 1, "", "get_job_status"], [0, 3, 1, "", "get_job_status_v2"], [0, 3, 1, "", "get_log"], [0, 3, 1, "", "get_outputs"], [0, 3, 1, "", "get_solve_details"], [0, 3, 1, "", "get_solve_details_objective"], [0, 3, 1, "", "get_solve_payload"], [0, 3, 1, "", "get_solve_status"], [0, 3, 1, "", "get_space_id"], [0, 3, 1, "", "monitor_execution_v2"], [0, 3, 1, "", "solve"], [0, 3, 1, "", "solve_v2"]], "dse_do_utils.domodeldeployer": [[0, 2, 1, "", "DOModelDeployer"], [0, 2, 1, "", "DOModelDeployerLocal"]], "dse_do_utils.domodeldeployer.DOModelDeployer": [[0, 3, 1, "", "create_archive"], [0, 3, 1, "", "create_model_archive"], [0, 3, 1, "", "create_model_directory"], [0, 3, 1, "", "create_package_extension"], [0, 3, 1, "", "create_software_specification"], [0, 3, 1, "", "create_zip_package_extension"], [0, 3, 1, "", "deploy_archive"], [0, 3, 1, "", "deploy_model"], [0, 3, 1, "", "get_scenario"], [0, 3, 1, "", "get_wml_create_deployment_meta_props"], [0, 3, 1, "", "get_wml_create_store_model_meta_props"], [0, 3, 1, "", "guid_from_space_name"], [0, 3, 1, "", "wml_create_deployment"], [0, 3, 1, "", "wml_store_model"], [0, 3, 1, "", "write_main_file"], [0, 3, 1, "", "write_yaml_file"]], "dse_do_utils.domodeldeployer.DOModelDeployerLocal": [[0, 3, 1, "", "create_archive"], [0, 3, 1, "", "create_model_archive"], [0, 3, 1, "", "create_model_directory"], [0, 3, 1, "", "create_package_extension"], [0, 3, 1, "", "create_software_specification"], [0, 3, 1, "", "create_zip_package_extension"], [0, 3, 1, "", "deploy_archive"], [0, 3, 1, "", "deploy_model"], [0, 3, 1, "", "get_model_py"], [0, 3, 1, "", "get_wml_create_deployment_meta_props"], [0, 3, 1, "", "get_wml_create_store_model_meta_props"], [0, 3, 1, "", "guid_from_space_name"], [0, 3, 1, "", "wml_create_deployment"], [0, 3, 1, "", "wml_store_model"], [0, 3, 1, "", "write_main_file"], [0, 3, 1, "", "write_yaml_file"]], "dse_do_utils.domodelexporter": [[0, 2, 1, "", "DOModelExporter"]], "dse_do_utils.domodelexporter.DOModelExporter": [[0, 3, 1, "", "export_do_models"], [0, 3, 1, "", "get_access_token_curl"], [0, 3, 1, "", "get_access_token_web"], [0, 3, 1, "", "get_do_model_export_curl"], [0, 3, 1, "", "get_do_model_export_web"], [0, 3, 1, "", "get_project_id"], [0, 3, 1, "", "write_do_model_to_file"]], "dse_do_utils.mapmanager": [[0, 2, 1, "", "MapManager"]], "dse_do_utils.mapmanager.MapManager": [[0, 3, 1, "", "add_bar_chart_in_map"], [0, 3, 1, "", "add_full_screen"], [0, 3, 1, "", "add_layer_control"], [0, 3, 1, "", "create_blank_map"], [0, 3, 1, "", "get_arrows"], [0, 3, 1, "", "get_bearing"], [0, 3, 1, "", "get_html_table"], [0, 3, 1, "", "get_popup_table"], [0, 3, 1, "", "get_tooltip_table"], [0, 4, 1, "", "kansas_city_coord"]], "dse_do_utils.multiscenariomanager": [[0, 2, 1, "", "MultiScenarioManager"]], "dse_do_utils.multiscenariomanager.MultiScenarioManager": [[0, 3, 1, "", "add_data_file_to_project"], [0, 3, 1, "", "env_is_wscloud"], [0, 3, 1, "", "get_all_scenario_names"], [0, 3, 1, "", "get_data_directory"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_multi_scenario_data"], [0, 3, 1, "", "get_root_directory"], [0, 3, 1, "", "get_scenarios_df"], [0, 3, 1, "", "load_data_from_scenario"], [0, 3, 1, "", "merge_scenario_data"], [0, 3, 1, "", "write_data_to_excel"]], "dse_do_utils.optimizationengine": [[0, 2, 1, "", "MyProgressListener"], [0, 2, 1, "", "OptimizationEngine"]], "dse_do_utils.optimizationengine.MyProgressListener": [[0, 3, 1, "", "notify_progress"]], "dse_do_utils.optimizationengine.OptimizationEngine": [[0, 3, 1, "", "add_mip_progress_kpis"], [0, 3, 1, "", "binary_var_series"], [0, 3, 1, "", "binary_var_series_s"], [0, 3, 1, "", "continuous_var_series"], [0, 3, 1, "", "continuous_var_series_s"], [0, 3, 1, "", "cp_binary_var_series"], [0, 3, 1, "", "cp_binary_var_series_s"], [0, 3, 1, "", "cp_integer_var_series"], [0, 3, 1, "", "cp_integer_var_series_s"], [0, 3, 1, "", "cp_integer_var_series_s_v2"], [0, 3, 1, "", "cp_interval_var_series"], [0, 3, 1, "", "cp_interval_var_series_s"], [0, 3, 1, "", "create_do_model"], [0, 3, 1, "", "export_as_cpo"], [0, 3, 1, "", "export_as_cpo_s"], [0, 3, 1, "", "export_as_lp"], [0, 3, 1, "", "export_as_lp_path"], [0, 3, 1, "", "export_as_lp_s"], [0, 3, 1, "", "get_kpi_output_table"], [0, 3, 1, "", "integer_var_series"], [0, 3, 1, "", "integer_var_series_s"], [0, 3, 1, "", "semicontinuous_var_series"], [0, 3, 1, "", "semicontinuous_var_series_s"], [0, 3, 1, "", "semiinteger_var_series"], [0, 3, 1, "", "semiinteger_var_series_s"], [0, 3, 1, "", "solve"]], "dse_do_utils.plotlymanager": [[0, 2, 1, "", "PlotlyManager"]], "dse_do_utils.plotlymanager.PlotlyManager": [[0, 3, 1, "", "get_dash_tab_layout_m"], [0, 3, 1, "", "get_multi_scenario_compare_selected"], [0, 3, 1, "", "get_multi_scenario_table"], [0, 3, 1, "", "get_plotly_fig_m"], [0, 3, 1, "", "get_reference_scenario_compare_selected"], [0, 3, 1, "", "plotly_kpi_compare_bar_charts"]], "dse_do_utils.scenariodbmanager": [[0, 2, 1, "", "AutoScenarioDbTable"], [0, 2, 1, "", "BusinessKpiTable"], [0, 2, 1, "", "DatabaseType"], [0, 2, 1, "", "DbCellUpdate"], [0, 2, 1, "", "KpiTable"], [0, 2, 1, "", "ParameterTable"], [0, 2, 1, "", "ScenarioDbManager"], [0, 2, 1, "", "ScenarioDbTable"], [0, 2, 1, "", "ScenarioSeqTable"], [0, 2, 1, "", "ScenarioTable"]], "dse_do_utils.scenariodbmanager.AutoScenarioDbTable": [[0, 3, 1, "", "create_table_metadata"], [0, 3, 1, "", "get_sa_table"], [0, 3, 1, "", "insert_table_in_db_bulk"]], "dse_do_utils.scenariodbmanager.DatabaseType": [[0, 4, 1, "", "DB2"], [0, 4, 1, "", "PostgreSQL"], [0, 4, 1, "", "SQLite"]], "dse_do_utils.scenariodbmanager.DbCellUpdate": [[0, 4, 1, "", "column_name"], [0, 4, 1, "", "current_value"], [0, 4, 1, "", "previous_value"], [0, 4, 1, "", "row_idx"], [0, 4, 1, "", "row_index"], [0, 4, 1, "", "scenario_name"], [0, 4, 1, "", "table_name"]], "dse_do_utils.scenariodbmanager.ScenarioDbManager": [[0, 3, 1, "", "add_scenario_name_to_dfs"], [0, 3, 1, "", "add_scenario_seq_to_dfs"], [0, 3, 1, "", "create_schema"], [0, 3, 1, "", "delete_scenario_from_db"], [0, 3, 1, "", "delete_scenario_name_column"], [0, 3, 1, "", "delete_scenario_seq_column"], [0, 3, 1, "", "drop_all_tables"], [0, 3, 1, "", "duplicate_scenario_in_db"], [0, 3, 1, "", "get_custom_naming_convention"], [0, 3, 1, "", "get_scenario_db_table"], [0, 3, 1, "", "get_scenario_sa_table"], [0, 3, 1, "", "get_scenarios_df"], [0, 3, 1, "", "insert_scenarios_from_zip"], [0, 3, 1, "", "insert_scenarios_in_db"], [0, 3, 1, "", "insert_table_row"], [0, 3, 1, "", "insert_tables_in_db"], [0, 3, 1, "", "read_multi_scenario_tables_from_db"], [0, 3, 1, "", "read_scenario_from_db"], [0, 3, 1, "", "read_scenario_input_tables_from_db"], [0, 3, 1, "", "read_scenario_table_from_db"], [0, 3, 1, "", "read_scenario_tables_from_db"], [0, 3, 1, "", "rename_scenario_in_db"], [0, 3, 1, "", "replace_scenario_in_db"], [0, 3, 1, "", "replace_scenario_tables_in_db"], [0, 3, 1, "", "update_cell_changes_in_db"], [0, 3, 1, "", "update_scenario_output_tables_in_db"], [0, 3, 1, "", "update_table_row"], [0, 3, 1, "", "upsert_table_row"]], "dse_do_utils.scenariodbmanager.ScenarioDbTable": [[0, 3, 1, "", "add_scenario_name_to_fk_constraint"], [0, 3, 1, "", "add_scenario_seq_to_fk_constraint"], [0, 3, 1, "", "camel_case_to_snake_case"], [0, 3, 1, "", "create_table_metadata"], [0, 5, 1, "", "dbm"], [0, 3, 1, "", "df_column_names_to_snake_case"], [0, 5, 1, "", "enable_scenario_seq"], [0, 3, 1, "", "extend_columns_constraints"], [0, 3, 1, "", "fixNanNoneNull"], [0, 3, 1, "", "get_db_table_name"], [0, 3, 1, "", "get_df_column_names"], [0, 3, 1, "", "get_df_column_names_2"], [0, 3, 1, "", "get_sa_column"], [0, 3, 1, "", "get_sa_table"], [0, 3, 1, "", "insert_table_in_db_bulk"], [0, 3, 1, "", "resolve_metadata_column_conflicts"], [0, 3, 1, "", "sqlcol"]], "dse_do_utils.scenariomanager": [[0, 2, 1, "", "Platform"], [0, 2, 1, "", "ScenarioManager"]], "dse_do_utils.scenariomanager.Platform": [[0, 4, 1, "", "CPD25"], [0, 4, 1, "", "CPD40"], [0, 4, 1, "", "CPDaaS"], [0, 4, 1, "", "Local"]], "dse_do_utils.scenariomanager.ScenarioManager": [[0, 3, 1, "", "add_data_file_to_project_s"], [0, 3, 1, "", "add_data_file_using_project_lib"], [0, 3, 1, "", "add_data_file_using_ws_lib"], [0, 3, 1, "", "add_data_file_using_ws_lib_s"], [0, 3, 1, "", "add_data_into_scenario"], [0, 3, 1, "", "add_data_into_scenario_s"], [0, 3, 1, "", "add_file_as_data_asset"], [0, 3, 1, "", "add_file_as_data_asset_s"], [0, 3, 1, "", "clear_scenario_data"], [0, 3, 1, "", "create_new_scenario"], [0, 3, 1, "", "detect_platform"], [0, 3, 1, "", "env_is_cpd25"], [0, 3, 1, "", "env_is_cpd40"], [0, 3, 1, "", "env_is_dsx"], [0, 3, 1, "", "env_is_wscloud"], [0, 3, 1, "", "export_model_as_lp"], [0, 3, 1, "", "get_data_directory"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_do_scenario"], [0, 3, 1, "", "get_kpis_table_as_dataframe"], [0, 3, 1, "", "get_root_directory"], [0, 3, 1, "", "get_unique_file_name"], [0, 3, 1, "", "insert_scenarios_from_zip"], [0, 3, 1, "", "load_data"], [0, 3, 1, "", "load_data_from_csv"], [0, 3, 1, "", "load_data_from_csv_s"], [0, 3, 1, "", "load_data_from_excel"], [0, 3, 1, "", "load_data_from_excel_s"], [0, 3, 1, "", "load_data_from_parquet"], [0, 3, 1, "", "load_data_from_parquet_s"], [0, 3, 1, "", "load_data_from_scenario"], [0, 3, 1, "", "load_data_from_scenario_s"], [0, 3, 1, "", "load_data_from_zip_csv_s"], [0, 3, 1, "", "print_table_names"], [0, 3, 1, "", "replace_data_in_scenario"], [0, 3, 1, "", "replace_data_into_scenario_s"], [0, 3, 1, "", "update_solve_output_into_scenario"], [0, 3, 1, "", "write_data_into_scenario"], [0, 3, 1, "", "write_data_into_scenario_s"], [0, 3, 1, "", "write_data_to_csv"], [0, 3, 1, "", "write_data_to_csv_s"], [0, 3, 1, "", "write_data_to_excel"], [0, 3, 1, "", "write_data_to_excel_s"], [0, 3, 1, "", "write_data_to_parquet"], [0, 3, 1, "", "write_data_to_parquet_s"], [0, 3, 1, "", "write_data_to_zip_csv_s"]], "dse_do_utils.scenariopicker": [[0, 2, 1, "", "ScenarioPicker"]], "dse_do_utils.scenariopicker.ScenarioPicker": [[0, 2, 1, "", "ScenarioRefreshButton"], [0, 4, 1, "", "default_scenario"], [0, 3, 1, "", "get_dd_client"], [0, 3, 1, "", "get_scenario_picker_ui"], [0, 3, 1, "", "get_scenario_refresh_button"], [0, 3, 1, "", "get_scenario_select_drop_down"], [0, 3, 1, "", "get_selected_scenario"], [0, 3, 1, "", "load_selected_scenario_data"], [0, 4, 1, "", "widgets"]], "dse_do_utils.scenariorunner": [[0, 2, 1, "", "RunConfig"], [0, 2, 1, "", "ScenarioConfig"], [0, 2, 1, "", "ScenarioGenerator"], [0, 2, 1, "", "ScenarioRunner"]], "dse_do_utils.scenariorunner.RunConfig": [[0, 4, 1, "", "data_check_bulk_insert"], [0, 4, 1, "", "do_model_name"], [0, 4, 1, "", "enable_data_check"], [0, 4, 1, "", "enable_data_check_outputs"], [0, 4, 1, "", "enable_refine_conflict"], [0, 4, 1, "", "export_lp"], [0, 4, 1, "", "export_lp_path"], [0, 4, 1, "", "export_sav"], [0, 4, 1, "", "insert_in_do"], [0, 4, 1, "", "insert_inputs_in_db"], [0, 4, 1, "", "insert_outputs_in_db"], [0, 4, 1, "", "log_level"], [0, 4, 1, "", "new_schema"], [0, 4, 1, "", "template_scenario_name"], [0, 4, 1, "", "write_output_to_excel"]], "dse_do_utils.scenariorunner.ScenarioConfig": [[0, 4, 1, "", "parameters"], [0, 4, 1, "", "scenario_name"]], "dse_do_utils.scenariorunner.ScenarioGenerator": [[0, 3, 1, "", "generate_scenario"], [0, 3, 1, "", "get_parameters"]], "dse_do_utils.scenariorunner.ScenarioRunner": [[0, 3, 1, "", "create_new_db_schema"], [0, 3, 1, "", "data_check_inputs"], [0, 3, 1, "", "data_check_outputs"], [0, 3, 1, "", "generate_scenario"], [0, 3, 1, "", "insert_in_do"], [0, 3, 1, "", "insert_inputs_in_db"], [0, 3, 1, "", "insert_outputs_in_db"], [0, 3, 1, "", "load_input_data_from_excel"], [0, 3, 1, "", "run_model"], [0, 3, 1, "", "run_multiple"], [0, 3, 1, "", "run_once"], [0, 3, 1, "", "write_output_data_to_excel"]], "dse_do_utils.utilities": [[0, 1, 1, "", "add_sys_path"], [0, 1, 1, "", "convert_size"], [0, 1, 1, "", "df_itertuples_with_index_names"], [0, 1, 1, "", "list_file_hierarchy"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method", "4": "py:attribute", "5": "py:property"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "property", "Python property"]}, "titleterms": {"dse_do_util": [0, 2, 3], "packag": 0, "submodul": 0, "cpd25util": 0, "modul": [0, 3], "datamanag": 0, "deployeddomodel": 0, "domodeldeploy": 0, "domodelexport": 0, "mapmanag": 0, "multiscenariomanag": 0, "optimizationengin": 0, "plotly_cpd_workaround": 0, "plotlymanag": 0, "scenariodbmanag": 0, "scenariomanag": 0, "scenariopick": 0, "scenariorunn": 0, "util": [0, 1], "version": 0, "content": [0, 1], "welcom": 1, "dse": 1, "do": [1, 3], "document": 1, "indic": 1, "tabl": 1, "read": 3, "me": 3, "import": 3, "main": 3, "class": 3, "instal": 3, "cpdv4": 3, "5": 3, "custom": 3, "environ": 3, "target": 3, "model": 3, "builder": 3, "wml": 3, "scope": 3, "requir": 3}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"dse_do_utils package": [[0, "dse-do-utils-package"]], "Submodules": [[0, "submodules"]], "dse_do_utils.cpd25utilities module": [[0, "module-dse_do_utils.cpd25utilities"]], "dse_do_utils.datamanager module": [[0, "module-dse_do_utils.datamanager"]], "dse_do_utils.deployeddomodel module": [[0, "module-dse_do_utils.deployeddomodel"]], "dse_do_utils.domodeldeployer module": [[0, "module-dse_do_utils.domodeldeployer"]], "dse_do_utils.domodelexporter module": [[0, "module-dse_do_utils.domodelexporter"]], "dse_do_utils.mapmanager module": [[0, "module-dse_do_utils.mapmanager"]], "dse_do_utils.multiscenariomanager module": [[0, "module-dse_do_utils.multiscenariomanager"]], "dse_do_utils.optimizationengine module": [[0, "module-dse_do_utils.optimizationengine"]], "dse_do_utils.plotly_cpd_workaround module": [[0, "module-dse_do_utils.plotly_cpd_workaround"]], "dse_do_utils.plotlymanager module": [[0, "module-dse_do_utils.plotlymanager"]], "dse_do_utils.scenariodbmanager module": [[0, "module-dse_do_utils.scenariodbmanager"]], "dse_do_utils.scenariomanager module": [[0, "module-dse_do_utils.scenariomanager"]], "dse_do_utils.scenariopicker module": [[0, "module-dse_do_utils.scenariopicker"]], "dse_do_utils.scenariorunner module": [[0, "module-dse_do_utils.scenariorunner"]], "dse_do_utils.utilities module": [[0, "module-dse_do_utils.utilities"]], "dse_do_utils.version module": [[0, "module-dse_do_utils.version"]], "Module contents": [[0, "module-dse_do_utils"]], "Welcome to DSE DO Utils documentation!": [[1, "welcome-to-dse-do-utils-documentation"]], "Contents:": [[1, null]], "Indices and tables": [[1, "indices-and-tables"]], "dse_do_utils": [[2, "dse-do-utils"]], "Read me": [[3, "read-me"]], "DSE_DO_Utils": [[3, "dse-do-utils"]], "Important": [[3, "important"]], "Main classes:": [[3, "main-classes"]], "Installation on CPDv4.5": [[3, "installation-on-cpdv4-5"]], "Install in customized environment": [[3, "install-in-customized-environment"]], "Import": [[3, "import"]], "Target environments": [[3, "target-environments"]], "DO Model Builder and WML environments": [[3, "do-model-builder-and-wml-environments"]], "Scope of classes/modules": [[3, "scope-of-classes-modules"]], "Requirements": [[3, "requirements"]]}, "indexentries": {"autoscenariodbtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable"]], "businesskpitable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.BusinessKpiTable"]], "cpd25 (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPD25"]], "cpd40 (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPD40"]], "cpdaas (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.CPDaaS"]], "db2 (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.DB2"]], "domodeldeployer (class in dse_do_utils.domodeldeployer)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer"]], "domodeldeployerlocal (class in dse_do_utils.domodeldeployer)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal"]], "domodelexporter (class in dse_do_utils.domodelexporter)": [[0, "dse_do_utils.domodelexporter.DOModelExporter"]], "datamanager (class in dse_do_utils.datamanager)": [[0, "dse_do_utils.datamanager.DataManager"]], "databasetype (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType"]], "dbcellupdate (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate"]], "deployeddomodel (class in dse_do_utils.deployeddomodel)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel"]], "kpitable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.KpiTable"]], "local (dse_do_utils.scenariomanager.platform attribute)": [[0, "dse_do_utils.scenariomanager.Platform.Local"]], "mapmanager (class in dse_do_utils.mapmanager)": [[0, "dse_do_utils.mapmanager.MapManager"]], "multiscenariomanager (class in dse_do_utils.multiscenariomanager)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager"]], "myprogresslistener (class in dse_do_utils.optimizationengine)": [[0, "dse_do_utils.optimizationengine.MyProgressListener"]], "optimizationengine (class in dse_do_utils.optimizationengine)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine"]], "parametertable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ParameterTable"]], "platform (class in dse_do_utils.scenariomanager)": [[0, "dse_do_utils.scenariomanager.Platform"]], "plotlymanager (class in dse_do_utils.plotlymanager)": [[0, "dse_do_utils.plotlymanager.PlotlyManager"]], "postgresql (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.PostgreSQL"]], "runconfig (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.RunConfig"]], "sqlite (dse_do_utils.scenariodbmanager.databasetype attribute)": [[0, "dse_do_utils.scenariodbmanager.DatabaseType.SQLite"]], "scenarioconfig (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig"]], "scenariodbmanager (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager"]], "scenariodbtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable"]], "scenariogenerator (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator"]], "scenariomanager (class in dse_do_utils.scenariomanager)": [[0, "dse_do_utils.scenariomanager.ScenarioManager"]], "scenariopicker (class in dse_do_utils.scenariopicker)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker"]], "scenariopicker.scenariorefreshbutton (class in dse_do_utils.scenariopicker)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.ScenarioRefreshButton"]], "scenariorunner (class in dse_do_utils.scenariorunner)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner"]], "scenarioseqtable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioSeqTable"]], "scenariotable (class in dse_do_utils.scenariodbmanager)": [[0, "dse_do_utils.scenariodbmanager.ScenarioTable"]], "add_bar_chart_in_map() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.add_bar_chart_in_map"]], "add_data_file_to_project() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.add_data_file_to_project"]], "add_data_file_to_project_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_to_project_s"]], "add_data_file_using_project_lib() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_project_lib"]], "add_data_file_using_ws_lib() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_ws_lib"]], "add_data_file_using_ws_lib_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_file_using_ws_lib_s"]], "add_data_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_into_scenario"]], "add_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_data_into_scenario_s"]], "add_file_as_data_asset() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_file_as_data_asset"]], "add_file_as_data_asset_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_as_data_asset_cpd25"]], "add_file_as_data_asset_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.add_file_as_data_asset_s"]], "add_file_path_as_data_asset_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_path_as_data_asset_cpd25"]], "add_file_path_as_data_asset_wsc() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.add_file_path_as_data_asset_wsc"]], "add_full_screen() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.add_full_screen"]], "add_layer_control() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.add_layer_control"]], "add_mip_progress_kpis() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.add_mip_progress_kpis"]], "add_scenario_name_to_dfs() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.add_scenario_name_to_dfs"]], "add_scenario_name_to_fk_constraint() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.add_scenario_name_to_fk_constraint"]], "add_scenario_seq_to_dfs() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.add_scenario_seq_to_dfs"]], "add_scenario_seq_to_fk_constraint() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.add_scenario_seq_to_fk_constraint"]], "add_sys_path() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.add_sys_path"]], "apply_and_concat() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.apply_and_concat"]], "binary_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.binary_var_series"]], "binary_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.binary_var_series_s"]], "camel_case_to_snake_case() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.camel_case_to_snake_case"]], "clear_scenario_data() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.clear_scenario_data"]], "column_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.column_name"]], "continuous_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.continuous_var_series"]], "continuous_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.continuous_var_series_s"]], "convert_size() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.convert_size"]], "cp_binary_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_binary_var_series"]], "cp_binary_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_binary_var_series_s"]], "cp_integer_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_integer_var_series"]], "cp_integer_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_integer_var_series_s"]], "cp_integer_var_series_s_v2() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_integer_var_series_s_v2"]], "cp_interval_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_interval_var_series"]], "cp_interval_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.cp_interval_var_series_s"]], "create_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_archive"]], "create_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_archive"]], "create_blank_map() (dse_do_utils.mapmanager.mapmanager method)": [[0, "dse_do_utils.mapmanager.MapManager.create_blank_map"]], "create_do_model() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.create_do_model"]], "create_model_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_model_archive"]], "create_model_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_model_archive"]], "create_model_directory() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_model_directory"]], "create_model_directory() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_model_directory"]], "create_new_db_schema() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.create_new_db_schema"]], "create_new_scenario() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.create_new_scenario"]], "create_package_extension() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_package_extension"]], "create_package_extension() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_package_extension"]], "create_schema() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.create_schema"]], "create_software_specification() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_software_specification"]], "create_software_specification() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_software_specification"]], "create_table_metadata() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.create_table_metadata"]], "create_table_metadata() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.create_table_metadata"]], "create_zip_package_extension() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.create_zip_package_extension"]], "create_zip_package_extension() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.create_zip_package_extension"]], "current_value (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.current_value"]], "data_check_bulk_insert (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.data_check_bulk_insert"]], "data_check_inputs() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.data_check_inputs"]], "data_check_outputs() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.data_check_outputs"]], "dbm (dse_do_utils.scenariodbmanager.scenariodbtable property)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.dbm"]], "default_scenario (dse_do_utils.scenariopicker.scenariopicker attribute)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.default_scenario"]], "delete_scenario_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_from_db"]], "delete_scenario_name_column() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_name_column"]], "delete_scenario_seq_column() (dse_do_utils.scenariodbmanager.scenariodbmanager static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.delete_scenario_seq_column"]], "deploy_archive() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.deploy_archive"]], "deploy_archive() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.deploy_archive"]], "deploy_model() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.deploy_model"]], "deploy_model() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.deploy_model"]], "detect_platform() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.detect_platform"]], "df_column_names_to_snake_case() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.df_column_names_to_snake_case"]], "df_crossjoin_ai() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_ai"]], "df_crossjoin_mi() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_mi"]], "df_crossjoin_si() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.df_crossjoin_si"]], "df_itertuples_with_index_names() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.df_itertuples_with_index_names"]], "do_model_name (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.do_model_name"]], "drop_all_tables() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.drop_all_tables"]], "dse_do_utils": [[0, "module-dse_do_utils"]], "dse_do_utils.cpd25utilities": [[0, "module-dse_do_utils.cpd25utilities"]], "dse_do_utils.datamanager": [[0, "module-dse_do_utils.datamanager"]], "dse_do_utils.deployeddomodel": [[0, "module-dse_do_utils.deployeddomodel"]], "dse_do_utils.domodeldeployer": [[0, "module-dse_do_utils.domodeldeployer"]], "dse_do_utils.domodelexporter": [[0, "module-dse_do_utils.domodelexporter"]], "dse_do_utils.mapmanager": [[0, "module-dse_do_utils.mapmanager"]], "dse_do_utils.multiscenariomanager": [[0, "module-dse_do_utils.multiscenariomanager"]], "dse_do_utils.optimizationengine": [[0, "module-dse_do_utils.optimizationengine"]], "dse_do_utils.plotly_cpd_workaround": [[0, "module-dse_do_utils.plotly_cpd_workaround"]], "dse_do_utils.plotlymanager": [[0, "module-dse_do_utils.plotlymanager"]], "dse_do_utils.scenariodbmanager": [[0, "module-dse_do_utils.scenariodbmanager"]], "dse_do_utils.scenariomanager": [[0, "module-dse_do_utils.scenariomanager"]], "dse_do_utils.scenariopicker": [[0, "module-dse_do_utils.scenariopicker"]], "dse_do_utils.scenariorunner": [[0, "module-dse_do_utils.scenariorunner"]], "dse_do_utils.utilities": [[0, "module-dse_do_utils.utilities"]], "dse_do_utils.version": [[0, "module-dse_do_utils.version"]], "duplicate_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.duplicate_scenario_in_db"]], "enable_data_check (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_data_check"]], "enable_data_check_outputs (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_data_check_outputs"]], "enable_refine_conflict (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.enable_refine_conflict"]], "enable_scenario_seq (dse_do_utils.scenariodbmanager.scenariodbtable property)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.enable_scenario_seq"]], "env_is_cpd25() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_cpd25"]], "env_is_cpd40() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_cpd40"]], "env_is_dsx() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_dsx"]], "env_is_wscloud() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.env_is_wscloud"]], "env_is_wscloud() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.env_is_wscloud"]], "execute_model_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.execute_model_v2"]], "export_as_cpo() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_cpo"]], "export_as_cpo_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_cpo_s"]], "export_as_lp() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp"]], "export_as_lp_path() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp_path"]], "export_as_lp_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.export_as_lp_s"]], "export_do_models() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.export_do_models"]], "export_lp (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_lp"]], "export_lp_path (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_lp_path"]], "export_model_as_lp() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.export_model_as_lp"]], "export_sav (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.export_sav"]], "extend_columns_constraints() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.extend_columns_constraints"]], "extract_solution() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.extract_solution"]], "extract_solution_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.extract_solution_v2"]], "fixnannonenull() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.fixNanNoneNull"]], "generate_scenario() (dse_do_utils.scenariorunner.scenariogenerator method)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator.generate_scenario"]], "generate_scenario() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.generate_scenario"]], "get_access_token_curl() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_access_token_curl"]], "get_access_token_web() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_access_token_web"]], "get_all_scenario_names() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_all_scenario_names"]], "get_arrows() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_arrows"]], "get_bearing() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_bearing"]], "get_custom_naming_convention() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_custom_naming_convention"]], "get_dash_tab_layout_m() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_dash_tab_layout_m"]], "get_data_directory() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_data_directory"]], "get_data_directory() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_data_directory"]], "get_db_table_name() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_db_table_name"]], "get_dd_client() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_dd_client"]], "get_dd_client() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_dd_client"]], "get_dd_client() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_dd_client"]], "get_deployment_id() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_deployment_id"]], "get_df_column_names() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_df_column_names"]], "get_df_column_names_2() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_df_column_names_2"]], "get_do_model_export_curl() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_do_model_export_curl"]], "get_do_model_export_web() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_do_model_export_web"]], "get_do_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_do_scenario"]], "get_html_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_html_table"]], "get_job_status() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_job_status"]], "get_job_status_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_job_status_v2"]], "get_kpi_output_table() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.get_kpi_output_table"]], "get_kpis_table_as_dataframe() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_kpis_table_as_dataframe"]], "get_log() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_log"]], "get_model_py() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_model_py"]], "get_multi_scenario_compare_selected() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_multi_scenario_compare_selected"]], "get_multi_scenario_data() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_multi_scenario_data"]], "get_multi_scenario_table() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_multi_scenario_table"]], "get_outputs() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_outputs"]], "get_parameter_value() (dse_do_utils.datamanager.datamanager static method)": [[0, "dse_do_utils.datamanager.DataManager.get_parameter_value"]], "get_parameters() (dse_do_utils.scenariorunner.scenariogenerator method)": [[0, "dse_do_utils.scenariorunner.ScenarioGenerator.get_parameters"]], "get_plotly_fig_m() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_plotly_fig_m"]], "get_popup_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_popup_table"]], "get_project_id() (dse_do_utils.domodelexporter.domodelexporter static method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.get_project_id"]], "get_raw_table_by_name() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.get_raw_table_by_name"]], "get_reference_scenario_compare_selected() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.get_reference_scenario_compare_selected"]], "get_root_directory() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_root_directory"]], "get_root_directory() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_root_directory"]], "get_sa_column() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_sa_column"]], "get_sa_table() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.get_sa_table"]], "get_sa_table() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.get_sa_table"]], "get_scenario() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_scenario"]], "get_scenario_db_table() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenario_db_table"]], "get_scenario_picker_ui() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_picker_ui"]], "get_scenario_refresh_button() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_refresh_button"]], "get_scenario_sa_table() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenario_sa_table"]], "get_scenario_select_drop_down() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_scenario_select_drop_down"]], "get_scenarios_df() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.get_scenarios_df"]], "get_scenarios_df() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.get_scenarios_df"]], "get_selected_scenario() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.get_selected_scenario"]], "get_solve_details() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_details"]], "get_solve_details_objective() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_details_objective"]], "get_solve_payload() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_payload"]], "get_solve_status() (dse_do_utils.deployeddomodel.deployeddomodel static method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_solve_status"]], "get_space_id() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.get_space_id"]], "get_tooltip_table() (dse_do_utils.mapmanager.mapmanager static method)": [[0, "dse_do_utils.mapmanager.MapManager.get_tooltip_table"]], "get_unique_file_name() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.get_unique_file_name"]], "get_wml_create_deployment_meta_props() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_wml_create_deployment_meta_props"]], "get_wml_create_deployment_meta_props() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_wml_create_deployment_meta_props"]], "get_wml_create_store_model_meta_props() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.get_wml_create_store_model_meta_props"]], "get_wml_create_store_model_meta_props() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.get_wml_create_store_model_meta_props"]], "guid_from_space_name() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.guid_from_space_name"]], "guid_from_space_name() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.guid_from_space_name"]], "insert_in_do (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_in_do"]], "insert_in_do() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_in_do"]], "insert_inputs_in_db (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_inputs_in_db"]], "insert_inputs_in_db() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_inputs_in_db"]], "insert_outputs_in_db (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.insert_outputs_in_db"]], "insert_outputs_in_db() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.insert_outputs_in_db"]], "insert_scenarios_from_zip() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_scenarios_from_zip"]], "insert_scenarios_from_zip() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.insert_scenarios_from_zip"]], "insert_scenarios_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_scenarios_in_db"]], "insert_table_in_db_bulk() (dse_do_utils.scenariodbmanager.autoscenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.AutoScenarioDbTable.insert_table_in_db_bulk"]], "insert_table_in_db_bulk() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.insert_table_in_db_bulk"]], "insert_table_row() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_table_row"]], "insert_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.insert_tables_in_db"]], "integer_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.integer_var_series"]], "integer_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.integer_var_series_s"]], "kansas_city_coord (dse_do_utils.mapmanager.mapmanager attribute)": [[0, "dse_do_utils.mapmanager.MapManager.kansas_city_coord"]], "list_file_hierarchy() (in module dse_do_utils.utilities)": [[0, "dse_do_utils.utilities.list_file_hierarchy"]], "load_data() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data"]], "load_data_from_csv() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_csv"]], "load_data_from_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_csv_s"]], "load_data_from_excel() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_excel"]], "load_data_from_excel_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_excel_s"]], "load_data_from_parquet() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_parquet"]], "load_data_from_parquet_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_parquet_s"]], "load_data_from_scenario() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.load_data_from_scenario"]], "load_data_from_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_scenario"]], "load_data_from_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_scenario_s"]], "load_data_from_zip_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.load_data_from_zip_csv_s"]], "load_input_data_from_excel() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.load_input_data_from_excel"]], "load_selected_scenario_data() (dse_do_utils.scenariopicker.scenariopicker method)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.load_selected_scenario_data"]], "log_level (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.log_level"]], "merge_scenario_data() (dse_do_utils.multiscenariomanager.multiscenariomanager static method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.merge_scenario_data"]], "module": [[0, "module-dse_do_utils"], [0, "module-dse_do_utils.cpd25utilities"], [0, "module-dse_do_utils.datamanager"], [0, "module-dse_do_utils.deployeddomodel"], [0, "module-dse_do_utils.domodeldeployer"], [0, "module-dse_do_utils.domodelexporter"], [0, "module-dse_do_utils.mapmanager"], [0, "module-dse_do_utils.multiscenariomanager"], [0, "module-dse_do_utils.optimizationengine"], [0, "module-dse_do_utils.plotly_cpd_workaround"], [0, "module-dse_do_utils.plotlymanager"], [0, "module-dse_do_utils.scenariodbmanager"], [0, "module-dse_do_utils.scenariomanager"], [0, "module-dse_do_utils.scenariopicker"], [0, "module-dse_do_utils.scenariorunner"], [0, "module-dse_do_utils.utilities"], [0, "module-dse_do_utils.version"]], "monitor_execution_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.monitor_execution_v2"]], "new_schema (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.new_schema"]], "notify_progress() (dse_do_utils.optimizationengine.myprogresslistener method)": [[0, "dse_do_utils.optimizationengine.MyProgressListener.notify_progress"]], "parameters (dse_do_utils.scenariorunner.scenarioconfig attribute)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig.parameters"]], "plotly_kpi_compare_bar_charts() (dse_do_utils.plotlymanager.plotlymanager method)": [[0, "dse_do_utils.plotlymanager.PlotlyManager.plotly_kpi_compare_bar_charts"]], "prep_parameters() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prep_parameters"]], "prepare_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_data_frames"]], "prepare_input_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_input_data_frames"]], "prepare_output_data_frames() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.prepare_output_data_frames"]], "previous_value (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.previous_value"]], "print_hello() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.print_hello"]], "print_inputs_outputs_summary() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.print_inputs_outputs_summary"]], "print_table_names() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.print_table_names"]], "read_multi_scenario_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_multi_scenario_tables_from_db"]], "read_scenario_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_from_db"]], "read_scenario_input_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_input_tables_from_db"]], "read_scenario_table_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_table_from_db"]], "read_scenario_tables_from_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.read_scenario_tables_from_db"]], "rename_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.rename_scenario_in_db"]], "replace_data_in_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.replace_data_in_scenario"]], "replace_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.replace_data_into_scenario_s"]], "replace_scenario_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.replace_scenario_in_db"]], "replace_scenario_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.replace_scenario_tables_in_db"]], "resolve_metadata_column_conflicts() (dse_do_utils.scenariodbmanager.scenariodbtable method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.resolve_metadata_column_conflicts"]], "row_idx (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.row_idx"]], "row_index (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.row_index"]], "run_model() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_model"]], "run_multiple() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_multiple"]], "run_once() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.run_once"]], "scenario_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.scenario_name"]], "scenario_name (dse_do_utils.scenariorunner.scenarioconfig attribute)": [[0, "dse_do_utils.scenariorunner.ScenarioConfig.scenario_name"]], "semicontinuous_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semicontinuous_var_series"]], "semicontinuous_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semicontinuous_var_series_s"]], "semiinteger_var_series() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semiinteger_var_series"]], "semiinteger_var_series_s() (dse_do_utils.optimizationengine.optimizationengine static method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.semiinteger_var_series_s"]], "set_parameters() (dse_do_utils.datamanager.datamanager method)": [[0, "dse_do_utils.datamanager.DataManager.set_parameters"]], "solve() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.solve"]], "solve() (dse_do_utils.optimizationengine.optimizationengine method)": [[0, "dse_do_utils.optimizationengine.OptimizationEngine.solve"]], "solve_v2() (dse_do_utils.deployeddomodel.deployeddomodel method)": [[0, "dse_do_utils.deployeddomodel.DeployedDOModel.solve_v2"]], "sqlcol() (dse_do_utils.scenariodbmanager.scenariodbtable static method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbTable.sqlcol"]], "table_name (dse_do_utils.scenariodbmanager.dbcellupdate attribute)": [[0, "dse_do_utils.scenariodbmanager.DbCellUpdate.table_name"]], "template_scenario_name (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.template_scenario_name"]], "update_cell_changes_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.update_cell_changes_in_db"]], "update_scenario_output_tables_in_db() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.update_scenario_output_tables_in_db"]], "update_solve_output_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.update_solve_output_into_scenario"]], "update_table_row() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.update_table_row"]], "upsert_table_row() (dse_do_utils.scenariodbmanager.scenariodbmanager method)": [[0, "dse_do_utils.scenariodbmanager.ScenarioDbManager.upsert_table_row"]], "widgets (dse_do_utils.scenariopicker.scenariopicker attribute)": [[0, "dse_do_utils.scenariopicker.ScenarioPicker.widgets"]], "wml_create_deployment() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.wml_create_deployment"]], "wml_create_deployment() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.wml_create_deployment"]], "wml_store_model() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.wml_store_model"]], "wml_store_model() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.wml_store_model"]], "write_data_asset_as_file_cpd25() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.write_data_asset_as_file_cpd25"]], "write_data_asset_as_file_wsc() (in module dse_do_utils.cpd25utilities)": [[0, "dse_do_utils.cpd25utilities.write_data_asset_as_file_wsc"]], "write_data_into_scenario() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_into_scenario"]], "write_data_into_scenario_s() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_into_scenario_s"]], "write_data_to_csv() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_csv"]], "write_data_to_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_csv_s"]], "write_data_to_excel() (dse_do_utils.multiscenariomanager.multiscenariomanager method)": [[0, "dse_do_utils.multiscenariomanager.MultiScenarioManager.write_data_to_excel"]], "write_data_to_excel() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_excel"]], "write_data_to_excel_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_excel_s"]], "write_data_to_parquet() (dse_do_utils.scenariomanager.scenariomanager method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_parquet"]], "write_data_to_parquet_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_parquet_s"]], "write_data_to_zip_csv_s() (dse_do_utils.scenariomanager.scenariomanager static method)": [[0, "dse_do_utils.scenariomanager.ScenarioManager.write_data_to_zip_csv_s"]], "write_do_model_to_file() (dse_do_utils.domodelexporter.domodelexporter method)": [[0, "dse_do_utils.domodelexporter.DOModelExporter.write_do_model_to_file"]], "write_main_file() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.write_main_file"]], "write_main_file() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.write_main_file"]], "write_output_data_to_excel() (dse_do_utils.scenariorunner.scenariorunner method)": [[0, "dse_do_utils.scenariorunner.ScenarioRunner.write_output_data_to_excel"]], "write_output_to_excel (dse_do_utils.scenariorunner.runconfig attribute)": [[0, "dse_do_utils.scenariorunner.RunConfig.write_output_to_excel"]], "write_yaml_file() (dse_do_utils.domodeldeployer.domodeldeployer method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployer.write_yaml_file"]], "write_yaml_file() (dse_do_utils.domodeldeployer.domodeldeployerlocal method)": [[0, "dse_do_utils.domodeldeployer.DOModelDeployerLocal.write_yaml_file"]]}}) \ No newline at end of file diff --git a/dse_do_utils/__init__.py b/dse_do_utils/__init__.py index 61b470b..ad68b95 100644 --- a/dse_do_utils/__init__.py +++ b/dse_do_utils/__init__.py @@ -5,92 +5,9 @@ from .datamanager import DataManager from .optimizationengine import OptimizationEngine from .scenariomanager import ScenarioManager -from .scenariodbmanager import ScenarioDbManager +# from .scenariodbmanager import ScenarioDbManager # from .scenariopicker import ScenarioPicker # from .deployeddomodel import DeployedDOModel # from .mapmanager import MapManager name = "dse_do_utils" - - -def module_reload(): - """DEPRECATED. Requires updates to Python 3.6 - Reloads all component modules. Use when you want to force a reload of this module with imp.reload(). - - This avoids having to code somewhat complex reloading logic in the notebook that is using this module. - - Challenge with imp.reload of dse-do_utils. The following is NOT (!) sufficient:: - - import imp - import dse_do_utils - imp.reload(dse_do_utils) - - The package dse_do_utils internally contains a number of sub modules that each contain a part of the code. - This keeps development easier and more organized. But to make importing easier, the classes are exposed - in the top level `init.py`, which allows for a simple import statement like from dse_do_utils import ScenarioManager. - Unfortunately, reloading the top-level module dse_do_utils doesn't force a reload of the internal modules. - - In case of subclassing, reloading needs to be done in the right order, i.e. first the parent classes. - - Usage:: - - import imp - import dse_do_utils # You have to do the import, otherwise not possible to do the next 2 steps - dse_do_utils.module_reload() #This function - imp.reload(dse_do_utils) # Necessary to ensure all following expressions `from dse_do_utils import class` are using the updated classes - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager # This needs to be done AFTER the reload to refresh the definitions - - - Note that this function assumes that the set of classes and component modules is not part of the update. - If it is, you may need to add another reload:: - - import imp - import dse_do_utils # You have to do the import, otherwise not possible to do the next 2 steps - imp.reload(dse_do_utils) # To reload this function - dse_do_utils.module_reload() #This function - imp.reload(dse_do_utils) # Necessary to ensure all future expressions `from dse_do_utils import class` are using the updated classes - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager # This needs to be done AFTER the reload to refresh the definitions - - - If not using this function, in the notebook you would need to do the following (or the relevant parts of it):: - - import imp - import dse_do_utils - imp.reload(dse_do_utils.datamanager) - imp.reload(dse_do_utils.optimizationengine) - imp.reload(dse_do_utils.scenariomanager) - imp.reload(dse_do_utils.scenariopicker) - imp.reload(dse_do_utils.deployeddomodel) - imp.reload(dse_do_utils.mapmanager) - imp.reload(dse_do_utils) - from dse_do_utils import DataManager, OptimizationEngine, ScenarioManager, ScenarioPicker, DeployedDOModel, MapManager - - Returns: - - """ - import importlib - import datamanager - import optimizationengine - import scenariomanager - import scenariopicker - import deployeddomodel - import mapmanager - import multiscenariomanager - importlib.reload(datamanager) - importlib.reload(optimizationengine) - importlib.reload(scenariomanager) - importlib.reload(scenariopicker) - importlib.reload(deployeddomodel) - importlib.reload(mapmanager) - importlib.reload(multiscenariomanager) - - # The imports below cannot be done here. - # You need to redo the class imports from the notebook that is calling this function - - # from .version import __version__ - # from .datamanager import DataManager - # from .optimizationengine import OptimizationEngine - # from .scenariomanager import ScenarioManager - # from .scenariopicker import ScenarioPicker - # from .deployeddomodel import DeployedDOModel - # from .mapmanager import MapManager diff --git a/dse_do_utils/core/core01_cpo_optimization_engine.py b/dse_do_utils/core/core01_cpo_optimization_engine.py new file mode 100644 index 0000000..5ac67f3 --- /dev/null +++ b/dse_do_utils/core/core01_cpo_optimization_engine.py @@ -0,0 +1,291 @@ +# Copyright IBM Corp. 2021, 2022 +# IBM Confidential Source Code Materials +# This Source Code is subject to the license and security terms contained in the License.txt file contained in this source code package. +import os +import pathlib +from abc import abstractmethod +from typing import Dict, List, Optional + +import pandas as pd +from docplex import cp +from docplex.mp.conflict_refiner import ConflictRefiner +from docplex.mp.solution import SolveSolution +from docplex.cp.parameters import CpoParameters +from docplex.cp.solution import CpoSolveResult, CpoRefineConflictResult + +from dse_do_utils import OptimizationEngine +from dse_do_utils.core.core01_data_manager import Core01DataManager +from dse_do_utils.datamanager import Outputs +from typing import TypeVar, Generic + +DM = TypeVar('DM', bound='Core01DataManager') + + +class Core01CpoOptimizationEngine(OptimizationEngine[DM]): + """ + DRAFT. Needs a lot of updates to match CP Optimizer specifics! + + This class supports Python generics to specify the class of the DataManager. + This allows an IDE like PyCharm and VSCode to check for methods and attributes + and allows more easy navigation (i.e. control-click on name) + + Usage 1 - Define a use-case specific OptimizationEngine class:: + + DM = TypeVar('DM', bound='FruitDataManager') + class FruitOptimizationEngine(Core01OptimizationEngine[DM]): + pass + + Usage 2 - When creating an instance:: + + engine = FruitOptimizationEngine[FruitDataManager] + """ + def __init__(self, data_manager: DM, name: str = None, solve_kwargs=None, + export_lp: bool = False, export_sav: bool = False, export_lp_path: str = '', + enable_refine_conflict: bool = False): + super().__init__(data_manager=data_manager, name=name, is_cpo_model=True) + + if solve_kwargs is None: + solve_kwargs = {"log_output": True} + self.solve_kwargs = solve_kwargs + self.export_lp = export_lp + self.export_sav = export_sav + self.export_lp_path = export_lp_path + self.enable_refine_conflict = enable_refine_conflict + self.logger = data_manager.logger + + self.cpo_params = CpoParameters() + + def run(self) -> Outputs: + self.dm.prepare_data_frames() + self.dm.pre_processing() + + self.create_dvars() + self.create_objectives() + self.set_objective() + self.create_constraints() + # self.set_cplex_parameters() + self.set_cpo_parameters() + msol = self.solve() + if msol.is_solution() is not None: + self.extract_solution(msol) + self.post_processing() + outputs = self.get_outputs() + else: + outputs = {} + return outputs + + @abstractmethod + def create_dvars(self) -> None: + pass + + @abstractmethod + def create_objectives(self) -> None: + pass + + @abstractmethod + def set_objective(self) -> None: + pass + + @abstractmethod + def create_constraints(self) -> None: + pass + + def set_cplex_parameters(self) -> None: + if int(self.dm.param.time_limit) > 0: + self.mdl.parameters.timelimit = int(self.dm.param.time_limit) + + if int(self.dm.param.threads) > 0: + self.mdl.parameters.threads = int(self.dm.param.threads) + + if self.dm.param.handle_unscaled_infeasibilities: + self._set_cplex_parameters_unscaled_infeasibilities() + + if self.dm.param.log_solution_quality_metrics: + # Configure the mdl to generate quality metrics, will be available in mdl.solve_details.quality_metrics + self.mdl.quality_metrics = True + + def set_cpo_parameters(self): + if self.cpo_params is None: + self.cpo_params = CpoParameters() + + if int(self.dm.param.time_limit) > 0: + self.cpo_params.TimeLimit = int(self.dm.param.time_limit) + + # self.cpo_params.KPIDisplay = 'MultipleLines' + # self.cpo_params.ConflictRefinerTimeLimit = 60 + # self.cpo_params.LogPeriod = 10_000 # Number of branches, default 1000 + # self.cpo_params.LogVerbosity = 'Normal' #'Terse' + + def solve(self) -> Optional[CpoSolveResult]: + """ + TODO: In CPO, is msol None if no solution? + """ + msol = self.mdl.solve(params=self.cpo_params, **self.solve_kwargs) + self.export_as_lp_path(lp_file_name=self.mdl.name) + if msol.is_solution(): + pass + # TODO: CPO equivalent of CPLEX report? + # self.mdl.report() + elif self.enable_refine_conflict: + self.refine_conflict() + return msol + + @abstractmethod + def extract_solution(self, msol: CpoSolveResult, drop: bool = True) -> None: + self.dm.logger.debug("Enter") + + # KPIs + self.dm.kpis = self.get_kpi_output_table(msol) + + @abstractmethod + def post_processing(self) -> None: + self.dm.post_processing() + + def get_outputs(self) -> Outputs: + return self.dm.get_outputs() + + ################################################################ + # Utils + ################################################################ + def refine_conflict(self): + """ + TODO: refine to logger? + TODO: control by parameter? + TODO: support CP Optimizer + :return: + """ + self.logger.debug("Start ConflictRefiner") + conflicts: CpoRefineConflictResult = self.mdl.refine_conflict() # TODO: Is this working? + conflicts.print_conflict() # TODO: Deprecated + # crefiner = ConflictRefiner() # Create an instance of the ConflictRefiner + # conflicts = crefiner.refine_conflict(self.mdl) # Run the conflict refiner + # # ConflictRefiner.display_conflicts(conflicts) #Display the results + # for c in conflicts: + # print(c.element) # Display conflict result in a little more compact format than ConflictRefiner.display_conflicts + + + @staticmethod + def condition_values(var): + """Fix issues with CPLEX using a tolerance""" + if isinstance(var, int): + return var + elif isinstance(var, float): + return var + else: + return round(var.solution_value + 1e-6, 5) + + @staticmethod + def df_extract_solution(df, + extract_dvar_names: List[str] = None, + drop_column_names: List[str] = None, + drop: bool = True, + column_name_post_fix: str = 'Sol'): + """Generalized routine to extract a solution value. + Can remove the dvar column from the df to be able to have a clean df for export into scenario. + For each dvar column in extract_dvar_names, extract solution into a new column with the same name + and the column_name_post_fix added. + + :param df + :param extract_dvar_names: + :param drop_column_names: List of columns to drop **in addition** to the columns in extract_dvar_names + :param drop: + :param column_name_post_fix: + + """ + + if extract_dvar_names is not None: + for xDVarName in extract_dvar_names: + if xDVarName in df.columns: + df[f'{xDVarName}{column_name_post_fix}'] = [Core01CpoOptimizationEngine.condition_values(dvar) for dvar in df[xDVarName]] + if drop and len(column_name_post_fix) > 0: + # Only drop if we created a new column + df = df.drop([xDVarName], axis=1) + if drop and drop_column_names is not None: + for column in drop_column_names: + if column in df.columns: + df = df.drop([column], axis=1) + return df + + def get_kpi_output_table(self, msol: CpoSolveResult) -> pd.DataFrame: + """Overrides the default and uses the default `['NAME', 'VALUE']` columns.""" + # print(" KPIs: {}".format(msol.get_kpis())) + # all_kpis = [(kp.name, kp.compute()) for kp in self.mdl.get_kpis()] + all_kpis = msol.get_kpis() + df_kpis = pd.DataFrame(all_kpis, columns=['NAME', 'VALUE']).set_index('NAME') + return df_kpis + + def export_as_lp_path(self, lp_file_name: str = 'my_cpo_file') -> str: + """ + Saves .lp file in self.export_lp_path + Note: Does not conflict with `OptimizationEngine.export_as_lp()` which has a different signature. + :return: file_path + """ + filepath = None + if self.export_lp: + if pathlib.Path(lp_file_name).suffix != '.cpo': + lp_file_name = lp_file_name + '.cpo' + filepath = os.path.join(self.export_lp_path, lp_file_name) + self.logger.debug(f"Exporting .cpo file: {filepath}") + self.mdl.export_as_cpo(filepath) + return filepath + + def export_as_sav_path(self, sav_file_name: str = 'my_sav_file') -> str: + """ + Saves .sav file in self.export_lp_path + :return: file_path + """ + filepath = None + if self.export_sav: + if pathlib.Path(sav_file_name).suffix != '.sav': + sav_file_name = sav_file_name + '.sav' + filepath = os.path.join(self.export_lp_path, sav_file_name) + self.dm.logger.debug(f"Exporting .sav file: {filepath}") + self.mdl.export_as_sav(filepath) + return filepath + + ######################################################## + # Metrics + ######################################################## + def _set_cplex_parameters_unscaled_infeasibilities(self): + """CPLEX Parameters to help handle unscaled infeasibilities + See: + - https://www.ibm.com/docs/en/icos/22.1.0?topic=infeasibility-coping-ill-conditioned-problem-handling-unscaled-infeasibilities + - https://orinanobworld.blogspot.com/2010/08/ill-conditioned-bases-and-numerical.html + """ + self.mdl.parameters.read.scale = 1 + self.mdl.parameters.simplex.tolerances.markowitz = 0.90 + self.mdl.parameters.simplex.tolerances.feasibility = 1e-9 + self.mdl.parameters.emphasis.numerical = 1 + # self.mdl.parameters.lpmethod = 1 # 1: primal-simplex + + def log_solution_quality_metrics(self): + """Log the solution quality metrics + :return: + """ + if self.dm.param.log_solution_quality_metrics: + self.dm.logger.debug(f"Solution quality metrics:") + max_key_length = max([len(key) for key in self.mdl.solve_details.quality_metrics.keys()], default=10) # `default` option is just to ensure the code doesn't throw an exception in case there are no quality_metrics + for key, value in self.mdl.solve_details.quality_metrics.items(): + self.dm.logger.debug(f"{key.ljust(max_key_length, ' ')} = {value:,}") + + def extract_engine_metrics(self): + if self.solver_metrics is not None: + return pd.DataFrame(self.solver_metrics).set_index('name') + else: + return pd.DataFrame(columns=['name', 'value']).set_index('name') + +############################################################ +class CplexSum(): + """Function class that adds a series of dvars into a cplex sum expression. + To be used as a custom aggregation in a groupby. + Usage: + df2 = df1.groupby(['a']).agg({'xDVar':CplexSum(engine.mdl)}).rename(columns={'xDVar':'expr'}) + + Sums the dvars in the 'xDVar' column into an expression + """ + def __init__(self, mdl): + self.mdl = mdl + def __call__(self, dvar_series): + return self.mdl.sum(dvar_series) + + diff --git a/dse_do_utils/core/core01_data_manager.py b/dse_do_utils/core/core01_data_manager.py index f8d4cbc..e173ee6 100644 --- a/dse_do_utils/core/core01_data_manager.py +++ b/dse_do_utils/core/core01_data_manager.py @@ -50,14 +50,18 @@ def __init__(self, inputs=None, outputs=None, log_level=None): # `self.__class__.__module__` returns `fruit.data_manager` (same as `self.__module__`) # VT20230607: changed to __name__ from self.__module__ + self.logger = logging.getLogger(__name__) # `__name__` is Python best practice - # Parameters: - self.params = None - self.param = types.SimpleNamespace() + # # Parameters: + # self.params = None + # self.param = types.SimpleNamespace() self.dtypes: Dict = self.get_default_dtypes() + # Output data + self.kpis: Optional[pd.DataFrame] = None + def prepare_input_data_frames(self): super().prepare_input_data_frames() # self.logger.debug("Enter") @@ -82,11 +86,13 @@ def set_parameters(self): self.param.threads = self.get_parameter_value(self.params, 'threads', param_type='int', default_value=0) # default 0 implies no limit - # self.param.n_threads = self.get_parameter_value( - # self.params, - # param_name='numberThreads', - # param_type='int', - # default_value=0) + + self.param.mip_gap = self.get_parameter_value( + self.params, + 'mipGap', + param_type='float', + default_value=0 + ) self.param.enable_lp_names = self.get_parameter_value( self.params, @@ -106,11 +112,8 @@ def set_parameters(self): param_type='bool', default_value=False) - def prepare_output_data_frames(self, dtypes=None): + def prepare_output_data_frames(self): """ - TODO: remove dtypes argument. Beware that this can break existing code - :param dtypes: - :return: """ super().prepare_output_data_frames() self.logger.debug("Enter") @@ -173,6 +176,7 @@ def prepare_df(self, df: dataframe index_columns: index column names value_columns: value column names + optional_columns: dtypes: map of column data types. Adds and overrides values in self.dtypes data_specs_key: data specs key verify_integrity: flag to verify integrity when setting the index diff --git a/dse_do_utils/core/core01_environment_manager.py b/dse_do_utils/core/core01_environment_manager.py index 935bbd2..9e2c422 100644 --- a/dse_do_utils/core/core01_environment_manager.py +++ b/dse_do_utils/core/core01_environment_manager.py @@ -205,3 +205,24 @@ def set_loggers(self, level: str = 'DEBUG', scope: Optional[tuple[str]] = None): while logger.hasHandlers(): logger.removeHandler(logger.handlers[0]) logger.addHandler(c_handler) + + def set_root_logger(self, level: Optional[str] = None) -> None: + """Sets the properties of the root logger. + In subsequent code, use `logger = logging.getLogger()`. + Valid values for level = [CRITICAL, ERROR, WARNING, INFO, DEBUG] + + Called from + """ + + logger = logging.getLogger() + logger.setLevel(level) + c_handler = logging.StreamHandler() + c_handler.setLevel(level) + + # Create formatters and add it to handlers + c_format = logging.Formatter('%(asctime)s %(levelname)s: %(module)s.%(funcName)s - %(message)s', + '%Y-%m-%d %H:%M:%S') + c_handler.setFormatter(c_format) + + # Add handlers to the logger + logger.addHandler(c_handler) \ No newline at end of file diff --git a/dse_do_utils/core/core01_optimization_engine.py b/dse_do_utils/core/core01_optimization_engine.py index 58e9b25..548ed1a 100644 --- a/dse_do_utils/core/core01_optimization_engine.py +++ b/dse_do_utils/core/core01_optimization_engine.py @@ -6,6 +6,7 @@ from abc import abstractmethod from typing import Dict, List, Optional +import docplex.mp.model import pandas as pd from docplex.mp.conflict_refiner import ConflictRefiner from docplex.mp.solution import SolveSolution @@ -34,10 +35,13 @@ class FruitOptimizationEngine(Core01OptimizationEngine[DM]): engine = FruitOptimizationEngine[FruitDataManager] """ - def __init__(self, data_manager: DM, name: str = None, solve_kwargs: Dict = {"log_output": True}, + def __init__(self, data_manager: DM, name: str = None, solve_kwargs=None, export_lp: bool = False, export_sav: bool = False, export_lp_path: str = '', enable_refine_conflict: bool = False): super().__init__(data_manager=data_manager, name=name) + + if solve_kwargs is None: + solve_kwargs = {"log_output": True} self.solve_kwargs = solve_kwargs self.export_lp = export_lp self.export_sav = export_sav @@ -86,6 +90,9 @@ def set_cplex_parameters(self) -> None: if int(self.dm.param.threads) > 0: self.mdl.parameters.threads = int(self.dm.param.threads) + if float(self.dm.param.mip_gap) > 0: + self.mdl.parameters.mip.tolerances.mipgap = float(self.dm.param.mip_gap) + if self.dm.param.handle_unscaled_infeasibilities: self._set_cplex_parameters_unscaled_infeasibilities() @@ -95,6 +102,8 @@ def set_cplex_parameters(self) -> None: def solve(self) -> Optional[SolveSolution]: msol = self.mdl.solve(**self.solve_kwargs) + self.dm.logger.info( + f"Solve completed with status '{self.mdl.solve_details.status}' and time {self.mdl.solve_details.time:.2f} sec") self.export_as_lp_path(lp_file_name=self.mdl.name) if msol is not None: # TODO: enable print report? @@ -243,6 +252,27 @@ def extract_engine_metrics(self): else: return pd.DataFrame(columns=['name', 'value']).set_index('name') + ########################################## + # Tuning (TODO) + ########################################## + def cplex_tune_model(self): + """DRAFT + Run the cplex parameter tuning + From https://stackoverflow.com/questions/53353970/where-can-i-find-the-documentation-of-docplex-automatic-tuning-tool + Works but beware of too short time-limit + Returns: + + """ + cpx = self.mdl.get_engine().get_cplex() + status = cpx.parameters.tune_problem() + if status == cpx.parameters.tuning_status.completed: + print("tuned parameters:") + for param, value in cpx.parameters.get_changed(): + print("{0}: {1}".format(repr(param), value)) + else: + print("tuning status was: {0}".format( + cpx.parameters.tuning_status[status])) + ############################################################ class CplexSum(): """Function class that adds a series of dvars into a cplex sum expression. @@ -257,4 +287,24 @@ def __init__(self, mdl): def __call__(self, dvar_series): return self.mdl.sum(dvar_series) +class CplexDot(): + """Function class that adds a series of dvars into a cplex sum expression. + To be used as a custom aggregation in a groupby. + Usage: + df2 = df1.groupby(['a']).apply(CplexDot(engine.mdl, 'xDVar', 'volume')).to_frame(name='expr') + For each group, creates an expression df2['expr'] = mdl.dot(group.xDVar, group.volume) + In above usage, df2 is a DataFrame with the index based on the groupby keys and one column named 'expr'. + """ + def __init__(self, mdl: docplex.mp.model.Model, column1: str, column2: str): + """ + Args: + mdl: Cplex Model instance + column1 (str): Name of column_1 in DataFrame + column1 (str): Name of column_2 in DataFrame + """ + self.mdl = mdl + self.column1 = column1 + self.column2 = column2 + def __call__(self, group): + return self.mdl.dot(group[self.column1], group[self.column2]) diff --git a/dse_do_utils/core/core02_optimization_engine.py b/dse_do_utils/core/core02_optimization_engine.py index 6c5e4fb..7e6ed8a 100644 --- a/dse_do_utils/core/core02_optimization_engine.py +++ b/dse_do_utils/core/core02_optimization_engine.py @@ -41,13 +41,14 @@ class Core02OptimizationEngine(Core01OptimizationEngine[DM]): to the input_db_tables """ - def __init__(self, data_manager: Core02DataManager, name: str = None, solve_kwargs: Dict = {"log_output": True}, + def __init__(self, data_manager: DM, name: str = None, solve_kwargs=None, export_lp: bool = False, export_sav: bool = False, export_lp_path: str = '', enable_refine_conflict: bool = False): + if solve_kwargs is None: + solve_kwargs = {"log_output": True} super().__init__(data_manager, name=name, solve_kwargs=solve_kwargs, export_lp=export_lp, export_sav=export_sav, export_lp_path=export_lp_path, enable_refine_conflict=enable_refine_conflict) - # self.solver_metrics = None self.lex_opti_metrics_list: List[Dict] = [] #################################################################################### diff --git a/dse_do_utils/core/core02_scenario_runner.py b/dse_do_utils/core/core02_scenario_runner.py index 2caf865..7701c8a 100644 --- a/dse_do_utils/core/core02_scenario_runner.py +++ b/dse_do_utils/core/core02_scenario_runner.py @@ -13,7 +13,7 @@ from dse_do_utils.datamanager import Inputs, Outputs, DataManager from dse_do_utils.scenariodbmanager import ScenarioDbManager from logging import Logger, getLogger -from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union +from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union, TypeVar from dse_do_utils.scenariomanager import Platform from dse_do_utils.scenariorunner import ScenarioConfig, ScenarioGenerator @@ -25,13 +25,15 @@ class Core02ScenarioConfig(ScenarioConfig): lex_opti_goals: Dict = None # Dict compatible with pd.DataFrame.__init__() -class Core02ScenarioGenerator(ScenarioGenerator): +SC = TypeVar('SC', bound='Core02ScenarioConfig') + +class Core02ScenarioGenerator(ScenarioGenerator[SC]): """Adds LexOptiLevel and LexOptiGoal configuration """ def __init__(self, inputs: Inputs, - scenario_config: ScenarioConfig) -> None: + scenario_config: Core02ScenarioConfig) -> None: super().__init__(inputs=inputs, scenario_config=scenario_config) def generate_scenario(self): diff --git a/dse_do_utils/datamanager.py b/dse_do_utils/datamanager.py index d20371b..fde8d8e 100644 --- a/dse_do_utils/datamanager.py +++ b/dse_do_utils/datamanager.py @@ -22,7 +22,7 @@ class DataManager(object): It typically contains the input and output dictionaries with DataFrames that came from or will be inserted into a DO scenario. - In addition it will hold any intermediate data. + In addition, it will hold any intermediate data. It holds methods that operate on and convert the data. When used in combination with an optimization engine, it should not contain the docplex code that creates or interacts with the docplex Model. (That is the task of the OptimizationEngine.) @@ -38,7 +38,10 @@ class DataManager(object): def __init__(self, inputs: Optional[Inputs] = None, outputs: Optional[Outputs] = None): self.inputs = inputs self.outputs = outputs - return + + # Parameters: + self.params: Optional[pd.DataFrame] = None + self.param = types.SimpleNamespace() def prepare_data_frames(self): if (self.inputs is not None) and (len(self.inputs) > 0): @@ -357,7 +360,8 @@ def my_function(my_input_value): @staticmethod def extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | Dict[str, str]] = None, drop_column_names: List[str] = None, drop: bool = True, epsilon: float = None, round_decimals: int = None, - solution_column_name_post_fix: str = 'Sol') -> pd.DataFrame: + solution_column_name_post_fix: str = 'Sol', + allow_mixed_type_columns: bool = False) -> pd.DataFrame: """Generalized routine to extract a solution value. Can remove the dvar column from the df to be able to have a clean df for export into scenario. @@ -379,7 +383,7 @@ def extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | round_decimals (int): round the solution value by number of decimals. If None, no rounding. If 0, rounding to integer value. solution_column_name_post_fix (str): Postfix for the name of the solution column. Default = 'Sol' - + allow_mixed_type_columns (bool): If True, will allow the column not to have the `solution_value` attribute, i.e. be a plain Python value, not a CPLEX dvar or expression """ @@ -394,7 +398,12 @@ def extract_solution(df: pd.DataFrame, extract_dvar_names: Optional[List[str] | for xDVarName, solution_column_name in dvar_column_dict.items(): if xDVarName in df.columns: # solution_column_name = f'{xDVarName}Sol' - df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]] + # df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]] + if allow_mixed_type_columns: + df[solution_column_name] = [dvar.solution_value if hasattr(dvar, 'solution_value') else dvar for + dvar in df[xDVarName]] # VT_20241029: allow expression to be a constant + else: + df[solution_column_name] = [dvar.solution_value for dvar in df[xDVarName]] if drop: df = df.drop([xDVarName], axis=1) if epsilon is not None: diff --git a/dse_do_utils/deployeddomodel.py b/dse_do_utils/deployeddomodel.py index d686e3f..d0a7d7e 100644 --- a/dse_do_utils/deployeddomodel.py +++ b/dse_do_utils/deployeddomodel.py @@ -241,7 +241,7 @@ def get_solve_payload(self, inputs: Inputs, max_oaas_time_limit_sec: Optional[in # self.outputs = self.get_outputs(job_details) # self.solve_details = self.get_solve_details(job_details) - def solve_v2(self, inputs: Inputs, max_oaas_time_limit_sec: int = None, max_run_time_sec: int = None): + def solve_v2(self, inputs: Inputs, max_oaas_time_limit_sec: int = None, max_run_time_sec: int = None) -> dict: """Master routine. Initializes the job, starts the execution, monitors the results, post-processes the solution and cleans-up after. Args: diff --git a/dse_do_utils/optimizationengine.py b/dse_do_utils/optimizationengine.py index ab9a819..4607104 100644 --- a/dse_do_utils/optimizationengine.py +++ b/dse_do_utils/optimizationengine.py @@ -123,7 +123,7 @@ def semiinteger_var_series_s(mdl: docplex.mp.model, df: pd.DataFrame, lb, **karg """Returns pd.Series[SemiIntegerVarType].""" return pd.Series(mdl.semiinteger_var_list(df.index, lb, **kargs), index=df.index, dtype='object') - def solve(self, refine_conflict: bool = False, **kwargs) -> docplex.mp.solution.SolveSolution: + def solve(self, refine_conflict: Optional[bool] = False, **kwargs) -> docplex.mp.solution.SolveSolution: # TODO: enable export_as_lp_path()? # self.export_as_lp_path(lp_file_name=self.mdl.name) # TODO: use self.solve_kwargs if **kwargs is empty/None. Or merge them? @@ -336,9 +336,43 @@ def cp_integer_var_series_s(mdl: cp.CpoModel, df: pd.DataFrame, **kwargs) -> pd. integer_series = pd.Series(integer_list, index=df.index) return integer_series + @staticmethod + def cp_integer_var_series_s_v2(mdl: cp.CpoModel, df: pd.DataFrame, min=None, max=None, name=None, + domain=None) -> pd.Series: + """Returns pd.Series[docplex.cp.expression.CpoIntVar]. + If name is not None, will generate unique names based on pattern: '{name}_{index of df}' + If multi-index df, keys are separated by '_', e.g. 'xDvar_1_2_3' + """ + + if name is None: + integer_list = mdl.integer_var_list(df.shape[0], min, max, name, domain) + else: + integer_list = [] + for ix in df.index: + new_name = f"{name}_{OptimizationEngine._get_index_as_str(ix)}" + integer_list.append(mdl.integer_var(min, max, new_name, domain)) + integer_series = pd.Series(integer_list, index=df.index) + return integer_series + + @staticmethod + def _get_index_as_str(ix) -> str: + """Convert an index of a DF to a string. For naming dvars and constraints. + If df has a multi-index, the ix is a tuple.""" + if type(ix) is tuple: # If muli-index + name = '_'.join(map(str, ix)) + else: + name = str(ix) + # elif isinstance(ix, str): + # new_name = f"{name}_{ix}" + # elif isinstance(ix, int): + # new_name = f"{name}_{ix}" + # else: + # new_name = f"{name}_{str(ix)}" + return name + def cp_integer_var_series(self, df, **kwargs) -> pd.Series: """Returns pd.Series[docplex.cp.expression.CpoIntVar]""" - return OptimizationEngine.cp_integer_var_series_s(self.mdl, df=df, **kwargs) + return OptimizationEngine.cp_integer_var_series_s_v2(self.mdl, df=df, **kwargs) @staticmethod def cp_binary_var_series_s(mdl: cp.CpoModel, df: pd.DataFrame, **kwargs) -> pd.Series: diff --git a/dse_do_utils/plotlymanager.py b/dse_do_utils/plotlymanager.py index 76accd5..a4f7cb0 100644 --- a/dse_do_utils/plotlymanager.py +++ b/dse_do_utils/plotlymanager.py @@ -1,9 +1,12 @@ # Copyright IBM All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 -from typing import Generic, TypeVar +from typing import Generic, TypeVar, Optional, Dict +import pandas as pd +import plotly.express as px +import plotly.graph_objs as go # from typing import List, Dict, Tuple, Optional -from dse_do_utils.datamanager import DataManager +from dse_do_utils.datamanager import DataManager, Inputs # import plotly # import plotly.graph_objs as go @@ -29,6 +32,15 @@ class PlotlyManager(Generic[DM]): def __init__(self, dm: DM): self.dm: DM = dm + # Used by DoDashApp for scenario compare, when the Reference Scenario is selected + # This supports scenario compare visualizations + self.ref_dm: Optional[DM] = None # A DataManager based on the reference scenario + # Used by the DoDashApp for scenario compare, when multiple scenarios are selected for compare + # These DataFrames are 'multi-scenario': they have an additional colum with the scenarioName. + # One 'multi-scenario' df contains data for the same scenario table from multiple scenarios + self.ms_inputs: Dict[str, pd.DataFrame] = None # Dict[TableName, 'multi-scenario' dataframe] + self.ms_outputs: Dict[str, pd.DataFrame] = None # Dict[TableName, 'multi-scenario' dataframe] + def get_plotly_fig_m(self, id): """DEPRECATED. Not used in dse_do_dashboard package. On the instance `self`, call the method named by id['index'] @@ -42,4 +54,93 @@ def get_dash_tab_layout_m(self, page_id): On the instance `self`, call the method named by get_tab_layout_{page_id}. Used in dse_do_dashboard Plotly-Dash dashboards """ - return getattr(self, f"get_tab_layout_{page_id}")() \ No newline at end of file + return getattr(self, f"get_tab_layout_{page_id}")() + + ################################################################### + # For scenario-compare in dse-do-dashboard + ################################################################### + def plotly_kpi_compare_bar_charts(self, figs_per_row: int = 3, orientation: str = 'v') -> [[go.Figure]]: + """ + Generalized compare of KPIs between scenarios. Creates a list-of-list of go.Figure, i.e. rows of figures, + for the PlotlyRowsVisualizationPage. + Each KPI gets its own bar-chart, comparing the scenarios. + + Supports 3 cases: + 1. Multi-scenario compare based on the Reference Scenarios multi-checkbox select on the Home page. + 2. Compare the current select scenario with the Reference Scenario selected on the Home page. + 3. Single scenario view based on the currently selected scenario + + Args: + figs_per_row: int - Maximum number of figures per row + orientation: str - `h' (horizontal) or `v` (vertical) + + Returns: + figures in rows ([[go.Figure]]) - bar-charts in rows + + """ + figs = [] + if self.get_multi_scenario_compare_selected(): + df = self.get_multi_scenario_table('kpis') + elif self.get_reference_scenario_compare_selected(): + ref_df = self.ref_dm.kpis.reset_index() + ref_df['scenario_name'] = 'Reference' + selected_df = self.dm.kpis.reset_index() + selected_df['scenario_name'] = 'Current' + df = pd.concat([selected_df, ref_df]) + else: + df = self.dm.kpis.reset_index() + df['scenario_name'] = 'Current' + + for kpi_name, group in df.groupby('NAME'): + labels = {'scenario_name': 'Scenario', 'VALUE': kpi_name} + title = f'{kpi_name}' + if orientation == 'v': + fig = px.bar(group, x='scenario_name', y='VALUE', orientation='v', color='scenario_name', labels=labels, + title=title) + else: + fig = px.bar(group, y='scenario_name', x='VALUE', orientation='h', color='scenario_name', + labels=labels) + fig.update_layout(xaxis_title=None) + fig.update_layout(yaxis_title=None) + fig.update_layout(showlegend=False) + figs.append(fig) + + # Split list of figures in list-of-lists with maximum size of n: + n = figs_per_row + figs = [figs[i:i + n] for i in range(0, len(figs), n)] + return figs + + def get_multi_scenario_compare_selected(self) -> bool: + """Returns True if the user has selected multi-scenario compare. + """ + ms_enabled = (isinstance(self.ms_outputs, dict) + and isinstance(self.ms_inputs, dict) + and 'Scenario' in self.ms_inputs.keys() + and self.ms_inputs['Scenario'].shape[0] > 0 + ) + return ms_enabled + + def get_reference_scenario_compare_selected(self) -> bool: + """Returns True if the user has selected (single) reference-scenario compare + """ + ms_selected = self.get_multi_scenario_compare_selected() + ref_selected = isinstance(self.ref_dm, DataManager) + return not ms_selected and ref_selected + + def get_multi_scenario_table(self, table_name: str) -> Optional[pd.DataFrame]: + """Gets the df from the table named `table_name` in either inputs or outputs. + If necessary (i.e. when using scenario_seq), merges the Scenario table, so it has the scenario_name as column. + DataFrame is NOT indexed! + """ + if table_name in self.ms_inputs.keys(): + df = self.ms_inputs[table_name] + elif table_name in self.ms_outputs.keys(): + df = self.ms_outputs[table_name] + else: + df = None + + if df is not None: + if "scenario_name" not in df.columns: + df = df.merge(self.ms_inputs['Scenario'], on='scenario_seq') # Requires scenario_seq. Merges-in the scenario_name. + + return df \ No newline at end of file diff --git a/dse_do_utils/scenariodbmanager.py b/dse_do_utils/scenariodbmanager.py index fa1ee6e..dabf949 100644 --- a/dse_do_utils/scenariodbmanager.py +++ b/dse_do_utils/scenariodbmanager.py @@ -30,6 +30,7 @@ import re from sqlalchemy import exc, MetaData from sqlalchemy import Table, Column, String, Integer, Float, ForeignKey, ForeignKeyConstraint +import enum # Typing aliases from dse_do_utils import ScenarioManager @@ -37,7 +38,6 @@ Inputs = Dict[str, pd.DataFrame] Outputs = Dict[str, pd.DataFrame] -import enum class DatabaseType(enum.Enum): """Used in ScenarioDbManager.__init__ to specify the type of DB it is connecting to.""" @@ -52,8 +52,8 @@ class ScenarioDbTable(ABC): """ def __init__(self, db_table_name: str, - columns_metadata: List[sqlalchemy.Column] = [], - constraints_metadata: List[ForeignKeyConstraint] = []): + columns_metadata=None, + constraints_metadata=None): """ Warning: Do not use mixed case names for the db_table_name. Supplying a mixed-case is not working well and is causing DB FK errors. @@ -66,9 +66,13 @@ def __init__(self, db_table_name: str, :param columns_metadata: :param constraints_metadata: """ + if constraints_metadata is None: + constraints_metadata = [] + if columns_metadata is None: + columns_metadata = [] self.db_table_name = db_table_name # ScenarioDbTable.camel_case_to_snake_case(db_table_name) # To make sure it is a proper DB table name. Also allows us to use the scenario table name. - self.columns_metadata = self.resolve_metadata_column_conflicts(columns_metadata) + self.columns_metadata: List[sqlalchemy.Column] = self.resolve_metadata_column_conflicts(columns_metadata) self.constraints_metadata = constraints_metadata self.dtype = None if not db_table_name.islower() and not db_table_name.isupper(): ## I.e. is mixed_case @@ -488,10 +492,10 @@ class ScenarioDbManager(): def __init__(self, input_db_tables: Dict[str, ScenarioDbTable], output_db_tables: Dict[str, ScenarioDbTable], credentials=None, schema: str = None, echo: bool = False, multi_scenario: bool = True, enable_transactions: bool = True, enable_sqlite_fk: bool = True, enable_astype: bool = True, - enable_debug_print: bool = False, enable_scenario_seq: bool = False, - db_type: DatabaseType = DatabaseType.DB2, + enable_debug_print: bool = False, enable_scenario_seq: bool = True, + db_type: DatabaseType = DatabaseType.SQLite, use_custom_naming_convention: bool = False, - future: bool = False, + future: bool = True, ): """Create a ScenarioDbManager. @@ -2003,6 +2007,178 @@ def delete_scenario_seq_column(inputs: Inputs, outputs: Outputs) -> (Inputs, Out new_outputs[scenario_table_name] = df return new_inputs, new_outputs + ##################################################################################################### + # Insert, Update, Delete row + ##################################################################################################### + def insert_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._insert_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._insert_table_row(scenario_table_name, scenario_name, values, self.engine) + + def _insert_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """DRAFT. Insert one row of data. + TODO: handle update if it already exists: 'upsert' + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). + connection + """ + # raise NotImplementedError + + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot insert data into DB.") + + # TODO: add scenario_seq to values + # TODO: if values is a sequence, we need to convert to a Dict so that we can add a value? + scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + if scenario_seq is not None: + values['scenario_seq'] = scenario_seq + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot insert row.") + + stmt = ( + sqlalchemy.insert(db_table.get_sa_table()).values(values) + ) + try: + if connection is None: + self.engine.execute(stmt) + else: + connection.execute(stmt) + + except exc.IntegrityError as e: + print("++++++++++++Integrity Error+++++++++++++") + print(e) + except exc.StatementError as e: + print("++++++++++++Statement Error+++++++++++++") + print(e) + + def update_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._update_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._update_table_row(scenario_table_name, scenario_name, values, self.engine) + + def _update_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """DRAFT. Update one row of data. + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). + connection + """ + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot insert data into DB.") + + scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + if scenario_seq is not None: + values['scenario_seq'] = scenario_seq + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot insert row.") + + # Split values in 2 parts: + # 1. The primary keys + # 2. The other columns + primary_keys = [c.name for c in db_table.columns_metadata if c.primary_key and c.name != 'scenario_seq'and c.name != 'scenario_name' ] + pk_values = {k: v for k,v in values.items() if k in primary_keys} + pk_conditions = [(db_table.get_sa_column(k) == v) for k, v in pk_values.items()] # TODO: + column_values = {k: v for k,v in values.items() if k not in primary_keys and k not in['scenario_seq', 'scenario_name']} # remove PK values + t: sqlalchemy.Table = db_table.get_sa_table() + + if self.enable_scenario_seq: + if (scenario_seq := self._get_scenario_seq(scenario_name, connection)) is not None: + # print(f"ScenarioSeq = {scenario_seq}") + sql = t.update().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)).values(column_values) + # connection.execute(sql) # VT20230204: Duplicate execute? Will be done anyway at the end of this method! + else: + raise ValueError(f"No scenario with name {scenario_name} exists") + else: + sql = t.update().where(sqlalchemy.and_((t.c.scenario_name == scenario_name), *pk_conditions)).values(column_values) + + # TODO: this does NOT fail if the row doesn't exist. It simply doesn;t do anything !? How can we have this fail, so we can do an insert? + connection.execute(sql) + + + def upsert_table_row(self, scenario_table_name: str, scenario_name: str, values): + if self.enable_transactions: + # print("Insert row scenario within a transaction") + with self.engine.begin() as connection: + self._upsert_table_row(scenario_table_name, scenario_name, values, connection) + else: + self._upsert_table_row(scenario_table_name, scenario_name, values, self.engine) + + def _upsert_table_row(self, scenario_table_name: str, scenario_name: str, values, connection=None): + """Updates or inserts a row in a DB table. + Assumes the values contain all primary key values. + Other columns are optional. + If row exists, will update the row. If row doesn't exist, will do an insert. + Update also supports partial updates of non-pk fields. + Beware that a None will result in a NULL. + + Args: + scenario_table_name (str): Name of scenario table (as used in Inputs/Outputs, not the name in the DB) + scenario_name (str): scenario_name + values (Dict): values of row to be inserted. Typically, a Dict or tuple (e.g. from df.itertuples(). Must include values for all PK columns. + connection + + Raises errors for: + Unknown scenario_name + Primary Key value not in values + """ + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] + else: + raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot upsert data into DB.") + + # scenario_seq = self._get_scenario_seq(scenario_name=scenario_name, connection=connection) + # if scenario_seq is not None: + # values['scenario_seq'] = scenario_seq + # else: + # raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot upsert row.") + + # Split values in 2 parts: + # 1. The primary keys + # 2. The other columns + primary_keys = [c.name for c in db_table.columns_metadata if c.primary_key and c.name != 'scenario_seq'and c.name != 'scenario_name' ] + if not all(pk in values.keys() for pk in primary_keys): + raise ValueError(f"Not all required primary keys {primary_keys} specified in upsert request {values}") + # for pk in primary_keys: + # if pk not in values.keys(): + # raise ValueError(f"Primary key {pk} value not specified in upsert request") + pk_values = {k: v for k,v in values.items() if k in primary_keys} + pk_conditions = [(db_table.get_sa_column(k) == v) for k, v in pk_values.items()] + column_values = {k: v for k,v in values.items() if k not in primary_keys and k not in['scenario_seq', 'scenario_name']} # remove PK values + t: sqlalchemy.Table = db_table.get_sa_table() + + if self.enable_scenario_seq: + if (scenario_seq := self._get_scenario_seq(scenario_name, connection)) is not None: + # print(f"ScenarioSeq = {scenario_seq}") + # sql_exists = sqlalchemy.exists().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)) + sql_select = t.select().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)) #.exists() + res = connection.execute(sql_select) + count = res.rowcount + if count > 0: + # Update existing record + sql_update = t.update().where(sqlalchemy.and_((t.c.scenario_seq == scenario_seq), *pk_conditions)).values(column_values) + connection.execute(sql_update) + else: + # Insert new record + sql_insert = t.insert().values(values) + connection.execute(sql_insert) + else: + raise ValueError(f"Scenario name '{scenario_name}' is unknown. Cannot upsert row.") + else: + raise NotImplementedError(f"Upsert only supports enable_scenario_seq") + # TODO: implement. Easy to do. + # sql = t.update().where(sqlalchemy.and_((t.c.scenario_name == scenario_name), *pk_conditions)).values(column_values) + # connection.execute(sql) ####################################################################################################### # Input Tables ####################################################################################################### diff --git a/dse_do_utils/scenariorunner.py b/dse_do_utils/scenariorunner.py index a1049c0..065398e 100644 --- a/dse_do_utils/scenariorunner.py +++ b/dse_do_utils/scenariorunner.py @@ -11,9 +11,9 @@ from dse_do_utils import ScenarioManager, OptimizationEngine from dse_do_utils.datamanager import Inputs, Outputs, DataManager -from dse_do_utils.scenariodbmanager import ScenarioDbManager +from dse_do_utils.scenariodbmanager import ScenarioDbManager, DatabaseType from logging import Logger, getLogger -from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union +from typing import Any, Dict, Optional, Tuple, NamedTuple, Type, List, Union, TypeVar, Generic from dse_do_utils.scenariomanager import Platform @@ -42,7 +42,10 @@ class RunConfig: template_scenario_name: Optional[str] = None # 'TemplateScenario' -class ScenarioGenerator(): +SC = TypeVar('SC', bound='ScenarioConfig') + + +class ScenarioGenerator(Generic[SC]): """Generates a variation of a scenario, i.e. `inputs` dataset, driven by a ScenarioConfig. To be subclassed. This base class implements overrides of the Parameter table. @@ -60,10 +63,10 @@ def generate_scenario(self): def __init__(self, inputs: Inputs, - scenario_config: ScenarioConfig) -> None: + scenario_config: SC) -> None: self._logger: Logger = getLogger(__name__) self.inputs: Inputs = inputs.copy() # Only copy of dict - self.scenario_config: ScenarioConfig = scenario_config + self.scenario_config: SC = scenario_config def generate_scenario(self): """Generate a variation of the base_inputs. To be overridden. @@ -344,7 +347,7 @@ def data_check_inputs(self, inputs: Inputs, scenario_name: str = 'data_check', b Set bulk to False to get more granular DB insert errors, i.e. per record. TODO: add a data_check() on the DataManager for additional checks.""" self._logger.info('Checking input data via SQLite and DataManager') - self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class() + self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class(db_type=DatabaseType.SQLite) self.sqlite_scenario_db_manager.create_schema() self.sqlite_scenario_db_manager.replace_scenario_in_db(scenario_name, deepcopy(inputs), {}, bulk=bulk) @@ -361,7 +364,7 @@ def data_check_outputs(self, inputs: Inputs, outputs: Outputs, scenario_name: st TODO: add a data_check() on the DataManager for additional checks.""" self._logger.info('Checking output data via SQLite and DataManager') if self.sqlite_scenario_db_manager is None: - self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class() + self.sqlite_scenario_db_manager: ScenarioDbManager = self.scenario_db_manager_class(db_type=DatabaseType.SQLite) self.sqlite_scenario_db_manager.create_schema() self.sqlite_scenario_db_manager.replace_scenario_in_db(scenario_name, deepcopy(inputs), deepcopy(outputs), bulk=bulk) else: diff --git a/dse_do_utils/utilities.py b/dse_do_utils/utilities.py index fd13d17..247e341 100644 --- a/dse_do_utils/utilities.py +++ b/dse_do_utils/utilities.py @@ -118,8 +118,38 @@ def df_itertuples_with_index_names(df: pd.DataFrame): Index columns are added at the tail of the tuple, so to be compatible with code that uses the position of the fields in the tuple. Inspired by https://stackoverflow.com/questions/46151666/iterate-over-pandas-dataframe-with-multiindex-by-index-names. + + Notes: + * Does NOT work when df.Index has no names + TODO: does not work if only Index and no columns + TODO: test the combinations where row or Index are not tuples. Is row always a tuple? """ Row = namedtuple("Row", ['Index', *df.columns, *df.index.names]) for row in df.itertuples(): - yield Row(*(row + row.Index)) + # Option1 - Fails when Index is not a tuple + # yield Row(*(row + row.Index)) + + # Option 2 - In case the df has no columns? + if isinstance(row.Index, tuple): + yield Row(*(row + row.Index)) + else: + yield Row(*row, row.Index) + + # Option 3 - not necessary? + # if isinstance(row, tuple): + # if isinstance(row.Index, tuple): + # yield Row(*(row + row.Index)) + # else: + # yield Row(*row,row.Index) + # else: + # if isinstance(row.Index, tuple): + # yield Row(row, *row.Index) + # else: + # yield Row(row,row.Index) + + + # if isinstance(row, tuple): + # # + # yield Row(*((row) + (row.Index))) + # if isinstance(row, tuple): diff --git a/dse_do_utils/version.py b/dse_do_utils/version.py index 16e6970..732adff 100644 --- a/dse_do_utils/version.py +++ b/dse_do_utils/version.py @@ -9,4 +9,4 @@ See https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package """ -__version__ = "0.5.6.0" +__version__ = "0.5.7.0"