{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Connecting to server...\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import sys\n",
    "from RFEM.enums import *\n",
    "from math import pi\n",
    "from RFEM.initModel import Model, Calculate_all, insertSpaces, SetAddonStatus,clearAttributes, deleteEmptyAttributes, ConvertToDlString, ConvertToDlString\n",
    "from RFEM.enums import (\n",
    "    NodalSupportType, SurfaceLoadDirection,\n",
    "    SurfaceLoadDistribution, ActionCategoryType, LineSupportType,\n",
    "    MemberLoadDirection, MemberLoadDistribution, MemberType,\n",
    "    CaseObjectType, NodalLoadDirection,AddOn,DesignSituationType,SurfaceReinforcementLocationType, \n",
    "    SurfaceReinforcementType, SurfaceReinforcementDirectionType, SurfaceReinforcementDesignDirection,\n",
    "    DurabilityStructuralClassType, DurabilityAllowanceDeviationType,ReinforcementDirectionType,OptimizerType,\n",
    "    OptimizationTargetValueType,GlobalParameterUnitGroup, GlobalParameterDefinitionType, ObjectTypes,ActionCategoryType, ActionType, ObjectTypes,MaterialDefinitionType,\n",
    "    MaterialType, MaterialModel, MaterialStiffnessModificationType, PoissonRatioEditableGroupType,\n",
    ")\n",
    "\n",
    "from RFEM.LoadCasesAndCombinations.modalAnalysisSettings import ModalAnalysisSettings\n",
    "from RFEM.LoadCasesAndCombinations.stabilityAnalysisSettings import StabilityAnalysisSettings\n",
    "from RFEM.BasicObjects.node import Node\n",
    "from RFEM.BasicObjects.line import Line\n",
    "from RFEM.BasicObjects.material import Material\n",
    "from RFEM.BasicObjects.thickness import Thickness\n",
    "from RFEM.BasicObjects.surface import Surface\n",
    "from RFEM.BasicObjects.member import Member\n",
    "from RFEM.BasicObjects.section import Section\n",
    "from RFEM.TypesForLines.lineSupport import LineSupport\n",
    "from RFEM.TypesForNodes.nodalSupport import NodalSupport\n",
    "from RFEM.LoadCasesAndCombinations.loadCase import LoadCase\n",
    "from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings\n",
    "from RFEM.LoadCasesAndCombinations.loadCombination import LoadCombination\n",
    "from RFEM.LoadCasesAndCombinations.loadCasesAndCombinations import LoadCasesAndCombinations\n",
    "from RFEM.Loads.surfaceLoad import SurfaceLoad\n",
    "from RFEM.Loads.memberLoad import MemberLoad\n",
    "from RFEM.Loads.lineLoad import LineLoad\n",
    "from RFEM.Loads.nodalLoad import NodalLoad\n",
    "from RFEM.TypesForSurfaces.surfaceSupport import SurfaceSupport\n",
    "from RFEM.ImportExport.exports import ExportTo\n",
    "from RFEM.Results.resultTables import ResultTables, GetMaxValue, GetMinValue\n",
    "from RFEM.dataTypes import inf\n",
    "from RFEM.LoadCasesAndCombinations.designSituation import DesignSituation\n",
    "from RFEM.TypesforConcreteDesign.ConcreteSurfaceReinforcements import ConcreteSurfaceReinforcements\n",
    "from RFEM.TypesforConcreteDesign.ConcreteDurability import ConcreteDurability\n",
    "from RFEM.TypesforConcreteDesign.ConcreteReinforcementDirections import ConcreteReinforcementDirection\n",
    "from RFEM.ConcreteDesign.ConcreteServiceabilityConfigurations import ConcreteServiceabilityConfiguration\n",
    "from RFEM.ConcreteDesign.ConcreteUltimateConfigurations import ConcreteUltimateConfiguration\n",
    "from RFEM.Calculate.optimizationSettings import OptimizerType,OptimizationTargetValueType,OptimizationSettings \n",
    "from RFEM.globalParameter import GlobalParameter\n",
    "from RFEM.LoadCasesAndCombinations.action import Action\n",
    "# Neues leeres Modell mit Reset\n",
    "Model(True, 'MeinTestModell')\n",
    "SetAddonStatus(Model.clientModel,addOn=AddOn.modal_active, status=True)\n",
    "SetAddonStatus(Model.clientModel,addOn=AddOn.cost_estimation_active, status=True)\n",
    "SetAddonStatus(Model.clientModel,addOn=AddOn.concrete_design_active, status=True)\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "Model.clientModel.service.delete_all()  # 🔁 Alles löschen!\n",
    "Model.clientModel.service.begin_modification()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# GENERAL PROMPT\n",
    "\n",
    "#### I want to create a cylindrical steel pressure vessel with a diameter of 2m, heigt 5 m and an upper lid under snow load on the top. The support is at the bottom circular line. the thickness of the lid is 10 mm and for the cylinder shell 4 mm. the magnitude of the snow load is 0.25 kN/m²."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# MATERIAL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.BasicObjects.material.Material at 0x1716a1f3d90>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- Material Sec ----\n",
    "\n",
    "# Define materials with Germany region and standard\n",
    "Material(\n",
    "    no=1,\n",
    "    name='C20/25 | DIN EN 1992-1-1/NA/A1:2015-12',\n",
    "    comment='C20/25 mit deutschem NA',\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "Material(\n",
    "    no=2,\n",
    "    name='B550S(A)',\n",
    "    model=Model\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# GEOMETRY"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.BasicObjects.line.Line at 0x1716622bac0>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- Geometry Sec ----\n",
    "\n",
    "# Nodes (shared, no duplicates!)\n",
    "Node(1, 0,    0,  0)     # Common starting point\n",
    "Node(2, 0.75, 0,  0)     # Common end point of the shared edge\n",
    "Node(3, 0,    0, -1.0)   # Bottom of the vertical plate\n",
    "Node(4, 0.75, 0, -1.0)   # Bottom end of the vertical plate\n",
    "Node(5, 0,    1.0, 0)    # End of the horizontal plate in Y direction\n",
    "Node(6, 0.75, 1.0, 0)    # End of the horizontal plate in X and Y direction\n",
    "\n",
    "# Lines for the vertical plate\n",
    "Line(1, '1 3')           # Left edge of the vertical plate\n",
    "Line(2, '3 4')           # Bottom edge of the vertical plate\n",
    "Line(3, '4 2')           # Right edge of the vertical plate\n",
    "Line(4, '2 1')           # Shared edge between vertical and horizontal plates\n",
    "\n",
    "# Lines for the horizontal plate\n",
    "Line(5, '1 5')           # Front edge of the horizontal plate\n",
    "Line(6, '5 6')           # Back edge of the horizontal plate\n",
    "Line(7, '6 2')           # Right edge of the horizontal plate\n",
    "# Note: No duplicate line between nodes 2 and 1!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# CROSSSECTION"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.TypesForSurfaces.surfaceSupport.SurfaceSupport at 0x1716626f0e0>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- Cross Sections Sec ----\n",
    "\n",
    "# Define thicknesses for the vertical and horizontal plates\n",
    "Thickness(1, '20 cm', 1, 0.20)  # Vertical plate thickness\n",
    "Thickness(2, '22 cm', 1, 0.22)  # Horizontal plate thickness\n",
    "\n",
    "# Define surfaces for the vertical and horizontal plates\n",
    "Surface(1, '1 2 3 4', 1)  # Vertical plate surface\n",
    "Surface(2, '4 5 6 7', 2)  # Horizontal plate surface\n",
    "\n",
    "# Define surface support for the horizontal plate\n",
    "SurfaceSupport(1, '2', 1, 15000)  # Elastic support for the horizontal plate"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# LOADS"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- Loads Sec ----\n",
    "\n",
    "# --- Lastfälle ---\n",
    "LoadCase(1, 'Self-weight', [True, 0.0, 0.0, 1.0])\n",
    "LoadCase(2, 'Erddrucklast Nach Befüllung')\n",
    "\n",
    "# ---- Loads Sec ----\n",
    "# Define surface loads for Load Case 2\n",
    "# Linear varying surface load on the vertical plate\n",
    "SurfaceLoad.Force(\n",
    "    no=1,\n",
    "    load_case_no=2,\n",
    "    surface_no='1',\n",
    "    load_direction=SurfaceLoadDirection.LOAD_DIRECTION_LOCAL_Z,\n",
    "    load_distribution=SurfaceLoadDistribution.LOAD_DISTRIBUTION_VARYING_IN_Z,\n",
    "    load_parameter=[[-1, 0], [0, 50 * 1000]]\n",
    ")\n",
    "\n",
    "# Constant surface load on the horizontal plate\n",
    "SurfaceLoad.Force(\n",
    "    no=2,\n",
    "    load_case_no=2,\n",
    "    surface_no='2',\n",
    "    load_direction=SurfaceLoadDirection.LOAD_DIRECTION_LOCAL_Z,\n",
    "    load_distribution=SurfaceLoadDistribution.LOAD_DISTRIBUTION_UNIFORM,\n",
    "    load_parameter=[100 * 1000]\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Designsituatuion"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.LoadCasesAndCombinations.loadCombination.LoadCombination at 0x1716626ecf0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- DesignSituation Section ----\n",
    "\n",
    "DesignSituation(\n",
    "    no=1,\n",
    "    design_situation_type=DesignSituationType.DESIGN_SITUATION_TYPE_STR_PERMANENT_AND_TRANSIENT_6_10,\n",
    "    active=True,\n",
    "    name=\"GZT Ständig und vorübergehend (6.10)\",\n",
    "    comment='This is a permanent and transient design situation according to DIN EN 1990, combination 6.10.',\n",
    "    params=None,\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "# ---- LoadCombination Section ----\n",
    "\n",
    "LoadCombination(\n",
    "    no=1,\n",
    "    analysis_type=AnalysisType.ANALYSIS_TYPE_STATIC,\n",
    "    name='ULS Kombination',\n",
    "    static_analysis_settings=1,\n",
    "    to_solve=True,\n",
    "    design_situation=1,\n",
    "    combination_items=[\n",
    "        [1.35, 1, 0, True],  # Load case 1 (Eigengewicht) with factor 1.35\n",
    "        [1.5, 2, 0, True]    # Load case 2 (Nutzlast) with factor 1.5\n",
    "    ]\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ConcreteDurability"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.TypesforConcreteDesign.ConcreteDurability.ConcreteDurability at 0x1716626eba0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- ConcreteDurability Section ----\n",
    "\n",
    "ConcreteDurability(\n",
    "    no=1,\n",
    "    name=\"XC 1\",\n",
    "    members_no=\"1\",  # Applies to member 1\n",
    "    member_sets_no=\"1\",  # Applies to member set 1\n",
    "    surfaces_no=\"2, 1\",  # Applies to surfaces 2 and 1\n",
    "    exposure_classes_reinforcement=[True, False, False, False],  # Only XC is activated for reinforcement\n",
    "    exposure_classes_reinforcement_types=[1],  # Type of exposure class (e.g., XC1 = 1)\n",
    "    exposure_classes_concrete=[False, False, False],  # Concrete exposure classes are not active\n",
    "    exposure_classes_concrete_types=[],  # No types for concrete as it's not active\n",
    "    structural_class=[DurabilityStructuralClassType.STANDARD, False, False, False, False],  # Structural class set to \"Standard\"\n",
    "    stainless_steel_reduction=[False],  # Stainless steel reduction not activated\n",
    "    additional_protection_reduction=[False],  # Additional protection not activated\n",
    "    allowance_deviation=[DurabilityAllowanceDeviationType.STANDARD, False],  # Standard deviation for tolerances\n",
    "    comment=\"Mein Test für Dauerhaftigkeit\",  # Comment for the durability definition\n",
    "    params=None,  # Additional parameters if needed\n",
    "    model=Model  # The model to which this durability definition belongs\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ConcreteReinforcementDirection"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.TypesforConcreteDesign.ConcreteReinforcementDirections.ConcreteReinforcementDirection at 0x1716626ea50>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- ConcreteReinforcementDirection Section ----\n",
    "\n",
    "ConcreteReinforcementDirection(\n",
    "    no=1,\n",
    "    name=\"RD 1\",\n",
    "    surfaces=\"1 2\",  # Surfaces 1 and 2\n",
    "    reinforcement_direction_type=ReinforcementDirectionType.REINFORCEMENT_DIRECTION_TYPE_FIRST_REINFORCEMENT_IN_Y,  # Reinforcement in Y-direction\n",
    "    rotation_parameters=[False, 0.0],  # No manual rotation angle\n",
    "    comment=\"Bewehrung in Y-Richtung für Fläche 1 und 2\",  # Comment for the reinforcement direction\n",
    "    params=None,  # Additional parameters if needed\n",
    "    model=Model  # The model to which this reinforcement direction belongs\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ConcreteSurfaceReinforcements"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.TypesforConcreteDesign.ConcreteSurfaceReinforcements.ConcreteSurfaceReinforcements at 0x1716626ee40>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- ConcreteSurfaceReinforcements Section ----\n",
    "\n",
    "ConcreteSurfaceReinforcements(\n",
    "    no=1,\n",
    "    name='OBERBEWEHRUNG',\n",
    "    surfaces='1, 2',  # Surfaces 1 and 2\n",
    "    material='2',  # Concrete material number 2\n",
    "    location_type=SurfaceReinforcementLocationType.LOCATION_TYPE_ON_SURFACE,  # Reinforcement on the surface\n",
    "    reinforcement_type=SurfaceReinforcementType.REINFORCEMENT_TYPE_REBAR,  # Rebar type reinforcement\n",
    "    reinforcement_type_parameters=[0.012, 0.15, False],  # 12 mm diameter, 15 cm spacing, no stirrups\n",
    "    cover_offset=[True, True, 0.03, 0.03],  # Cover offset 3 cm top and bottom\n",
    "    reinforcement_direction=SurfaceReinforcementDirectionType.REINFORCEMENT_DIRECTION_TYPE_IN_DESIGN_REINFORCEMENT_DIRECTION,  # In design direction As1\n",
    "    reinforcement_direction_parameters=[SurfaceReinforcementDesignDirection.DESIGN_REINFORCEMENT_DIRECTION_A_S_1],\n",
    "    comment='Obere Bewehrung Fläche 1',  # Comment for the reinforcement\n",
    "    params=None,  # Additional parameters if needed\n",
    "    model=Model  # The model to which this reinforcement belongs\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ConcreteUltimateConfiguration\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.ConcreteDesign.ConcreteUltimateConfigurations.ConcreteUltimateConfiguration at 0x1716626ef90>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- ConcreteUltimateConfiguration Section ----\n",
    "\n",
    "ConcreteUltimateConfiguration(\n",
    "    no=1,\n",
    "    name='ULS Standard',\n",
    "    members='1 2 3',  # Members 1 to 3\n",
    "    member_sets='All',  # All member sets\n",
    "    surfaces='1 2',  # Surfaces 1 and 2\n",
    "    surface_sets='1, 2',  # Surface sets 1 and 2\n",
    "    nodes='1, 2, 3, 4, 5, 6',  # Nodes 1 to 6\n",
    "    comment='Standard ULS für Platten und Träger',  # Comment for the ULS configuration\n",
    "    params=None,  # Additional parameters if needed\n",
    "    model=Model  # The model to which this ULS configuration belongs\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Global Parametrs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ---- GlobalParameter Section ----\n",
    "\n",
    "# 1. Fixed Geometry Parameters\n",
    "GlobalParameter.AddParameter(\n",
    "    no=1,\n",
    "    name='Breite',\n",
    "    symbol='b',\n",
    "    unit_group=GlobalParameterUnitGroup.LENGTH,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_VALUE,\n",
    "    definition_parameter=[0.75],  # 0.75 m\n",
    "    comment=\"Breite des horizontalen Fundaments\",\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "GlobalParameter.AddParameter(\n",
    "    no=2,\n",
    "    name='Hoehe',\n",
    "    symbol='h',\n",
    "    unit_group=GlobalParameterUnitGroup.LENGTH,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_VALUE,\n",
    "    definition_parameter=[1.0],  # 1.00 m\n",
    "    comment=\"Höhe der Wandplatte\",\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "# 2. Optimizable Thicknesses\n",
    "GlobalParameter.AddParameter(\n",
    "    no=3,\n",
    "    name='Wanddicke',\n",
    "    symbol='d_w',\n",
    "    unit_group=GlobalParameterUnitGroup.LENGTH,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION,\n",
    "    definition_parameter=[0.20, 0.15, 0.30, 4],  # Start value, min, max, steps\n",
    "    comment=\"Optimierbare Dicke der Wandplatte\",\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "GlobalParameter.AddParameter(\n",
    "    no=4,\n",
    "    name='Fundamentdicke',\n",
    "    symbol='d_f',\n",
    "    unit_group=GlobalParameterUnitGroup.LENGTH,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION,\n",
    "    definition_parameter=[0.30, 0.20, 0.50, 4],  # Start value, min, max, steps\n",
    "    comment=\"Optimierbare Dicke der Fundamentplatte\",\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "# 3. Area Parameters with Formulas\n",
    "GlobalParameter.AddParameter(\n",
    "    no=5,\n",
    "    name='Flaeche_Wand',\n",
    "    symbol='A_w',\n",
    "    unit_group=GlobalParameterUnitGroup.AREA,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_FORMULA,\n",
    "    definition_parameter=['d_w*h'],  # Formula using symbols\n",
    "    comment=\"Wandfläche für Bewertung\",\n",
    "    model=Model\n",
    ")\n",
    "\n",
    "GlobalParameter.AddParameter(\n",
    "    no=6,\n",
    "    name='Flaeche_Fundament',\n",
    "    symbol='A_f',\n",
    "    unit_group=GlobalParameterUnitGroup.AREA,\n",
    "    definition_type=GlobalParameterDefinitionType.DEFINITION_TYPE_FORMULA,\n",
    "    definition_parameter=['d_f*b'],  # Formula using symbols\n",
    "    comment=\"Fundamentfläche für Bewertung\",\n",
    "    model=Model\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Optimierung Value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<RFEM.Calculate.optimizationSettings.OptimizationSettings at 0x1716626e7b0>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ---- OptimizationSettings Section ----\n",
    "\n",
    "OptimizationSettings(\n",
    "    no=1,\n",
    "    number_of_mutations_to_keep=None,  # Not specified, so set to None\n",
    "    target_value_type=OptimizationTargetValueType.MIN_CO2_EMISSIONS,  # Target is to minimize CO2 emissions\n",
    "    optimizer_type=OptimizerType.ALL_MUTATIONS,  # Using all mutations\n",
    "    percent_of_mutations=0.2,  # 20% mutation rate\n",
    "    optimization_values_table=None,  # No specific table provided\n",
    "    total_number_of_mutations=1,  # Total number of mutations set to 1\n",
    "    active=True,  # The optimization setting is active\n",
    "    name=\"CO2-Optimierung\",  # Name of the optimization setting\n",
    "    comment=\"Ziel: Minimale CO₂-Emissionen\",  # Comment for the optimization setting\n",
    "    params=None,  # Additional parameters if needed\n",
    "    model=Model  # The model to which this optimization setting belongs\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Calculate Call"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<suds.sudsobject.calculation_result at 0x1716466e5d0>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Model.clientModel.service.finish_modification()\n",
    "Calculate_all()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# GET RESULTS"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
