OMEGAlpes issueshttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues2022-04-29T09:51:58+02:00https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/78Import incident when using mybinder2022-04-29T09:51:58+02:00Sacha HodencqImport incident when using mybinderWhen launching mybinder for an OMEGAlpes notebook, an import error often occurs. For instance, when importing LpDictVariable on the [BS2019 PV self-consumption notebook](https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes_ex...When launching mybinder for an OMEGAlpes notebook, an import error often occurs. For instance, when importing LpDictVariable on the [BS2019 PV self-consumption notebook](https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes_examples/-/blob/master/notebooks/article_2019_BS_PV_self_consumption.ipynb)Sacha HodencqSacha Hodencqhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/77PV_self_consumption.ipynb is not compatible with the master branch2021-12-20T15:49:08+01:00Pierre AttardPV_self_consumption.ipynb is not compatible with the master branch```PV_self_consumption.ipynb``` notebook in examples folder does not run on the master branch.
The first code cell ```from .PV_self_consumption_utils import *``` does not run because ```PV_self_consumption_utils``` does not exist.
The...```PV_self_consumption.ipynb``` notebook in examples folder does not run on the master branch.
The first code cell ```from .PV_self_consumption_utils import *``` does not run because ```PV_self_consumption_utils``` does not exist.
The code cell 4 has a wrong parameter in class constructor ```VariableProductionUnit```. It seems that the paramater is ```p_max``` and not ```pmax```.
I just realized that there is a repo dedicated to examples, maybe that's why the omegAlpes example in the main repo doesn't work !!
Thanks !https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/76Proposed simulation of self-consumption can be ambiguous2021-11-18T11:17:13+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgProposed simulation of self-consumption can be ambiguousIn the tutorial notebook **To_Modify__PV_self_consumption_eng** which presents the modelling and optimization of an energetic system of an individual house, maximizing the self-consumption is proposed by minimizing the imports from the g...In the tutorial notebook **To_Modify__PV_self_consumption_eng** which presents the modelling and optimization of an energetic system of an individual house, maximizing the self-consumption is proposed by minimizing the imports from the grid ( **imports.minimize_production** ). This is proposed without further explanations.
This issue is about underlining the fact that this restrictions (**imports.minimize_production**) isn't sufficient to really achieve an optimization of self-consumption with respect to the grid. Although this is going to give a great approximation of self-consomption/self-production ratio on the period, this method doesn't give restrictions on the exports behavior. Therefore, this method lead to an anormal use of exports and is not modelling a correct storage when looking at the step to step behavior.
Optimizing the self-consumption should be constructed by two restrictions : one on the imports ( **imports.minimize_production** ) and one on the exports ( **exports.minimize_consumption** ).
To illustrate this difference, here is two cases of a self-consumption optimization for a building with a load, a production and a battery. The first case doesn't include the exports restriction, while the next one includes both restrictions.
![sans_restriction](/uploads/1387416aac97e8f776190324875a5ae6/sans_restriction.JPG)
![avec_restriction](/uploads/7c9045e0e200dd7334721bd3de4bcf99/avec_restriction.JPG)
In green, it is the battery behavior (positive value is charging, negative value is discharging. It is possible to notice that without the restrictions on the exports, the battery is charging and exporting (which is not the optimal behavior) rather than storing the energy to use it when the production is low (which is optimizing the self-consumption).https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/75Self-Consumption informations2021-11-18T11:17:19+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgSelf-Consumption informationsAs I used Omegalpes on the self-consumption theme, I think it may be interesting and realisable to implement self-consumption indicators. The simple case of a node with one consumption unit connected can easily be investigated, and furth...As I used Omegalpes on the self-consumption theme, I think it may be interesting and realisable to implement self-consumption indicators. The simple case of a node with one consumption unit connected can easily be investigated, and further works on the architecture to implement it with the whole units and possibilities of Omegalpes represent a massive but really interesting work.https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/74API consistency2021-12-20T16:06:17+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgAPI consistencyWorking with a FixedProductionUnit (pv_prod) and a StorageUnit (battery), I thought that the oriented object programmation of objects would be similar. However, I found that **pv_prod.p.value** gives access to a list of produced power va...Working with a FixedProductionUnit (pv_prod) and a StorageUnit (battery), I thought that the oriented object programmation of objects would be similar. However, I found that **pv_prod.p.value** gives access to a list of produced power values on the period but **battery.p.value** gives access to a dictionnary containing the index of the period as key and the charged/discharged power as values. With the StorageUnit, to access a list of power values, the adequate command is **battery.p.value.values()** .
The question is : could it be possible to achieve an perfect similitude between behaviors of both units ? Furthermore, this problem may exist between other units as well (VariableUnit etc..).https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/73Inconsistency between units W or kW2021-11-18T11:15:51+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgInconsistency between units W or kWFixedProductionUnit and FixedConsumptionUnit asked to provide profile in Watts.
However, the plot_node_energetic_flows is plotting a graph with kW as y-axis, which lead to a false graph if the above unit recommandation is followed.
My a...FixedProductionUnit and FixedConsumptionUnit asked to provide profile in Watts.
However, the plot_node_energetic_flows is plotting a graph with kW as y-axis, which lead to a false graph if the above unit recommandation is followed.
My advice would be to choose a base unit (kW in my opinion) and work with it everywhere.https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/72LPFICS : find_infeasible_constraint_set method doesn't exist2021-12-20T16:18:46+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgLPFICS : find_infeasible_constraint_set method doesn't exist### Summary
When trying to optimize a model with the method **model.solve_and_update()**, it may be possible that this is infeasible. In this case, an error message is printed and tells the user to use LFPICS to find the reason of the i...### Summary
When trying to optimize a model with the method **model.solve_and_update()**, it may be possible that this is infeasible. In this case, an error message is printed and tells the user to use LFPICS to find the reason of the infeasibility.
However, after downloading and installing the FPCIS, the method **find_infeasible_constraint_set** doesn't exist, neither than all the other methods that the massage is indicating.https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/71Argument of Unit (elec, heat, etc...) - Trouble with the type of the argument2021-11-18T11:14:56+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgArgument of Unit (elec, heat, etc...) - Trouble with the type of the argument### Summary
Some units such as the VariableConsumptionUnit are asking an **energy_type** argument. In the tutorial notebook, this argument is for example set to **elec** or **heat** (without " " around, which means that they are defined...### Summary
Some units such as the VariableConsumptionUnit are asking an **energy_type** argument. In the tutorial notebook, this argument is for example set to **elec** or **heat** (without " " around, which means that they are defined variable and not string). In fact, these arguments are imported from class where for example the variable **elec = str(elec)**
My recommandation would be to ask directly a string as argument, coming from a detailled list available in the documentation. This is more practical than importing the variables.https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/70Organization of the Git - Split between tutorial notebooks, unfunctionnal not...2021-11-18T11:14:31+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgOrganization of the Git - Split between tutorial notebooks, unfunctionnal notebooks and article notebooksFinding the tutorial notebooks could be improve byt dedicating a clear file, which would make them apart from the article notebooks and the other notebooksFinding the tutorial notebooks could be improve byt dedicating a clear file, which would make them apart from the article notebooks and the other notebookshttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/69Interference between zoom and scroll - Graphical interface2021-12-20T16:30:00+01:00Pierre-Thomas Demarspierre-thomas.demars@grenoble-inp.orgInterference between zoom and scroll - Graphical interface
### Summary
When you scroll in the parameters menu of an item of the graphical interface, it is also activating the zoom of the schematic.
### Steps to reproduce
- open the graphical interface
- insert an item
- open the parameters ...
### Summary
When you scroll in the parameters menu of an item of the graphical interface, it is also activating the zoom of the schematic.
### Steps to reproduce
- open the graphical interface
- insert an item
- open the parameters of the item
- scroll in these parameters
- behind the menu, you will see that it is also zooming and dezooming the schematic
### What is the expected *correct* behavior?
The scroll should not have an impact on the zoomhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/68OMEGALPES Version Bug2021-10-20T15:11:59+02:00EXT HaichengLINGOMEGALPES Version Bug
### Summary
J'ai créé un model simple d'OMEGalpes avec un node unique, un unité de énergy shiftable, un unité de énergy non shiftable, un pv production, import de réseau et export de réseau (voir graphe ci-dessous). J'ai essayé de maxi...
### Summary
J'ai créé un model simple d'OMEGalpes avec un node unique, un unité de énergy shiftable, un unité de énergy non shiftable, un pv production, import de réseau et export de réseau (voir graphe ci-dessous). J'ai essayé de maximizer le taux d'autoconsommation de ce système. Pour OMEGALPES 0.3.0, mon model marche bien, mais pour OMEGALPES 0.4.0, la somme de l'énergy shiftable est doublé après l'optimization.
![image](/uploads/ce64671e99010376c44d9b285489ddae/image.png)
### Steps to reproduce
Code ci-dessous pour mon modèle simple.
```
from omegalpes.energy.energy_nodes import EnergyNode
from omegalpes.energy.units.consumption_units import VariableConsumptionUnit, \
FixedConsumptionUnit, \
ShiftableConsumptionUnit
from omegalpes.energy.units.conversion_units import \
ElectricalToThermalConversionUnit
from omegalpes.energy.units.production_units import FixedProductionUnit, \
VariableProductionUnit
from omegalpes.energy.units.storage_units import StorageUnit
from omegalpes.general.optimisation.elements import DynamicConstraint, \
ActorDynamicConstraint
from omegalpes.general.optimisation.model import OptimisationModel
from omegalpes.general.utils.plots import plt, plot_node_energetic_flows
from omegalpes.general.utils.output_data import save_energy_flows
from omegalpes.general.time import TimeUnit
import time as pytime
ticks=pytime.time()
time=TimeUnit(periods=24*2,dt=0.5)
model = OptimisationModel(time=time, name='test1')
shiftable_profil=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.9539886794999997,15.615420819999999,11.920456660000001,11.686931215000001,6.328051115000001,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4.9798052539999995,2.3410368835,1.198254565,5.09158163,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
non_shiftable_profil=[0.37543609600000005,0.3827568758,0.41772119455,0.41300544539999995,0.37572268635000006,0.45921000115,0.40829399094999996,0.3626934204999999,0.40511711730000005,0.45187492395,0.3541168846,2.0367472584999997,5.593399205000001,3.2283945739999997,1.8756685155000001,5.161145234999999,4.257118335,0.2818472856,0.39048589219999996,0.525636969,0.39893672599999996,0.3304699479,0.35347408525,1.8127138985,19.184854825,9.824261025,2.7618319745,2.8369244629999995,2.8619368235000002,5.112723865,13.10237332,0.422179015,0.50466066,0.3183611662,0.2983260663,0.55899239,0.36345739684999995,0.2980055731,0.41351376185,1.070029914,1.1156348735000001,0.5006441875,0.4488774645,0.3891072421,0.3614403071,0.3448761461,0.38707076985,0.37071801174999996]
pv_production_j1=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.524,4.07,4.106,8.404,7.148,10.054,9.658,14.5,4.798,8.348,17.664,8.268,6.598,24.48,28.418,22.656,21.186,10.436,6.79,3.64,2.738,3.93,4.062,5.51,0.608,0.124,0.0,0.0,0.0,0.0,0.0,0.0, 0.0]
non_shiftable_consommation=FixedConsumptionUnit(time, 'non_shiftable_consommation', energy_type='Electrical', p=non_shiftable_profil)
shiftable_consommation= ShiftableConsumptionUnit(time, name='shiftable_consommation',
power_values=shiftable_profil,
energy_type='Electrical')
# Create the electrical grid imports as a production
elec_grid_imports = VariableProductionUnit(time, 'elec_grid_imports',
energy_type='Electrical')
# Create the electrical grid exports as a consumption
elec_grid_exports = VariableConsumptionUnit(time, 'elec_grid_exports',
energy_type='Electrical')
PV_prod_j1 = FixedProductionUnit(time, name='PV_prod_j1',energy_type='Electrical', p= pv_production_j1)
imp_exp = DynamicConstraint(name='imp_exp',
exp_t='elec_grid_imports_u[t] + '
'elec_grid_exports_u[t] <= 1.5',
parent=elec_grid_imports)
# Add the constraint to the elec_grid_imports model
setattr(elec_grid_imports, 'imp_exp', imp_exp)
elec_grid_imports.minimize_production()
elec_node = EnergyNode(time, 'elec_node', energy_type='Electrical')
elec_node.connect_units(shiftable_consommation,non_shiftable_consommation,elec_grid_imports,
elec_grid_exports, PV_prod_j1)
model.add_nodes(elec_node)
new_time = pytime.time()
print('duration =', new_time - ticks)
model.solve_and_update()
flows = elec_node.get_flows
profile_table=pd.Series()
for flow in flows:
label = flow.parent.name
parent = flow.parent
# Get the power profiles
if isinstance(flow.value, list):
energy_flow = flow.value
elif isinstance(flow.value, dict):
energy_flow = list(flow.value.values())
energy_flow_data=pd.Series(energy_flow,name=label )
profile_table=pd.concat([profile_table,energy_flow_data],axis=1)
print(sum(profile_table['shiftable_consommation']))
print('*'*20)
print(sum(shiftable_profil))
```
### What is the current *bug* behavior?
Marche bien pour 0.3.0, mais pas pour Omegalpes 0.4.0,la somme de l'énergy shiftable est doubléSacha HodencqSacha Hodencqhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/67Question pour ajouter nodes2021-10-26T09:57:46+02:00EXT HaichengLINGQuestion pour ajouter nodesBonjour,
J'ai utilisé OMEGalpes pour créer model d'autoconsomation collective(image ci-dessous). J'ai utilisé un boucle for pour créer des nodes et des utité connecté. Mais quand je veux ajouter des nodes, ça ne marche pas d'ajouter les...Bonjour,
J'ai utilisé OMEGalpes pour créer model d'autoconsomation collective(image ci-dessous). J'ai utilisé un boucle for pour créer des nodes et des utité connecté. Mais quand je veux ajouter des nodes, ça ne marche pas d'ajouter les nodes 1 par 1 dans boucle 'for', il faut que j'ajoute tous les nodes en même temps.
Ce que je veux faire est de générer automatiquement le model pour tous les autoconsommation collectif, donc je cherche un moyenne de regrouper les nodes qui est créé dans le boucle 'for'(pour différent opération, le nombre de node est varié) et les ajoute avec add_nodes.
Est-ce que vous saver comment le faire
Merci en avance,
Cordialement
![image](/uploads/7216afd41fb2fab3e6a01c4c0975afda/image.png)Mathieu BrugeronMathieu Brugeronhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/66e_max & e_min and time step consideration2021-02-26T12:06:03+01:00Sacha Hodencqe_max & e_min and time step considerationThe time step is considered twice in e_max and e_min calculation:
- in the e_tot calculation, that is consistent to get an energy value for e_tot from a power values sum : `{0}_e_tot == time.DT * lpSum({0}_p[t] for t in time.I)`
- ...The time step is considered twice in e_max and e_min calculation:
- in the e_tot calculation, that is consistent to get an energy value for e_tot from a power values sum : `{0}_e_tot == time.DT * lpSum({0}_p[t] for t in time.I)`
- in the e_max and e_min : `'time.DT*{0}_e_tot >= {1}'.format(self.name, e_min),`Sacha HodencqSacha Hodencqhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/65lpfics - print problem2021-02-03T15:48:31+01:00Mathieu Brugeronlpfics - print problem### Summary
lpfics infesible search function having an error message during the run
!!! pulp version 2.0 !!!
### Steps to reproduce
download the lpfics package and then use the find_infeasible_constraint_set on a infeasible model
as ...### Summary
lpfics infesible search function having an error message during the run
!!! pulp version 2.0 !!!
### Steps to reproduce
download the lpfics package and then use the find_infeasible_constraint_set on a infeasible model
as follows
from lpfics.lpfics import find_infeasible_constraint_set
find_infeasible_constraint_set(optim_model)
### Example Project
Any example project where you create a infeasible data set entry
### What is the current *bug* behavior?
the method isn't working because the LpConstraint object doesn't have any cst attribute
### What is the expected *correct* behavior?
a set of constraint which contains the infeasible constraints should be printed on the pycharm terminal
### Relevant logs and/or screenshots, python output
![image](/uploads/ff96b96e0825bc7312a4200f7f1d466e/image.png)
### Possible fixes
I would say that it's due to a change from the lp creation from pulp, which have modified the attributes od the LpConstraint which doesn't contain the type of Constraint the same way. I'm looking forward a way of solving thisMathieu BrugeronMathieu Brugeronhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/64Color code for OMEGAlpes graphic representation2020-12-10T18:41:23+01:00Sacha HodencqColor code for OMEGAlpes graphic representationBefore updating OMEGalpes documentation regarding its graphic documentation with its current version (commit 61c9d79c97450c3929ecbfd2a7776f4c4ac0f491) , some questions and thoughts:
- What color for:
- Gas : green that is more common f...Before updating OMEGalpes documentation regarding its graphic documentation with its current version (commit 61c9d79c97450c3929ecbfd2a7776f4c4ac0f491) , some questions and thoughts:
- What color for:
- Gas : green that is more common for gas instead of the current yellow
- Electriity : blue that is also more standard, but currently for cold
- conversion_unit : black empty rectangle rather than green full one.
- Differentiating hot and cold or keeping thermal energy type. Question of the thermal dissipation units where hot and cold would not be able to mix.Sacha HodencqSacha Hodencqhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/63get_value() does not take into account the time step when returning a list2020-10-27T22:28:09+01:00Lou Morrietget_value() does not take into account the time step when returning a list### Summary
get_value() of a dataframe does not take into account the time step when returning a list.
So the result could be the double of expected if the time step of the study is 1/2
### Possible fixes
adding a new method or update g...### Summary
get_value() of a dataframe does not take into account the time step when returning a list.
So the result could be the double of expected if the time step of the study is 1/2
### Possible fixes
adding a new method or update get_value considering what is better
At the same time: move get_value() to utils/output_datahttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/62"Ghost" additional energy production whenever a ConversionUnit's outlet is li...2020-10-23T17:08:22+02:00EXT Jaume Fitó"Ghost" additional energy production whenever a ConversionUnit's outlet is linked to more than 1 nodeIt seems that when the production sub-unit of a Conversion Unit is linked directly to more than 1 Energy Node, OMEGAlpes "assumes" that the unit can deliver its maximum power output to **all nodes at the same time**. As a result, the tot...It seems that when the production sub-unit of a Conversion Unit is linked directly to more than 1 Energy Node, OMEGAlpes "assumes" that the unit can deliver its maximum power output to **all nodes at the same time**. As a result, the total energy delivered by the ConversionUnit can be up to X times superior to its actual maximum production, with X being the number of downstream nodes connected to the production sub-unit.
Results plotted for the energy nodes reveal this "ghost" additional production, but otherwise it goes unnoticed by the Conversion Unit. The production sub-unit's "e_tot" respects the Conversion Unit's energy balance, but the aggregated energy received by all downstream nodes connected to the production sub-unit does not. Apparently, OMEGAlpes does not give any Warning for this misformulation. The user can only notice by analyzing the profiles.
I'm aware that the proper way to code it user-level would be to connect the ConversionUnit.production_unit to just 1 Node, which then exports to all target nodes downstream. But anyway, there should be some mechanism to protect users from this issue.
----------
_**Example:**_
![issue_diagram](/uploads/d0a64ea0a1a6370874c7f86febd75947/issue_diagram.png)
_solar_thermal_collectors = ElectricalToThermalConversionUnit(time, name='solar_thermal_collectors', elec_to_therm_ratio=0.7)_
_space_heating_node = EnergyNode(time, name='space_heating_node', energy_type='Thermal')_
_dhw_node = EnergyNode(time, name='dhw_node', energy_type='Thermal')_
_space_heating_node.connect_units(solar_thermal_collectors.thermal_production_unit,
heat_pump_heating.thermal_production_unit,
zac_2_heating, zac_3_heating, hameau_heating)_
_dhw_node.connect_units(thermal_storage, zac_2_dhw, zac_3_dhw,
hameau_dhw, heat_pump_dhw.thermal_production_unit,
solar_thermal_collectors.thermal_production_unit)_
----------
**ElectricalToThermalConversionUnit's inlet and outlet power profiles:**
(It can be seen that the energy balance is respected)
![solar_thermal_panel](/uploads/1e3dc4bf206e7b13da7ab34933ee8d0b/solar_thermal_panel.png)
**Both nodes downstream:**
(At every time step between t = 9 h and t = 16 h the Energy Nodes are receiving from the ElectricalToThermalConversionUnit, in total, twice the maximum energy that that unit can possibly deliver.)
![space_heating_node](/uploads/672d698593a73203ad4206869d7ff293/space_heating_node.png)
![dhw_node](/uploads/28d9e85f40d55d5e8eb0deacc2ccfab8/dhw_node.png)https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/61Alternate operation (i.e. non-simultaneous) of 2 or more Variable units2020-10-22T15:40:22+02:00EXT Jaume FitóAlternate operation (i.e. non-simultaneous) of 2 or more Variable unitsIn some studies, it may be necessary to force 2 or more Variable units to **never** operate simultaneously.
Current OMEGAlpes' tools maybe allow reaching an equivalent scenario by the means of "tricks" such as limiting maximal power ou...In some studies, it may be necessary to force 2 or more Variable units to **never** operate simultaneously.
Current OMEGAlpes' tools maybe allow reaching an equivalent scenario by the means of "tricks" such as limiting maximal power outputs, or dissociating fixed energy profiles, or perhaps through a more complex node structure. Anyway, enabling users to use this feature easily could be worth the effort.
Perhaps a good start would be coding it within AssemblyUnits, and making it activatable through a binary variable ("alternate_operation") which defaults to 0. This way, units meant to not proceed simultaneously can be instantiated within an AssemblyUnit and alternate operation can be switched on and off.Sacha HodencqSacha Hodencqhttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/60No attribute _external_constraint_list in EnergyNode2020-10-22T14:35:00+02:00Sacha HodencqNo attribute _external_constraint_list in EnergyNode<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "Bug" label, following this link :
- https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/issues?label_name%...<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "Bug" label, following this link :
- https://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/issues?label_name%5B%5D=bug
and verify the issue you're about to submit isn't a duplicate.
--->
### Summary
When running a simple use case (LNCMI notebook), the following error occurs :
```
AttributeError Traceback (most recent call last)
D:\00 - Eco-SESA\02 - Outils\OMEGAlpes\omegalpes_examples\notebooks\python_scripts\NB_LNCMI.py in updateData(click)
292 lncmi_case(elec2heat_ratio=ELEC_TO_HEAT_RATIO, capacity=CAPA_STORAGE,
293 cop_hp=COP,pmax_elec_hp=P_MAX_HP,
--> 294 storage_soc_0=SOC_0_STORAGE, pmin_recovery=PMIN_RECOVERY)
295
296 display(runPlotButton)
D:\00 - Eco-SESA\02 - Outils\OMEGAlpes\omegalpes_examples\notebooks\python_scripts\NB_LNCMI.py in lncmi_case(elec2heat_ratio, capacity, cop_hp, pmax_elec_hp, storage_soc_0, pmin_recovery)
172 heat_node_lncmi.export_min = \
173 ExtDynConstraint(name='pmin_recovery', exp_t=pmin_rec_cst_exp,
--> 174 t_range='for t in time.I', parent=heat_node_lncmi)
175 # OBJECTIVE CREATION
176 # Minimizing the part of the heat load covered by the heat production plant
d:\00 - eco-sesa\02 - outils\omegalpes\dev_omegalpes\omegalpes\general\optimisation\elements.py in __init__(self, exp_t, t_range, name, active, description, parent)
646 ExternalConstraint.__init__(self, exp='', name=name,
647 description=description,
--> 648 active=active, parent=parent)
649 DynamicConstraint.__init__(self, exp_t=exp_t, t_range=t_range,
650 name=name,
d:\00 - eco-sesa\02 - outils\omegalpes\dev_omegalpes\omegalpes\general\optimisation\elements.py in __init__(self, exp, name, description, active, parent)
600 warnings.warn(deprecated_msg, DeprecationWarning)
601
--> 602 self._add_ext_cst_list()
603
604 def _add_ext_cst_list(self):
d:\00 - eco-sesa\02 - outils\omegalpes\dev_omegalpes\omegalpes\general\optimisation\elements.py in _add_ext_cst_list(self)
604 def _add_ext_cst_list(self):
605 if self.parent:
--> 606 if self not in self.parent._external_constraints_list:
607 self.parent._external_constraints_list.append(self)
608 else:
AttributeError: 'EnergyNode' object has no attribute '_external_constraints_list'
```
### Steps to reproduce
Run the Notebook LNCMI in examples/notebooks
### How to fix it?
Inspect the last commits in elements to check the previous version of OMEGAlpes with which it was working properly to understand the bug.
### Note : we will only investigate if the tests are passinghttps://gricad-gitlab.univ-grenoble-alpes.fr/omegalpes/omegalpes/-/issues/59add a possibility to repeat daily the ShifatbleEnergyUnit2020-05-05T09:56:08+02:00Lou Morrietadd a possibility to repeat daily the ShifatbleEnergyUnitadd a possibility to repeat daily the ShifatbleEnergyUnit
Question:
Should we you panda to simplify the calculation of the dayadd a possibility to repeat daily the ShifatbleEnergyUnit
Question:
Should we you panda to simplify the calculation of the dayLou MorrietLou Morriet