no message
This commit is contained in:
@@ -5,7 +5,7 @@ import GlobalData.Settings.SettingName;
|
||||
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfigurationDBTable;
|
||||
import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationCommandsDBTable;
|
||||
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforsDBTable;
|
||||
import TestingSystem.DVM.Configuration.UI.ConfigurationDBTable;
|
||||
import TestingSystem.DVM.Configuration.ConfigurationDBTable;
|
||||
import TestingSystem.Common.Group.GroupsDBTable;
|
||||
import TestingSystem.Common.TSetting.TSetting;
|
||||
import TestingSystem.Common.TSetting.TSettingsDBTable;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package TestingSystem.DVM.Configuration;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.rDBObject;
|
||||
public class Configuration extends rDBObject {
|
||||
import Common.Database.riDBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RunConfiguration.RunConfiguration;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Configuration extends riDBObject {
|
||||
//компиляция.
|
||||
public String flags = "\n";
|
||||
public int c_maxtime = 40;
|
||||
@@ -33,4 +37,67 @@ public class Configuration extends rDBObject {
|
||||
this.SynchronizeFields(src);
|
||||
}
|
||||
public Configuration(){}
|
||||
//--
|
||||
public Vector<String> getFlags() {
|
||||
return Utils.unpackStrings(flags);
|
||||
}
|
||||
public Vector<String> getEnvironments() {
|
||||
return Utils.unpackStrings(environments);
|
||||
}
|
||||
public Vector<String> getParams() {
|
||||
return Utils.unpackStrings(usr_par);
|
||||
}
|
||||
public Vector<String> getMatrixes(int testDim) {
|
||||
Vector<Vector<Integer>> res_ = new Vector<>();
|
||||
Vector<String> res = new Vector<>();
|
||||
if ((max_proc_count==0) || (min_dim_proc_count == 0 && max_dim_proc_count == 0)) {
|
||||
res.add("");
|
||||
} else {
|
||||
if (testDim > 0) {
|
||||
Vector<String> min_border = new Vector<>();
|
||||
Vector<String> max_border = new Vector<>();
|
||||
for (int i = 1; i <= testDim; ++i) {
|
||||
min_border.add(String.valueOf(min_dim_proc_count));
|
||||
max_border.add(String.valueOf(max_dim_proc_count));
|
||||
}
|
||||
Vector<Integer> from = RunConfiguration.getBounds(String.join(" ", min_border));
|
||||
Vector<Integer> to = RunConfiguration.getBounds(String.join(" ", max_border));
|
||||
if (from.size() != to.size()) {
|
||||
System.out.println("Верхняя и нижняя границы матриц конфигурации имеют разные размерности");
|
||||
return res;
|
||||
}
|
||||
if (from.size() != testDim) {
|
||||
System.out.println("Границы матриц не совпадают с размерностью конфигурации");
|
||||
return res;
|
||||
}
|
||||
//1 стадия. заполнение.
|
||||
for (int j = from.get(0); j <= to.get(0); ++j) {
|
||||
Vector<Integer> m = new Vector<>();
|
||||
res_.add(m);
|
||||
m.add(j);
|
||||
}
|
||||
//---
|
||||
if (testDim > 1) RunConfiguration.gen_rec(from, to, res_, 1, testDim, cube == 1);
|
||||
for (Vector<Integer> m : res_) {
|
||||
Vector<String> ms = new Vector<>();
|
||||
int proc = 1;
|
||||
for (int i : m) {
|
||||
ms.add(String.valueOf(i));
|
||||
proc *= i;
|
||||
}
|
||||
if (proc <= max_proc_count)
|
||||
res.add(String.join(" ", ms));
|
||||
}
|
||||
} else res.add("");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public String getParamsText() {
|
||||
Vector<String> params = getParams();
|
||||
if ((params.size() == 1) && params.get(0).isEmpty()) return "";
|
||||
return String.join("\n", params);
|
||||
}
|
||||
public String getSummary() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package TestingSystem.DVM.Configuration.UI;
|
||||
package TestingSystem.DVM.Configuration;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.DBTable;
|
||||
import Common.Database.iDBTable;
|
||||
import Common.UI.DataSetControlForm;
|
||||
import Common.UI.Tables.TableRenderers;
|
||||
import Common.UI.VisualiserStringList;
|
||||
import Common.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.DVM.Configuration.Configuration;
|
||||
import TestingSystem.DVM.Configuration.ConfigurationInterface;
|
||||
public class ConfigurationDBTable extends DBTable<String, Configuration> {
|
||||
import TestingSystem.DVM.Configuration.UI.ConfigurationFields;
|
||||
public class ConfigurationDBTable extends iDBTable<Configuration> {
|
||||
public ConfigurationDBTable() {
|
||||
super(String.class, Configuration.class);
|
||||
super(Configuration.class);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
@@ -34,12 +33,11 @@ public class ConfigurationDBTable extends DBTable<String, Configuration> {
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(0).setVisible(false);
|
||||
// columns.get(0).setVisible(false);
|
||||
columns.get(4).setRenderer(TableRenderers.RendererMultiline);
|
||||
columns.get(5).setRenderer(TableRenderers.RendererMultiline);
|
||||
columns.get(12).setRenderer(TableRenderers.RendererMultiline);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
@Override
|
||||
@@ -113,9 +111,9 @@ public class ConfigurationDBTable extends DBTable<String, Configuration> {
|
||||
public void fillFields() {
|
||||
fields.tfName.setText(Result.description);
|
||||
//------->>>>
|
||||
((VisualiserStringList) (fields.flagsList)).fill(ConfigurationInterface.getFlags(Result));
|
||||
((VisualiserStringList) (fields.environmentsList)).fill(ConfigurationInterface.getEnvironments(Result));
|
||||
((VisualiserStringList) (fields.parList)).fill(ConfigurationInterface.getParams(Result));
|
||||
((VisualiserStringList) (fields.flagsList)).fill(Result.getFlags());
|
||||
((VisualiserStringList) (fields.environmentsList)).fill(Result.getEnvironments());
|
||||
((VisualiserStringList) (fields.parList)).fill(Result.getParams());
|
||||
//------->>>>
|
||||
fields.sCompilationMaxtime.setValue(Result.c_maxtime);
|
||||
//-
|
||||
@@ -1,69 +0,0 @@
|
||||
package TestingSystem.DVM.Configuration;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RunConfiguration.RunConfiguration;
|
||||
|
||||
import java.util.Vector;
|
||||
public class ConfigurationInterface {
|
||||
public static Vector<String> getFlags(TestingSystem.DVM.Configuration.Configuration object) {
|
||||
return Utils.unpackStrings(object.flags);
|
||||
}
|
||||
public static Vector<String> getEnvironments(TestingSystem.DVM.Configuration.Configuration object) {
|
||||
return Utils.unpackStrings(object.environments);
|
||||
}
|
||||
public static Vector<String> getParams(TestingSystem.DVM.Configuration.Configuration object) {
|
||||
return Utils.unpackStrings(object.usr_par);
|
||||
}
|
||||
public static Vector<String> getMatrixes(TestingSystem.DVM.Configuration.Configuration object, int testDim) {
|
||||
Vector<Vector<Integer>> res_ = new Vector<>();
|
||||
Vector<String> res = new Vector<>();
|
||||
if ((object.max_proc_count==0) || (object.min_dim_proc_count == 0 && object.max_dim_proc_count == 0)) {
|
||||
res.add("");
|
||||
} else {
|
||||
if (testDim > 0) {
|
||||
Vector<String> min_border = new Vector<>();
|
||||
Vector<String> max_border = new Vector<>();
|
||||
for (int i = 1; i <= testDim; ++i) {
|
||||
min_border.add(String.valueOf(object.min_dim_proc_count));
|
||||
max_border.add(String.valueOf(object.max_dim_proc_count));
|
||||
}
|
||||
Vector<Integer> from = RunConfiguration.getBounds(String.join(" ", min_border));
|
||||
Vector<Integer> to = RunConfiguration.getBounds(String.join(" ", max_border));
|
||||
if (from.size() != to.size()) {
|
||||
System.out.println("Верхняя и нижняя границы матриц конфигурации имеют разные размерности");
|
||||
return res;
|
||||
}
|
||||
if (from.size() != testDim) {
|
||||
System.out.println("Границы матриц не совпадают с размерностью конфигурации");
|
||||
return res;
|
||||
}
|
||||
//1 стадия. заполнение.
|
||||
for (int j = from.get(0); j <= to.get(0); ++j) {
|
||||
Vector<Integer> m = new Vector<>();
|
||||
res_.add(m);
|
||||
m.add(j);
|
||||
}
|
||||
//---
|
||||
if (testDim > 1) RunConfiguration.gen_rec(from, to, res_, 1, testDim, object.cube == 1);
|
||||
for (Vector<Integer> m : res_) {
|
||||
Vector<String> ms = new Vector<>();
|
||||
int proc = 1;
|
||||
for (int i : m) {
|
||||
ms.add(String.valueOf(i));
|
||||
proc *= i;
|
||||
}
|
||||
if (proc <= object.max_proc_count)
|
||||
res.add(String.join(" ", ms));
|
||||
}
|
||||
} else res.add("");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public static String getParamsText(Configuration object) {
|
||||
Vector<String> params = getParams(object);
|
||||
if ((params.size() == 1) && params.get(0).isEmpty()) return "";
|
||||
return String.join("\n", params);
|
||||
}
|
||||
public static String getSummary(Configuration configuration) {
|
||||
return configuration.description;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user