mesmo-dev / mesmo Goto Github PK
View Code? Open in Web Editor NEWMESMO - Multi-Energy System Modeling and Optimization
Home Page: https://mesmo-dev.github.io/mesmo
License: MIT License
MESMO - Multi-Energy System Modeling and Optimization
Home Page: https://mesmo-dev.github.io/mesmo
License: MIT License
Marginal cost values of DERs are not properly converted to match the unit of the source price time series.
Thanks @miladkzm for reporting!
Implementation of automatic scaling / normalization of state space matrices. Thus, translation state space variables into appropriate per-unit values to avoid numerical issues during optimization in CPLEX / Gurobi.
FlexibleDERModel
.Optimization problem setup through cvxpy
is slow for large test cases in FLEDGE (which seems to be a known issue: cvxpy/cvxpy#708, cvxpy/cvxpy#1159, cvxpy/cvxpy#706). I'd like to try adding direct optimization solver interfaces to see if we can get better performance. To keep things clean & make switching interfaces easier in future, we will need some internal abstractions to define optimization variables / constraints / objective.
cvxpy
as fallback interface).gurobipy
interface.define_objective()
.define_optimization_variables()
, define_optimization_constraints()
, define_optimization_objective()
, get_optimization_results()
, get_optimization_dlmps()
.When the source node name is such that the source node is not named "0", it may not appear first in the nodes
index set (because the node names are sorted alphabetically). In those cases, the admittance matrix is not sliced correctly during the power flow solution & the solution is wrong.
nodes
index set definition.Implementation of automatic scaling / normalization of linear grid model matrices. Thus, translation of linear model variables into appropriate per-unit values to avoid numerical issues during optimization in CPLEX / Gurobi.
LinearGridModel
.The mathematical model documentation is currently only available in my thesis, but needs to become part of the online documentation.
Include more power system test cases in the MESMO repository.
Hi Sebastian,
I hope you are doing well.
I downloaded the latest version of mesmo and I found out that as I had reported earlier the DER's marginal cost unit is not in 1/Wh as for price_timeseries but it is in 1/kWh.
So I guess the line 146 in der_model.py should be replaced by the following:
self.marginal_cost = der.at["marginal_cost"] / 1e3 * der_data.scenario_data.scenario.at["base_apparent_power"] \ if pd.notnull(der.at["marginal_cost"]) else 0.0
BR,
Milad
Hi Sebastian,
I would like to let you know that I implemented Augmecon for the multi-objective optimization inside the solution.py module at the multi_objective_mesmo branch. The model is solved successfully in the case of non-parallel processing.
However, when using parallel processing, there is a share_state_actor inside each function that genuinely is a dictionary that is supposed to be updated at each iteration then it should be accessible by other parallel actors to avoid double-solving some iterations.
Therefore, it still solves the problem in the parallel mode but does not skip some problems that were supposed to be skipped.
Basically, a new class is added to the solution.py module called Augmecon. and a new class is added to the util.py module called SharedStateActor. The model of a benchmark tri-objective problem is given in the examples/develop folder
I would highly appreciate it if you could help fix the issue at your earliest convenience.
Best regards,
Milad
Implement the local approximation variant of the linear electric grid model.
I have installed all the packages and followed the steps as given for anaconda.
but am getting the above error,
please help me.
SolverError: Solver 'GUROBI' failed. Try another solver, or solve with verbose=True for more information.
Implement trust-region algorithm for operation problem solution.
examples/development/run_electric_grid_optimal_power_flow_trust_region.py
problems
module (exact location TBD)Hello sir,
Hope you are doing well.
I have followed the installation guidelines and installed after cloning the package.
When i run any of the given examples in the repository, i get the below error. Request you to kindly help me resolve the error.
(base) C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo>conda activate mesmo
(mesmo) C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo>"C:/Users/Ishan Kholkar/anaconda3/envs/mesmo/python.exe" "c:/Users/Ishan Kholkar/Desktop/smartgrid/mesmo/examples/tutorial/example_3.py"
File "C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\mesmo\solutions.py", line 1218, in solve_highs
status = next(line for line in output if line.startswith("Model status : "))
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/Ishan Kholkar/Desktop/smartgrid/mesmo/examples/tutorial/example_3.py", line 54, in
main()
File "c:/Users/Ishan Kholkar/Desktop/smartgrid/mesmo/examples/tutorial/example_3.py", line 45, in main
optimization_problem.solve()
File "C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\mesmo\solutions.py", line 1054, in solve
self.solve_highs()
File "C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\mesmo\solutions.py", line 1221, in solve_highs
raise RuntimeError(f"HiGHS solution status could not be retrieved:\n{command}\n{''.join(output)}")
RuntimeError: HiGHS solution status could not be retrieved:
C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\highs\bin\highs --model_file C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\results\temp_2022-10-11_17-30-49_318556\problem.mps --options_file C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\results\temp_2022-10-11_17-30-49_318556\options.txt --solution_file C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo\results\temp_2022-10-11_17-30-49_318556\solution.txt
'C:\Users\Ishan' is not recognized as an internal or external command,
operable program or batch file.
(mesmo) C:\Users\Ishan Kholkar\Desktop\smartgrid\mesmo>
Introduce checks in data_interface
such that definition issues are caught early and raise clear error messages.
Typical issues (Please add / edit):
The current implementations in the thermal grid models module cater only to radial networks. This can be extended to cater for meshed networks based on existing approaches from literature.
I tried to follow the instruction and download the repository but each time it asked to install Cobmo directory properly . Although in anconda prompt it says installed
could you please guide on that
There are a few planned structural revisions, which I will document here for everyone's awareness:
OptimizationProblem
to dedicated optimization
solutions
module.ElectricGridModelBase
& ElectricGridModel
and make ElectricGridModelOpenDSS
subclass of ElectricGridModel
.PowerFlowSolution
to PowerFlowSolutionBase
and create new class PowerFlowSolution
that serves as a wrapper for the PowerFlowSolutionXXXMethod
classes & automatically selects the appropriate solution method. (For both electric_grid_models
& thermal_grid_models
.)ResultsDict
, Problem
, ProblemDict
in the problems
module (already has class skeletons).Implementation of a "Kerstin"-based line definition, as an alternative to the present matrix-based definition.
How to model the gas network in this software and solve the time series simulation for the multi-energy network?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.