Code Monkey home page Code Monkey logo

swolfpy-project / swolfpy Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 7.0 17.51 MB

SwolfPy is a free, multi-platform, Python-based, open-source, SWM LCA optimization framework with built-in parametric and Monte Carlo sensitivity and uncertainty analysis capabilities.

Home Page: https://swolfpy-project.github.io/

License: GNU General Public License v2.0

Python 99.88% Makefile 0.12%
brightway2 life-cycle-assessment monte-carlo-simulation municipal-solid-waste optimization pyside2 python solid-waste-management swolfpy uncertainty-assessment

swolfpy's People

Contributors

msm-sardar avatar phanchieta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swolfpy's Issues

Optimization error

Here is an error I encountered while trying the optimize:

Optimization setting:

project_name = P1

functional_unit = {('waste', 'S1'): 1}

method = [('IPCC 2013', 'climate change', 'GWP 100a')]

optimize collection scheme = False

number of iterations = 1

number of threads = 8

Initial guess generator = random

Timeout = 1500

constraints = {}
Iteration: 0 PID: 18200

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\swolfpy\Optimization.py", line 413, in abortable_worker
return(res.get(timeout)) # Wait timeout seconds for func to complete.
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\multiprocessing\pool.py", line 771, in get
raise self._value
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\swolfpy\Optimization.py", line 424, in worker
res = minimize(optObject._objective_function, x0, method='SLSQP', bounds=bnds, constraints=optObject.cons)
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\scipy\optimize_minimize.py", line 631, in minimize
return _minimize_slsqp(fun, x0, args, jac, bounds,
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\scipy\optimize\slsqp.py", line 427, in _minimize_slsqp
slsqp(m, meq, x, xl, xu, fx, c, g, a, acc, majiter, mode, w, jw,
ValueError: unexpected array size: new_size=1, got array with arr_size=0

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\swolfpy\UI\Workers.py", line 82, in run
results = Optimization.multi_start_optimization(self.opt,
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\swolfpy\Optimization.py", line 347, in multi_start_optimization
results = [res.get() for res in all_results]
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\site-packages\swolfpy\Optimization.py", line 347, in
results = [res.get() for res in all_results]
File "C:\Users\gokse\anaconda3\envs\swolfpy\lib\multiprocessing\pool.py", line 771, in get
raise self._value
ValueError: unexpected array size: new_size=1, got array with arr_size=0

Thank you.

KeyError: 'input_type'

Hi, I was trying to follow along with the case study example ([https://github.com/SwolfPy-Project/CaseStudy-JIE2021/blob/main/Base%20Case/Base_Case.ipynb]) to try and better understand the model and am encountering a KeyError when trying to create the project - full .md export attached.

Could you help me understand what/why this error is being thrown and how I can fix it? Thank you!

CaseStudySwolfpy_20230822.md

( @msm-sardar )

Installing miniconda

Hello,
I am trying to install miniconda but i am getting the following error: " destination folder contains special character ...". Could you please help?

Launching Issue

I was able to get the program to run in my conda environment on windows. However, I'm having a bit of trouble on mac. I was able to succesfully configure my conda environment, install swolfpy with pip, and then launch python. However, when import swolfpy, I receive the following error:
>>> import swolfpy as sp
Traceback (most recent call last):
File "", line 1, in
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/swolfpy/init.py", line 7, in
from .Technosphere import Technosphere
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/swolfpy/Technosphere.py", line 7, in
from brightway2 import Database, projects, bw2setup, databases
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/brightway2/init.py", line 2, in
from bw2data import *
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/init.py", line 35, in
from .meta import (
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/meta.py", line 186, in
geomapping = GeoMapping()
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/meta.py", line 66, in init
super(GeoMapping, self).init(*args, **kwargs)
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/serialization.py", line 122, in init
self.load()
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/serialization.py", line 127, in load
self.data = self.deserialize()
File "/opt/miniconda3/envs/swolfpy/lib/python3.7/site-packages/bw2data/serialization.py", line 240, in deserialize
return self.unpack(pickle.load(open(self.filepath, "rb")))
ValueError: unsupported pickle protocol: 5

I then tried to configure another conda environment using python 3.9, this seems to have gotten a bit farther but after entering sp.swoflpy() the application starts a python application that isn't visible and I have the following warning:
>>> import swolfpy
>>> swolfpy.swolfpy()
qt.qpa.fonts: Populating font family aliases took 737 ms. Replace uses of missing font family "MS Shell Dlg 2" with one hat exists to avoid this cost.

I'm a bit of a conda and mac os rookie so any troubleshooting tips would be helpful. Also curious to know if anybody has gotten this to work on mac or if anyone has seen this error. This could be user error, but figured I'd ask for help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.