Skip to content

Run Powerworld Executible

Russell Bent edited this page May 31, 2017 · 22 revisions

Run Powerworld Executable Installation

  1. Download and install the java 7 or later run time environment.
  1. Install a git command line tool
  • Linux
    sudo apt-get install git
    
  1. Get the Powerworld jar file

    git clone https://github.com/lanl-ansi/micot-powerworld.jar.git
    
  2. Follow the DOCM and Powerworld installation instructions

  3. Test the executible using the examples included in the git repository checked out in step 4 (using the micot-powerworld.jar file that was checked out)

    java -jar micot-powerworld.jar -p test_data/ep/powerworld/B7OPF.RAW -m application_data/powerworld/config-powerworld-mods-only.json
    
  4. The -p is a required field that points at the location of the power flow model. Supported formats include RAW and powerworld binaries. -m is an optional field that points at an input json file that modifies the power flow model. Supported functions are listed in the next sections. The output is provided in standard out as JSON format.

JSON Input Specifications

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Run Powerworld JSON schema",
  "description": "These schema describes the fields for the JSON schema used by the powerworld application to modify power component data",
  "properties": {
    "modifications": {
      "type": "array",
      "description": "This block describes the necessary data for specifying a modification",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single modification",
        "properties": {
          "component_type": {
            "type": "string",
            "description": "The type of component to modify",
            "enum": [ 
                      "gov.lanl.micot.infrastructure.ep.model.ElectricPowerFlowConnection", 
                      "gov.lanl.micot.infrastructure.ep.model.Bus", 
                      "gov.lanl.micot.infrastructure.ep.model.Generator", 
                      "gov.lanl.micot.infrastructure.ep.model.Load"
                    ]  
          },
          "id": {
            "type": "object",
            "description": "JSON block for identifying a component",
            "properties": {
              "id_key": {
                "type": "string",
                "description": "The attribute used to identify the component",
                "enum": [ 
                          "POWERWORLD_LEGACY_ID" 
                        ]
              },
              "id_value": {
                "description": "The unique identifier"
              },
              "id_type": {
                "type": "string",
                "description": "The data type used for identifying a component",
                "enum": [ 
                          "string",
                          "double",
                          "integer",
                          "boolean" 
                        ]
              }  
            }
          },
 
         "modification": {
            "type": "object",
            "description": "JSON block for specifying the modification",
            "properties": {
              "modification_key": {
                "type": "string",
                "description": "The attribute to modify of the component",
                "enum": [ 
                          "DESIRED_STATUS",
                          "VOLTAGE_PU",
                          "PHASE_ANGLE",
                          "ACTUAL_REACTIVE_GENERATION",
                          "ACTUAL_REAL_GENERATION",
                          "ACTUAL_REACTIVE_LOAD",
                          "ACTUAL_REAL_LOAD"
                        ]
              },
              "modification_value": {
                "description": "The value of the modification"
              },
              "modification_type": {
                "type": "string",
                "description": "The data type of the modification",
                "enum": [ 
                          "string",
                          "double",
                          "integer",
                          "boolean" 
                        ]
              }  
            }
          }
        }
      }
    }
  }
}

Supported Modification Inputs

Some key additional information about the types of data that can go into the fields of the input JSON specification.

  1. component_type This is used to indicate what type of electric power component is to be modified. Choices are
  • Branch: gov.lanl.micot.infrastructure.ep.model.ElectricPowerFlowConnection
  • Bus: gov.lanl.micot.infrastructure.ep.model.Bus
  • Generator: gov.lanl.micot.infrastructure.ep.model.Generator
  • Load: gov.lanl.micot.infrastructure.ep.model.Load
  1. id is used to indicate the attribute of the power component used to identify it. This executable currently only supports "POWERWORLD_LEGACY_ID" for identifying powerworld components.
  2. id_value Under powerworld, bus ids have the form a single string. Generator and loads have ids of the form "(bus_id,load_id)". Branches have ids of the form "(bus_i_id,bus_j_id,circuit_id)".
  3. id_type is used to indicate the type of data used to store the id value (string, double, integer or boolean)
  4. modification_key is used to indicated what attribute of an electric power component that will be modified.
  • DESIRED_STATUS: On/off status for a component
  • VOLTAGE_PU: Voltage magnitude of a bus in PU
  • PHASE_ANGLE: Voltage angle of a bus
  • ACTUAL_REACTIVE_GENERATION: Reactive power output of a generator
  • ACTUAL_REAL_GENERATION: Real power output of a generator
  • ACTUAL_REACTIVE_LOAD: Reactive power consumption of a load
  • ACTUAL_REAL_LOAD: Real power consumption of a load
  1. modification_type indicates the type of data in the modification (string, double, integer, or boolean)

JSON Output Specifications

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Run Powerworld output JSON schema",
  "description": "These schema describes the outpur fields for the JSON schema used by the powerworld application",
  "properties": {
    "bus": {
      "type": "array",
      "description": "This block describes bus data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single bus",
        "properties": {
          "bus_i": {
            "type": "string",
            "description": "The powerworld identifier for a bus"
          },
          "base_kv": {
            "type": "double",
            "description": "The base voltage of the bus in KV"
          },
          "owner": {
            "type": "string",
            "description": "The owner of the bus"
          },
          "name": {
            "type": "string",
            "description": "The name of the bus"
          },
          "va": {
            "type": "double",
            "description": "The voltage angle for a bus in degrees"
          },
          "vm": {
            "type": "double",
            "description": "The voltage magnitude for a bus in kv"
          },
          "vm_min": {
            "type": "double",
            "description": "The minimum voltage magnitude for a bus in kv"
          },
          "vm_max": {
            "type": "double",
            "description": "The maximum voltage magnitude for a bus in kv"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a bus"
          }
        }
      }
    },

   "branch": {
      "type": "array",
      "description": "This block describes branch data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single branch",
        "properties": {
          "branch_i": {
            "type": "string",
            "description": "The powerworld identifier for a branch"
          },
          "base_kv": {
            "type": "double",
            "description": "The maximum kv on either side of the branch"
          },
          "mw_i": {
            "type": "double",
            "description": "MW at the from bus of the branch"
          },
          "mw_j": {
            "type": "double",
            "description": "MW at the from bus of the branch"
          },
          "mvar_i": {
            "type": "double",
            "description": "MVAR at the from bus of the branch"
          },
          "mvar_j": {
            "type": "double",
            "description": "MVAR at the from bus of the branch"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a bus"
          }
        }
      }
    },

    "gen": {
      "type": "array",
      "description": "This block describes generator data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single generator",
        "properties": {
          "gen_i": {
            "type": "string",
            "description": "The powerworld identifier for a generator"
          },
          "mw": {
            "type": "array",
            "description": "The MW output for a generator. The first entry is the lower bound, the middle entry is the actual, and the last entry is the upper bound"
          },
          "mvar": {
            "type": "array",
            "description": "The MVAR output for a generator. The first entry is the lower bound, the middle entry is the actual, and the last entry is the upper bound"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a generator"
          }
        }
      }
    },




    "shunt": {
      "type": "array",
      "description": "This block describes shunt data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single shunt",
        "properties": {
          "shunt_i": {
            "type": "string",
            "description": "The powerworld identifier for a shunt"
          },
          "bs": {
            "type": "double",
            "description": "The shunt susceptance in MVAR"
          },
          "gs": {
            "type": "double",
            "description": "The shunt conductance in MW"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a shunt"
          }
        }
      }
    },



    "load": {
      "type": "array",
      "description": "This block describes load data solutions from a power flow solve",
      "items": {
        "type": "object",
        "description": "Each entry here contains information about a single load",
        "properties": {
          "load_i": {
            "type": "string",
            "description": "The powerworld identifier for a load"
          },
          "mw": {
            "type": "array",
            "description": "The MW input for a load. The first entry is the minimum, the middle entry is the actual, and the last entry is the maximum."
          },
          "mvar": {
            "type": "array",
            "description": "The MVAR input for a load. The first entry is the minimum, the middle entry is the actual, and the last entry is maximum"
          },
          "status": {
            "type": "boolean",
            "description": "On/off status for a load"
          }
        }
      }
    }
  }
}
Clone this wiki locally