GithubHelp home page GithubHelp logo

holon-cloudclient's Introduction

HOLON cloudclient module

This repo contains the (legacy) AnyLogic cloudclient implementation of the HOLON project. This repo and other repos are licensed under the MIT license. Other repos are:

  1. AnyLogic
  2. ETM service
  3. webapp

(works better at the Github Pages)

The experiments module allows you to define your experiment in a config file and run one or multiple experiments sequentially. No more adjusting classes! Based on the existing scripts.

Installation

Development

Uses editable wheel build.

git clone https://github.com/ZEnMo/HOLON-cloudclient.git
cd HOLON-cloudclient
# CREATE AND ACTIVATE YOUR ENV OF CHOICE
pip install -e .
cloudclient_init --target-folder .

Production

Direct

pip install git+https://github.com/ZEnMo/HOLON-cloudclient@main#egg=cloudclient
cloudclient_init --target-folder folder/for/clouclient/config --get-api-key # asumes "AL_API_KEY" in env vars

Via requirements.txt

git+https://github.com/ZEnMo/HOLON-cloudclient@main#egg=cloudclient

Starting up

The cloudclient_init command that you issued during installation links the cloudclient package to your project configuration folder .cloudclient. This folder contains the information that is used by the package to run experiments on the AnyLogic private cloud.

Go to the config folder and open config.yml. Specify your secret API key to connect to the AnyLogic Cloud there.

anylogic_cloud:
  api_key: 7a3563c1-ea1c-41d6-8009-b7abfd93f7ba
  url: https://engine.holontool.nl

Go to the config folder and open experiments.yml. Specify your experiments there.

<experiment_name>:
  model_name:     name of the anylogic model to connect to
  config_file:    the excel database file or ::cloudclient.datamodel:: from which to read the config sheets
  timestep_hours: Float, timestep in hours
  force_uncached: True | False, force the anylogic model to run in uncached mode
  show_progress:  True | False, ?
  parallelize:    True | False, allow the model to run in paralellized mode
  log_exceptions: True | False, log exceptions or not
  use_datamodel:  True | False, whether to treat the input as a ::cloudclient.datamodel::
  inputs:         list (optional), list the anylogic input key and the file in
                  which to find the inputs for each input
                  See format below
                  - anylogic_key: <key>
                    file: <sheetname> or <datamodel.Payload attribute> to submit to the key
                    write: True | False

  outcome:        list, name all the outcoems that should be taken from the model.
                  They become accesible and will be saved under their human_key
                  Specify if they should be written to a file, or printed out.
                  Also allows for actions on the data. Currently only normalise is
                  avaibale.

Running the module

The base code for the module is in the experiments folder. But you can easily call the module from the script run_experiments in the scripts folder. Here you can run one experiment by specifying its name or all experiments by using the keyword ALL.

Pipenv support

There is also support for pipenv now for the ones that are interested. There is a shortcut to run the experiments: pipenv run experiments {experiment_name}.

Happy experimenting!

Data classes

Data classes are used to structure and validate data before it is sent to the AnyLogic API. Find the class diagrams below:

  1. Conversion assets
  2. Consumption assets
  3. Storage assets
  4. Production assets
  5. Grid connections
  6. Gridnode assets
  7. Actors
  8. Contracts

Examples

Check out the example JSON file over at: doc/assets/example.json.

Or inspect the visual representation below:

holon-cloudclient's People

Contributors

thesethtruth avatar gillishommen avatar naudloomans avatar petertue avatar jorritvandenhouten avatar vincentmosmuller avatar noracato avatar erikvv avatar mattijsstam avatar

Watchers

 avatar

Forkers

mattijsstam

holon-cloudclient's Issues

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.