{"id":21866814,"url":"https://github.com/connor-makowski/scoptimize","last_synced_at":"2026-02-21T20:31:55.386Z","repository":{"id":62591151,"uuid":"481728432","full_name":"connor-makowski/scoptimize","owner":"connor-makowski","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-14T20:54:06.000Z","size":1148,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T13:22:23.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/connor-makowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-14T19:39:51.000Z","updated_at":"2023-12-04T04:48:07.000Z","dependencies_parsed_at":"2025-04-14T22:40:07.668Z","dependency_job_id":null,"html_url":"https://github.com/connor-makowski/scoptimize","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/connor-makowski/scoptimize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fscoptimize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fscoptimize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fscoptimize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fscoptimize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connor-makowski","download_url":"https://codeload.github.com/connor-makowski/scoptimize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connor-makowski%2Fscoptimize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29692521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-28T05:07:35.023Z","updated_at":"2026-02-21T20:31:55.370Z","avatar_url":"https://github.com/connor-makowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SC Optimize\n[![PyPI version](https://badge.fury.io/py/scoptimize.svg)](https://badge.fury.io/py/scoptimize)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nSupply Chain Optimization package in python using PuLP.\n\n# Setup\n\nMake sure you have Python 3.6.x (or higher) installed on your system. You can download it [here](https://www.python.org/downloads/).\n\n## Installation\n\n```\npip install scoptimize\n```\n\n# Getting Started\n\n## Technical Documentation\nThe [Technical Docs](https://connor-makowski.github.io/scoptimize/scoptimize/network.html) can be found [here](https://connor-makowski.github.io/scoptimizescoptimize//network.html).\n\n## Basic Usage\n```py\nfrom scoptimize.network import Model, Node, Flow\n\nmodel = Model(name='MyModel')\nmodel.add_object(Node(name=\"Factory_1\", origin=True, cashflow_per_unit=-1, max_units=15))\nmodel.add_object(Node(name=\"Customer_1\", destination=True, min_units=10))\nmodel.add_object(Flow(name=\"Factory_1__Customer_1\", cashflow_per_unit=-1, max_units=15, start='Factory_1', end='Customer_1'))\nmodel.solve()\n\nprint(model.objective) #=\u003e 20.0\n```\n\n## Advanced Usage\n\nInput:\n```py\nfrom scoptimize.network import Model, Node, Flow\nfrom pprint import pp\n\nmodel = Model(name='MyAdvancedModel')\n\nmodel.add_object(Node(name=\"F1\", origin=True, cashflow_for_use=-8, cashflow_per_unit=-1, max_units=5))\nmodel.add_object(Node(name=\"F2\", origin=True, cashflow_per_unit=-2, max_units=10))\nmodel.add_object(Node(name=\"W1\", cashflow_per_unit=-1, max_units=10))\nmodel.add_object(Node(name=\"D1\", destination=True, cashflow_per_unit=0, min_units=8, max_units=10))\n\nmodel.add_object(Flow(name=\"F1_W1\", cashflow_per_unit=-1, max_units=15, start='F1', end='W1'))\nmodel.add_object(Flow(name=\"F2_W1\", cashflow_per_unit=-1, max_units=15, start='F2', end='W1'))\nmodel.add_object(Flow(name=\"W1_D1\", cashflow_per_unit=-1, max_units=15, start='W1', end='D1'))\n\nmodel.solve()\npp(model.get_object_stats())\n```\n\nOutput:\n```\n{'F1': {'name': 'F1',\n        'class': 'Node',\n        'origin': True,\n        'destination': False,\n        'inflows': 0.0,\n        'outflows': 0.0,\n        'reflows_in': 0.0,\n        'reflows_out': 0.0,\n        'use': 0.0,\n        'variable_cashflow': -0.0,\n        'fixed_cashflow': -0.0},\n 'F2': {'name': 'F2',\n        'class': 'Node',\n        'origin': True,\n        'destination': False,\n        'inflows': 0.0,\n        'outflows': 8.0,\n        'reflows_in': 0.0,\n        'reflows_out': 0.0,\n        'use': 1.0,\n        'variable_cashflow': -16.0,\n        'fixed_cashflow': 0.0},\n 'W1': {'name': 'W1',\n        'class': 'Node',\n        'origin': False,\n        'destination': False,\n        'inflows': 8.0,\n        'outflows': 8.0,\n        'reflows_in': 0.0,\n        'reflows_out': 0.0,\n        'use': 1.0,\n        'variable_cashflow': -8.0,\n        'fixed_cashflow': 0.0},\n 'D1': {'name': 'D1',\n        'class': 'Node',\n        'origin': False,\n        'destination': True,\n        'inflows': 8.0,\n        'outflows': 0,\n        'reflows_in': 0.0,\n        'reflows_out': 0.0,\n        'use': 1.0,\n        'variable_cashflow': 0.0,\n        'fixed_cashflow': 0.0},\n 'F1_W1': {'name': 'F1_W1',\n           'class': 'Flow',\n           'reflow': False,\n           'start': 'F1',\n           'end': 'W1',\n           'flow': 0.0,\n           'use': 1.0,\n           'variable_cashflow': -0.0,\n           'fixed_cashflow': 0.0},\n 'F2_W1': {'name': 'F2_W1',\n           'class': 'Flow',\n           'reflow': False,\n           'start': 'F2',\n           'end': 'W1',\n           'flow': 8.0,\n           'use': 1.0,\n           'variable_cashflow': -8.0,\n           'fixed_cashflow': 0.0},\n 'W1_D1': {'name': 'W1_D1',\n           'class': 'Flow',\n           'reflow': False,\n           'start': 'W1',\n           'end': 'D1',\n           'flow': 8.0,\n           'use': 1.0,\n           'variable_cashflow': -8.0,\n           'fixed_cashflow': 0.0}}\n```\n\n# Testing\n\nDocker:\n\n- `docker build . --tag scoptimize_docker_test`\n- `docker run scoptimize_docker_test bash ./test.sh`\n\nLocal:\n\n- `python3.11 -m virtualenv venv`\n- `source venv/bin/activate`\n- `pip install -e .`\n- `./test.sh`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnor-makowski%2Fscoptimize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnor-makowski%2Fscoptimize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnor-makowski%2Fscoptimize/lists"}