######################################################################
# Example experiment configuration file:                             #
# This file is used in the unit test tests.unit.arl.doe.test_el.py   #
# Do not change it! But can copy it and modify it to your needs      #
# Below the configuration are some additional information            #
######################################################################
uid: "Experiment Run with Mosaik and Midas"
seed: 123
version: 3.1.0
schedule:
  - the_only_phase:
      environments:
        - environment:
            name: palaestrai_mosaik:MosaikEnvironment
            uid: env
            params:
              module: midas.adapter.palaestrai:Descriptor
              description_func: describe
              instance_func: get_world
              step_size: &step_size 900
              end: &end 24*60*60  # One simulated day
              reward:
                name: midas.adapter.palaestrai.rewards:GridHealthReward
                params:
                  grid_health: Powergrid-0.Grid-0.health
                  ext_grid: Powergrid-0.0-ext_grid-0.p_mw
              params:  # Parameters that are passed to description_func and
                       # instance_func
                name: midas_palaestrai
                config: tests/fixtures/midasmv_palaestrai.yml
                end: *end
                step_size: *step_size
                with_db: True
                mosaik_params: {addr: [127.0.0.1, 5674]}
                mosaikdb_params:
                  import_str: midas.core.store:MidasHdf5
                  filename: midas_store

      agents:
        - name: mighty_defender
          brain: 
            name: palaestrai.agent.dummy_brain:DummyBrain
            params: {}
          muscle: 
            name: palaestrai.agent.dummy_muscle:DummyMuscle
            params: {}
          objective:
            name: palaestrai.agent.dummy_objective:DummyObjective
            params: {"params": 1}
          sensors: 
            - env.Powergrid-0.0-bus-2.vm_pu
            - env.Powergrid-0.0-bus-3.vm_pu
            - env.Powergrid-0.0-bus-4.vm_pu
            - env.Powergrid-0.0-bus-5.vm_pu
            - env.Powergrid-0.0-bus-6.vm_pu
            - env.Powergrid-0.0-bus-7.vm_pu
          actuators: 
            - env.Pysimmods-0.Photovoltaic-0.set_percent
            - env.Pysimmods-0.Photovoltaic-1.set_percent
            - env.Pysimmods-0.HVAC-3.set_percent
        - name: mighty_Attacker
          brain: 
            name: palaestrai.agent.dummy_brain:DummyBrain
            params: {}
          muscle: 
            name: palaestrai.agent.dummy_muscle:DummyMuscle
            params: {}
          objective: 
            name: palaestrai.agent.dummy_objective:DummyObjective
            params: {"params": 1 }
          sensors:
            - env.Powergrid-0.0-bus-10.vm_pu
            - env.Powergrid-0.0-bus-11.vm_pu
            - env.Powergrid-0.0-bus-12.vm_pu
            - env.Powergrid-0.0-bus-13.vm_pu
            - env.Powergrid-0.0-bus-14.vm_pu
          actuators: 
            - env.Pysimmods-0.Photovoltaic-3.set_percent
            - env.Pysimmods-0.Photovoltaic-4.set_percent
            - env.Pysimmods-0.HVAC-0.set_percent
      simulation:
        name: palaestrai.simulation:VanillaSimController
        conditions:
          - name: palaestrai.simulation:VanillaSimControllerTerminationCondition
            params: {}
      phase_config:
        mode: train
        worker: 1
        episodes: 1
run_config: 
  condition:
    name: palaestrai.experiment:VanillaRunGovernorTerminationCondition
    params: {}


######################################################################
# Some additional information:                                       #
# A list of all sensor and actuator uids of midasmv_der              #
# Just place them in the correct list of the agents and they will    #
# work.                                                              #
######################################################################

# actuator_id: Pysimmods-0.Photovoltaic-0.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-1.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-2.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-3.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-4.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-5.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-6.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-7.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-8.set_percent
# actuator_id: Pysimmods-0.Photovoltaic-9.set_percent
# actuator_id: Pysimmods-0.HVAC-0.set_percent
# actuator_id: Pysimmods-0.HVAC-1.set_percent
# actuator_id: Pysimmods-0.HVAC-2.set_percent
# actuator_id: Pysimmods-0.HVAC-3.set_percent
# actuator_id: Pysimmods-0.HVAC-4.set_percent
# actuator_id: Pysimmods-0.HVAC-5.set_percent

# sensor_id: Powergrid-0.0-bus-1.vm_pu
# sensor_id: Powergrid-0.0-bus-1.va_degree
# sensor_id: Powergrid-0.0-bus-10.vm_pu
# sensor_id: Powergrid-0.0-bus-10.va_degree
# sensor_id: Powergrid-0.0-bus-11.vm_pu
# sensor_id: Powergrid-0.0-bus-11.va_degree
# sensor_id: Powergrid-0.0-bus-12.vm_pu
# sensor_id: Powergrid-0.0-bus-12.va_degree
# sensor_id: Powergrid-0.0-bus-13.vm_pu
# sensor_id: Powergrid-0.0-bus-13.va_degree
# sensor_id: Powergrid-0.0-bus-14.vm_pu
# sensor_id: Powergrid-0.0-bus-14.va_degree
# sensor_id: Powergrid-0.0-bus-2.vm_pu
# sensor_id: Powergrid-0.0-bus-2.va_degree
# sensor_id: Powergrid-0.0-bus-3.vm_pu
# sensor_id: Powergrid-0.0-bus-3.va_degree
# sensor_id: Powergrid-0.0-bus-4.vm_pu
# sensor_id: Powergrid-0.0-bus-4.va_degree
# sensor_id: Powergrid-0.0-bus-5.vm_pu
# sensor_id: Powergrid-0.0-bus-5.va_degree
# sensor_id: Powergrid-0.0-bus-6.vm_pu
# sensor_id: Powergrid-0.0-bus-6.va_degree
# sensor_id: Powergrid-0.0-bus-7.vm_pu
# sensor_id: Powergrid-0.0-bus-7.va_degree
# sensor_id: Powergrid-0.0-bus-8.vm_pu
# sensor_id: Powergrid-0.0-bus-8.va_degree
# sensor_id: Powergrid-0.0-bus-9.vm_pu
# sensor_id: Powergrid-0.0-bus-9.va_degree
# sensor_id: Powergrid-0.0-line-0.loading_percent
# sensor_id: Powergrid-0.0-line-1.loading_percent
# sensor_id: Powergrid-0.0-line-10.loading_percent
# sensor_id: Powergrid-0.0-line-11.loading_percent
# sensor_id: Powergrid-0.0-line-12.loading_percent
# sensor_id: Powergrid-0.0-line-13.loading_percent
# sensor_id: Powergrid-0.0-line-14.loading_percent
# sensor_id: Powergrid-0.0-line-2.loading_percent
# sensor_id: Powergrid-0.0-line-3.loading_percent
# sensor_id: Powergrid-0.0-line-4.loading_percent
# sensor_id: Powergrid-0.0-line-5.loading_percent
# sensor_id: Powergrid-0.0-line-6.loading_percent
# sensor_id: Powergrid-0.0-line-7.loading_percent
# sensor_id: Powergrid-0.0-line-8.loading_percent
# sensor_id: Powergrid-0.0-line-9.loading_percent
# sensor_id: Powergrid-0.0-load-0-1.p_mw
# sensor_id: Powergrid-0.0-load-0-1.q_mvar
# sensor_id: Powergrid-0.0-load-1-3.p_mw
# sensor_id: Powergrid-0.0-load-1-3.q_mvar
# sensor_id: Powergrid-0.0-load-10-13.p_mw
# sensor_id: Powergrid-0.0-load-10-13.q_mvar
# sensor_id: Powergrid-0.0-load-11-14.p_mw
# sensor_id: Powergrid-0.0-load-11-14.q_mvar
# sensor_id: Powergrid-0.0-load-2-4.p_mw
# sensor_id: Powergrid-0.0-load-2-4.q_mvar
# sensor_id: Powergrid-0.0-load-3-5.p_mw
# sensor_id: Powergrid-0.0-load-3-5.q_mvar
# sensor_id: Powergrid-0.0-load-4-6.p_mw
# sensor_id: Powergrid-0.0-load-4-6.q_mvar
# sensor_id: Powergrid-0.0-load-5-7.p_mw
# sensor_id: Powergrid-0.0-load-5-7.q_mvar
# sensor_id: Powergrid-0.0-load-6-8.p_mw
# sensor_id: Powergrid-0.0-load-6-8.q_mvar
# sensor_id: Powergrid-0.0-load-7-9.p_mw
# sensor_id: Powergrid-0.0-load-7-9.q_mvar
# sensor_id: Powergrid-0.0-load-8-10.p_mw
# sensor_id: Powergrid-0.0-load-8-10.q_mvar
# sensor_id: Powergrid-0.0-load-9-11.p_mw
# sensor_id: Powergrid-0.0-load-9-11.q_mvar
# sensor_id: Powergrid-0.0-sgen-0-1.p_mw
# sensor_id: Powergrid-0.0-sgen-0-1.q_mvar
# sensor_id: Powergrid-0.0-sgen-1-3.p_mw
# sensor_id: Powergrid-0.0-sgen-1-3.q_mvar
# sensor_id: Powergrid-0.0-sgen-10-13.p_mw
# sensor_id: Powergrid-0.0-sgen-10-13.q_mvar
# sensor_id: Powergrid-0.0-sgen-11-14.p_mw
# sensor_id: Powergrid-0.0-sgen-11-14.q_mvar
# sensor_id: Powergrid-0.0-sgen-2-4.p_mw
# sensor_id: Powergrid-0.0-sgen-2-4.q_mvar
# sensor_id: Powergrid-0.0-sgen-3-5.p_mw
# sensor_id: Powergrid-0.0-sgen-3-5.q_mvar
# sensor_id: Powergrid-0.0-sgen-4-6.p_mw
# sensor_id: Powergrid-0.0-sgen-4-6.q_mvar
# sensor_id: Powergrid-0.0-sgen-5-7.p_mw
# sensor_id: Powergrid-0.0-sgen-5-7.q_mvar
# sensor_id: Powergrid-0.0-sgen-6-8.p_mw
# sensor_id: Powergrid-0.0-sgen-6-8.q_mvar
# sensor_id: Powergrid-0.0-sgen-7-9.p_mw
# sensor_id: Powergrid-0.0-sgen-7-9.q_mvar
# sensor_id: Powergrid-0.0-sgen-8-10.p_mw
# sensor_id: Powergrid-0.0-sgen-8-10.q_mvar
# sensor_id: Powergrid-0.0-sgen-9-11.p_mw
# sensor_id: Powergrid-0.0-sgen-9-11.q_mvar
# sensor_id: Powergrid-0.0-trafo-0.loading_percent
# sensor_id: Powergrid-0.0-trafo-1.loading_percent