Skip to content

Commit

Permalink
Improving contexts and RL support
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfarouk committed Feb 19, 2024
1 parent 461f9c9 commit f0b8a5d
Show file tree
Hide file tree
Showing 234 changed files with 23,004 additions and 10,516 deletions.
71 changes: 35 additions & 36 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,45 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: debug-statements
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-byte-order-marker # Forbid UTF-8 byte-order markers
- id: check-case-conflict
- id: check-json
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-added-large-files
args: ["--maxkb=1000"]
# - id: fix-encoding-pragma
# - id: check-docstring-first
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
- id: debug-statements
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-byte-order-marker # Forbid UTF-8 byte-order markers
- id: check-case-conflict
- id: check-json
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-added-large-files
args: ["--maxkb=10000"]
# - id: fix-encoding-pragma
# - id: check-docstring-first
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.0
# hooks:
# - id: pyupgrade
# args: [--py38-plus]
# exclude: __init__.py
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.2.1
# hooks:
# - id: ruff
# types_or: [python, pyi]
# args: [--fix]
# - id: ruff-format
# types_or: [python, pyi]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: pyupgrade
args: [--py38-plus]
exclude: __init__.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
#
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
hooks:
- id: blacken-docs
exclude: __init__.py
additional_dependencies: [black==20.8b1]
- id: blacken-docs
exclude: __init__.py
additional_dependencies: [black==20.8b1]
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
exclude: docs/.*\.rst
- id: rst-linter
exclude: docs/.*\.rst
78 changes: 78 additions & 0 deletions docs/api/scml.oneshot.ANACContext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,43 @@ ANACContext

.. autosummary::

~ANACContext.cap_exogenous_quantities
~ANACContext.cash_availability
~ANACContext.cost_increases_with_level
~ANACContext.disposal_cost
~ANACContext.disposal_cost_dev
~ANACContext.equal_exogenous_sales
~ANACContext.equal_exogenous_supply
~ANACContext.exogenous_control
~ANACContext.exogenous_generation_method
~ANACContext.exogenous_price_dev
~ANACContext.exogenous_sales_predictability
~ANACContext.exogenous_supply_predictability
~ANACContext.force_signing
~ANACContext.initial_balance
~ANACContext.max_productivity
~ANACContext.n_agents_per_process
~ANACContext.n_lines
~ANACContext.n_processes
~ANACContext.n_steps
~ANACContext.non_competitors
~ANACContext.penalties_scale
~ANACContext.perishable
~ANACContext.placeholder_levels
~ANACContext.placeholder_params
~ANACContext.placeholder_types
~ANACContext.price_multiplier
~ANACContext.process_inputs
~ANACContext.process_outputs
~ANACContext.production_costs
~ANACContext.profit_means
~ANACContext.profit_stddevs
~ANACContext.shortfall_penalty
~ANACContext.shortfall_penalty_dev
~ANACContext.storage_cost
~ANACContext.storage_cost_dev
~ANACContext.world_params
~ANACContext.world_type
~ANACContext.year

.. rubric:: Methods Summary
Expand All @@ -19,23 +55,65 @@ ANACContext

~ANACContext.__call__
~ANACContext.contains_context
~ANACContext.contains_general_context
~ANACContext.generate
~ANACContext.is_valid_awi
~ANACContext.is_valid_world
~ANACContext.make
~ANACContext.make_config
~ANACContext.make_predefined_config
~ANACContext.make_world

.. rubric:: Attributes Documentation

.. autoattribute:: cap_exogenous_quantities
.. autoattribute:: cash_availability
.. autoattribute:: cost_increases_with_level
.. autoattribute:: disposal_cost
.. autoattribute:: disposal_cost_dev
.. autoattribute:: equal_exogenous_sales
.. autoattribute:: equal_exogenous_supply
.. autoattribute:: exogenous_control
.. autoattribute:: exogenous_generation_method
.. autoattribute:: exogenous_price_dev
.. autoattribute:: exogenous_sales_predictability
.. autoattribute:: exogenous_supply_predictability
.. autoattribute:: force_signing
.. autoattribute:: initial_balance
.. autoattribute:: max_productivity
.. autoattribute:: n_agents_per_process
.. autoattribute:: n_lines
.. autoattribute:: n_processes
.. autoattribute:: n_steps
.. autoattribute:: non_competitors
.. autoattribute:: penalties_scale
.. autoattribute:: perishable
.. autoattribute:: placeholder_levels
.. autoattribute:: placeholder_params
.. autoattribute:: placeholder_types
.. autoattribute:: price_multiplier
.. autoattribute:: process_inputs
.. autoattribute:: process_outputs
.. autoattribute:: production_costs
.. autoattribute:: profit_means
.. autoattribute:: profit_stddevs
.. autoattribute:: shortfall_penalty
.. autoattribute:: shortfall_penalty_dev
.. autoattribute:: storage_cost
.. autoattribute:: storage_cost_dev
.. autoattribute:: world_params
.. autoattribute:: world_type
.. autoattribute:: year

.. rubric:: Methods Documentation

.. automethod:: __call__
.. automethod:: contains_context
.. automethod:: contains_general_context
.. automethod:: generate
.. automethod:: is_valid_awi
.. automethod:: is_valid_world
.. automethod:: make
.. automethod:: make_config
.. automethod:: make_predefined_config
.. automethod:: make_world
78 changes: 78 additions & 0 deletions docs/api/scml.oneshot.ANACOneShotContext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,43 @@ ANACOneShotContext

.. autosummary::

~ANACOneShotContext.cap_exogenous_quantities
~ANACOneShotContext.cash_availability
~ANACOneShotContext.cost_increases_with_level
~ANACOneShotContext.disposal_cost
~ANACOneShotContext.disposal_cost_dev
~ANACOneShotContext.equal_exogenous_sales
~ANACOneShotContext.equal_exogenous_supply
~ANACOneShotContext.exogenous_control
~ANACOneShotContext.exogenous_generation_method
~ANACOneShotContext.exogenous_price_dev
~ANACOneShotContext.exogenous_sales_predictability
~ANACOneShotContext.exogenous_supply_predictability
~ANACOneShotContext.force_signing
~ANACOneShotContext.initial_balance
~ANACOneShotContext.max_productivity
~ANACOneShotContext.n_agents_per_process
~ANACOneShotContext.n_lines
~ANACOneShotContext.n_processes
~ANACOneShotContext.n_steps
~ANACOneShotContext.non_competitors
~ANACOneShotContext.penalties_scale
~ANACOneShotContext.perishable
~ANACOneShotContext.placeholder_levels
~ANACOneShotContext.placeholder_params
~ANACOneShotContext.placeholder_types
~ANACOneShotContext.price_multiplier
~ANACOneShotContext.process_inputs
~ANACOneShotContext.process_outputs
~ANACOneShotContext.production_costs
~ANACOneShotContext.profit_means
~ANACOneShotContext.profit_stddevs
~ANACOneShotContext.shortfall_penalty
~ANACOneShotContext.shortfall_penalty_dev
~ANACOneShotContext.storage_cost
~ANACOneShotContext.storage_cost_dev
~ANACOneShotContext.world_params
~ANACOneShotContext.world_type
~ANACOneShotContext.year

.. rubric:: Methods Summary
Expand All @@ -19,23 +55,65 @@ ANACOneShotContext

~ANACOneShotContext.__call__
~ANACOneShotContext.contains_context
~ANACOneShotContext.contains_general_context
~ANACOneShotContext.generate
~ANACOneShotContext.is_valid_awi
~ANACOneShotContext.is_valid_world
~ANACOneShotContext.make
~ANACOneShotContext.make_config
~ANACOneShotContext.make_predefined_config
~ANACOneShotContext.make_world

.. rubric:: Attributes Documentation

.. autoattribute:: cap_exogenous_quantities
.. autoattribute:: cash_availability
.. autoattribute:: cost_increases_with_level
.. autoattribute:: disposal_cost
.. autoattribute:: disposal_cost_dev
.. autoattribute:: equal_exogenous_sales
.. autoattribute:: equal_exogenous_supply
.. autoattribute:: exogenous_control
.. autoattribute:: exogenous_generation_method
.. autoattribute:: exogenous_price_dev
.. autoattribute:: exogenous_sales_predictability
.. autoattribute:: exogenous_supply_predictability
.. autoattribute:: force_signing
.. autoattribute:: initial_balance
.. autoattribute:: max_productivity
.. autoattribute:: n_agents_per_process
.. autoattribute:: n_lines
.. autoattribute:: n_processes
.. autoattribute:: n_steps
.. autoattribute:: non_competitors
.. autoattribute:: penalties_scale
.. autoattribute:: perishable
.. autoattribute:: placeholder_levels
.. autoattribute:: placeholder_params
.. autoattribute:: placeholder_types
.. autoattribute:: price_multiplier
.. autoattribute:: process_inputs
.. autoattribute:: process_outputs
.. autoattribute:: production_costs
.. autoattribute:: profit_means
.. autoattribute:: profit_stddevs
.. autoattribute:: shortfall_penalty
.. autoattribute:: shortfall_penalty_dev
.. autoattribute:: storage_cost
.. autoattribute:: storage_cost_dev
.. autoattribute:: world_params
.. autoattribute:: world_type
.. autoattribute:: year

.. rubric:: Methods Documentation

.. automethod:: __call__
.. automethod:: contains_context
.. automethod:: contains_general_context
.. automethod:: generate
.. automethod:: is_valid_awi
.. automethod:: is_valid_world
.. automethod:: make
.. automethod:: make_config
.. automethod:: make_predefined_config
.. automethod:: make_world
Loading

0 comments on commit f0b8a5d

Please sign in to comment.