public static ViewHelper LoadModel(string datasourcePath,double mapheight,double mapwidth){ var source = new DataFromExcel(datasourcePath); var model = new PowerSystemModel(source); var helper = new ViewHelper(model,mapwidth,mapheight); return helper; }
public TopLevelBuilder(PowerSystemModel thisTopLevel, IDataSource thisDataSource): base(thisTopLevel) { topLevel = thisTopLevel; //datasource set at the top level, and then used by every other ModelBuilder instance datasource = thisDataSource; containedTypeNames = new String[] { "LineModel","LoadResponseCharacteristic" }; }