2.3 Installation

Installation and use of Matpower requires familiarity with the basic operation of Matlab or Octave. Make sure you follow the installation instructions for the version of Matpower you are installing. The process was simplified with an install script following version 6.0.

Step 1:
Get a copy of Matpower as described above.

Clone the repository or download and extract the ZIP file of the Matpower distribution and place the resulting directory in the location of your choice and call it anything you like.21 We will use <MATPOWER> as a placeholder to denote the path to this directory (the one containing install_matpower.m). The files in <MATPOWER> should not need to be modified, so it is recommended that they be kept separate from your own code.

Step 2:
Run the installer.

Open Matlab or Octave and change to the <MATPOWER> directory.

Run the installer and follow the directions to add the required directories to your Matlab or Octave path, by typing:

   install_matpower

Step 3:
That’s it. There is no step 3.

But, if you chose not to have the installer run the test suite for you in step 2, you can run it now to verify that Matpower is installed and functioning properly, by typing:22

   test_matpower

The result should resemble the following, possibly including extra tests, depending on the availablility of optional packages, solvers and extras.

>> test_matpower
t_nested_struct_copy....ok
t_have_fcn..............ok
t_feval_w_path..........ok
t_mpoption..............ok
t_loadcase..............ok
t_ext2int2ext...........ok
t_jacobian..............ok
t_hessian...............ok
t_margcost..............ok
t_totcost...............ok
t_modcost...............ok
t_hasPQcap..............ok
t_mplinsolve............ok (6 of 44 skipped)
t_mips..................ok
t_mips_pardiso..........ok (60 of 60 skipped)
t_qps_matpower..........ok (288 of 360 skipped)
t_miqps_matpower........ok (240 of 240 skipped)
t_pf....................ok
t_pf_radial.............ok
t_cpf...................ok
t_islands...............ok
t_opf_model.............ok
t_opf_model_legacy......ok
t_opf_default...........ok
t_opf_mips..............ok (278 of 1296 skipped)
t_opf_dc_mips...........ok
t_opf_dc_mips_sc........ok
t_opf_userfcns..........ok
t_opf_softlims..........ok
t_runopf_w_res..........ok
t_dcline................ok
t_get_losses............ok
t_load2disp.............ok
t_makePTDF..............ok
t_makeLODF..............ok
t_printpf...............ok
t_vdep_load.............ok
t_total_load............ok
t_scale_load............ok
t_apply_changes.........ok
t_psse..................ok
t_off2case..............ok
t_auction_mips..........ok
t_runmarket.............ok
All tests successful (8242 passed, 872 skipped of 9114)
Elapsed time 40.35 seconds.