Skip to main content

AI Solver Test Project

Project description

我们做什么

我们致力于提供优质求解器功能

快速上手

一、安装python库

    pip install linkesolver

二、调用求解

1、输入问题文件求解

>> from linkesolver import mix_integer_solver
# 指定需要求解问题的.lp文件
>> file_name = "input_problem.lp"
# 确定问题类型problem,可选WPMS,FCMCNF,GISP
# solution_save默认为None,表示会打印求解结果。当指定文件路径时,会将求解结果保存到指定文件
>> mix_integer_solver(file_name, problem="FCMCNF", solution_save="./solve_out.txt")

2、基于图元素求解

>> from linkesolver import solve_wpms
>> nodes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
>> edges = [(0, 7), (0, 9), (0, 15), (0, 16), (0, 17), (0, 18), (1, 6), (1, 9), (1, 16), (1, 18), (1, 19), (2, 4), (2, 11), (2, 12), (3, 6), (3, 7), (3, 14), (3, 16), (3, 19), (8, 9), (11, 5), (12, 7), (13, 6), (18, 5), (18, 11)]
>> solve_wpms(nodes, edges, "WPMS", solution_save="./solve_out.txt")

目前能够求解问题

1、WPMS(Weighted Independent Maximum Packing Set)

  • WIMPs问题是NP-hard问题的一个例子,通常被用于寻找无向图中的最大权独立集。在WIMPs问题中,给定一个带权无向图,每个顶点都有一个正权值。问题的目标是找到权值之和最大的独立顶点集,其中独立顶点集是指该集合中的任何两个顶点之间都没有边相连。
  • WIMPs问题在许多领域中都有应用,例如在社交网络分析、电路设计和资源分配等领域中。

2、GISP(广义独立集问题)问题

  • GISP问题是一类经典的优化问题,通常用于优化分配问题,例如分配资源或任务到不同的位置或机器上。在GISP问题中,有一组可用的资源和一组任务需要被完成。每个资源都有一个成本,同时可以完成一组任务,这些任务需要一定的资源。任务可以被分配给多个资源,但每个任务只能被完成一次。问题的目标是找到最小化总成本的任务分配方案。
  • GISP问题的一个重要特点是,每个任务可以被分配给多个资源,这使得问题更加复杂。因此,GISP问题被认为是一种困难的组合优化问题。GISP问题在许多领域中都有应用,例如物流、生产调度和资源分配等领域。

3、FCMCNF(Facility Capacity Multiple Choice Network Flow)

  • 该问题通常涉及在网络流模型中选择路径,以便满足一些特定的容量约束。FCMCNF问题中存在多种选择,每种选择都会影响网络流的容量限制。 具体而言,FCMCNF问题是在具有多个源和汇的带容量的有向图中找到最小费用的流,并满足以下要求:
  1. 每个源必须流出特定数量的流量。
  2. 每个汇必须接收特定数量的流量。
  3. 每个路径可以选择多个容量和费用。
  4. 每个路径的容量都受到一些限制,例如每个路径的容量不能超过某个特定的值。

敬请期待

  1. 多样功能

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkesolver-0.0.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkesolver-0.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file linkesolver-0.0.2.tar.gz.

File metadata

  • Download URL: linkesolver-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for linkesolver-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2736cc31730888c83c70503f8674c08c1348af9539f31a6fe68b4ff069cab3b6
MD5 bb251fe6c10c01fd521825c19ee6e928
BLAKE2b-256 ac94d50f749b7c83f00b9a20926b128289005c19d174f65d046eac248c2c46ee

See more details on using hashes here.

File details

Details for the file linkesolver-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: linkesolver-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for linkesolver-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 55a7df9bb30f257cbb86bd0057cad3bd0cfeee7db0a5840346cd4352cc7ba1d9
MD5 7640727abb9b19fee8ecdd5e492b73ca
BLAKE2b-256 1a97702408a43f88aa3b1d2c0557f014cccb642b830df295e54fc34d27d1fb65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page