Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A
adc2019-system
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • adc2019
  • adc2019-system
  • Wiki
  • runnnig on localhost

runnnig on localhost

Last edited by Kento HASEGAWA Jul 21, 2019
Page history

ローカルホストでの実行方法

イメージ

一台のマシン上で,仮想的に複数のシステムを起動します. Web UI (とAPI)で利用するポートをオプションで指定することで,一台のマシン上で通信できます. ここではホストとソルバを一つずつ用意するものとします. それぞれのアドレスは以下のようになります.

  • ホスト: localhost:5000 (5000番がデフォルト)
  • ソルバ:localhost:5001

1. ソルバ側のシステムを起動

先にソルバ側を起動する必要があります. 以下のコマンドでポート番号を指定して,ソルバを起動します.

python3 main.py --port 5001

2. 設定ファイルの準備

ホストを立ち上げる前に設定ファイルを準備します. 以下のように設定ファイルを記述し,conf.jsonとしてプロジェクト直下に保存します.

以下の例だと,solvers/hsgw/solver_brute_force.pyをソルバに設定します. 自身で作ったソルバをシステムで試す場合は,適当に変更してください.

{
    "role": "host",
    "problem_path": "./problems/*.txt",
    "solution_path": "./solutions/",
    "address": "localhost:5000",
    "worker":[
        {
            "address": "localhost:5001",
            "name": "worker1",
            "role": "solver",
            "solver": "hsgw.solver_brute_force"
        }
    ]
}

3. ホストの起動

ホストを起動するときは以下のコマンドを実行します.

python3 main.py --config conf.json

4. システムの操作

Webブラウザからhttp://localhost:5000にアクセスすると,GUIが表示されます.

Clone repository
  • adding solver
  • Home
  • pynq setup
  • raspi accesspoint
  • runnnig on localhost
  • solver setup
  • ultra96 debian setup
More Pages

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.