{"id":21344607,"url":"https://github.com/unsw-ceem/energy-sharing","last_synced_at":"2025-07-12T15:32:17.980Z","repository":{"id":37218036,"uuid":"153035713","full_name":"UNSW-CEEM/energy-sharing","owner":"UNSW-CEEM","description":"Local Energy Sharing Simulator, developed by Naomi Stringer, Luke Marshall, David Martin for the Center of Energy and Environmental Markets at UNSW (Sydney, Australia)","archived":false,"fork":false,"pushed_at":"2022-12-08T02:51:28.000Z","size":215367,"stargazers_count":6,"open_issues_count":14,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-11T05:45:24.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.ceem.unsw.edu.au/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UNSW-CEEM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-15T01:22:52.000Z","updated_at":"2023-11-01T15:31:09.000Z","dependencies_parsed_at":"2022-06-22T11:11:33.036Z","dependency_job_id":null,"html_url":"https://github.com/UNSW-CEEM/energy-sharing","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNSW-CEEM%2Fenergy-sharing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNSW-CEEM%2Fenergy-sharing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNSW-CEEM%2Fenergy-sharing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNSW-CEEM%2Fenergy-sharing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UNSW-CEEM","download_url":"https://codeload.github.com/UNSW-CEEM/energy-sharing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825732,"owners_count":17530122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T01:20:32.286Z","updated_at":"2024-11-22T01:20:33.029Z","avatar_url":"https://github.com/UNSW-CEEM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local Energy Sharing Simulator\nThis software is designed to model emerging business models, based on the concept of sharing energy between residences or businesses with solar and battery systems. \n\nIt is based on the work of Mike Roberts, Luke Marshall and Naomi Stringer at the Center for Energy and Environmental Markets, UNSW. Additional software development has been completed by David Martin. \n\n![Screenshot 2019-05-17 12 04 13](https://user-images.githubusercontent.com/7201209/57900484-f52ad600-789b-11e9-98eb-91410324fad5.png)\n![Screenshot 2019-05-17 12 03 19](https://user-images.githubusercontent.com/7201209/57900486-f5c36c80-789b-11e9-9a06-bd73106e7aa4.png)\n![Screenshot 2019-05-17 12 03 01](https://user-images.githubusercontent.com/7201209/57900487-f5c36c80-789b-11e9-920c-e6515eea7915.png)\n![Screenshot 2019-05-17 12 02 41](https://user-images.githubusercontent.com/7201209/57900488-f5c36c80-789b-11e9-9d8c-e53861a14708.png)\n![Screenshot 2019-05-17 12 02 15](https://user-images.githubusercontent.com/7201209/57900489-f65c0300-789b-11e9-84e0-7fd8d3416ce7.png)\n\n# Downloading\nThe current standalone release can be downloaded from the Releases page [here](https://github.com/luke-marshall/energy-sharing/releases).\n\n# Running\n1. Download and unzip the app. \n2. Double-Click the EnergySharing.command file. This will open a terminal window (the 'backend' calculator doing all the hard work) and the user interface. \n3. When you're finished, please quit both the user interface and the terminal app.\n\n\n# Running from source\nThe application can also be run directly from the source code - this will be useful if there does not exist a packaged binary for your operating system, or if other issues are encountered running packaged versions. Running from source is relatively straightforward with basic knowledge of the terminal and common terminal apps. \n\n## Requirements:\nnode.js and npm\npython 3 and pipenv\nelectron (for standalone)\n\n## Steps\n1. Navigate to Vue/app folder and run:\n   `npm install`\n   `npm run serve`\nThis serves the frontend portion of the app reactively, such that changes to the source code are reflected instantly in the browser / UI.\n\n2. Navigate to Flask folder. Run:\n   `pipenv install`\n   `pipenv run python run-dev.py`\n\nAt this point, the frontend should be available by opening the Chrome browser and navigating to localhost:8080 in the address bar. localhost:5000 may also provide a version of the UI but this will not be in sync with the code in Vue/app, so this is not recommended. \n\n\n## Packaging\nPackaging consistes of three rather unintuitive steps. The first is to package the vue frontend, and place it in the Flask section of the app. The second is to take the Flask section (the backend model and webserver that serves the frontend ) and package these into a system-dependent executable using pyinstaller - to be places in the Electron section. Electron, on start, fires up this server (the model and the UI) and displays it in a nice electron window.\n\nThe absic packaging steps for osx are captured in the 'deploy.sh' shell script. This requires that pyinstaller, plus all of the python dependencies for the app, are installed on a local python3 instance, as pyinstaller has pipenv conflicts. \n\n1. Vue\nTo build the package, go to the Vue/app folder and run:\n`npm run build`\nThis will package the entire web frontend and place it into the Flask/app/application/dist directory. \nFrom this directory, the FLASK server will serve the final version of the frontend.\n\n2. Python\nAll python packages must be installed on system python (due to a bug with pipenv / pyinstaller - this may be fixed in the future.)\n\nRun the script found in package.sh, ie.\n`pyinstaller deploy.spec --additional-hooks-dir hooks`\n\nThis will create a folder 'dist' in the Flask section, with an executable called 'run-dev'. Run it and we're up, up and away!\n\nCopy the generated relevant files into the 'app/model' folder in Electron.\n\n3. Electron\n\nElectron packaging can be done manually with instructions from the official electron documentation.\n\nWe have used the (Electron Packager | https://github.com/electron-userland/electron-packager) tool as it greatly simplifies the process.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsw-ceem%2Fenergy-sharing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funsw-ceem%2Fenergy-sharing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsw-ceem%2Fenergy-sharing/lists"}