add transivity to incompatbile
This commit is contained in:
28
.idea/workspace.xml
generated
28
.idea/workspace.xml
generated
@@ -4,7 +4,9 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="12bd6c53-8ba7-454c-a61e-7a76cc3b801b" name="Changes" comment="" />
|
<list default="true" id="12bd6c53-8ba7-454c-a61e-7a76cc3b801b" name="Changes" comment="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -34,15 +36,15 @@
|
|||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"git-widget-placeholder": "dev__v1",
|
"git-widget-placeholder": "dev__v1",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "E:/M1/ALO/cartailor",
|
"last_opened_file_path": "C:/Users/vumin/Desktop/M1/ALO/cartailor",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"project.structure.last.edited": "SDKs",
|
"project.structure.last.edited": "SDKs",
|
||||||
"project.structure.proportion": "0.0",
|
"project.structure.proportion": "0.15",
|
||||||
"project.structure.side.proportion": "0.0",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "preferences.lookFeel",
|
"settings.editor.selected.configurable": "preferences.lookFeel",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
@@ -53,6 +55,21 @@
|
|||||||
<recent name="C:\Users\vumin\Desktop\M1\ALO\cartailor" />
|
<recent name="C:\Users\vumin\Desktop\M1\ALO\cartailor" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="RunManager">
|
||||||
|
<configuration default="true" type="JetRunConfigurationType">
|
||||||
|
<module name="cartailor" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType">
|
||||||
|
<module name="cartailor" />
|
||||||
|
<option name="filePath" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
<component name="SharedIndexes">
|
<component name="SharedIndexes">
|
||||||
<attachedChunks>
|
<attachedChunks>
|
||||||
<set>
|
<set>
|
||||||
@@ -70,6 +87,9 @@
|
|||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1728547786554</updated>
|
<updated>1728547786554</updated>
|
||||||
<workItem from="1729254205656" duration="1151000" />
|
<workItem from="1729254205656" duration="1151000" />
|
||||||
|
<workItem from="1729507889060" duration="386000" />
|
||||||
|
<workItem from="1729595321874" duration="25000" />
|
||||||
|
<workItem from="1729743145740" duration="122000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class CompatibilityManagerImpl implements src.fr.api.CompatibilityManager
|
|||||||
|
|
||||||
if(incompa.isEmpty()){
|
if(incompa.isEmpty()){
|
||||||
incompatibilities.put(reference, target);
|
incompatibilities.put(reference, target);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
for(PartType x: target){
|
for(PartType x: target){
|
||||||
if (incompa.contains(x)){
|
if (incompa.contains(x)){
|
||||||
@@ -39,10 +40,11 @@ public class CompatibilityManagerImpl implements src.fr.api.CompatibilityManager
|
|||||||
//Ajout ref à x
|
//Ajout ref à x
|
||||||
incompa.add(x);
|
incompa.add(x);
|
||||||
System.out.println("Add "+reference.getName() +" incompatible with "+x.getName());
|
System.out.println("Add "+reference.getName() +" incompatible with "+x.getName());
|
||||||
|
|
||||||
|
// Symétrie
|
||||||
//Ajoute x à ref
|
//Ajoute x à ref
|
||||||
this.getIncompatibilities(x).add(reference);
|
//this.getIncompatibilities(x).add(reference);
|
||||||
System.out.println("Add "+x.getName() +" incompatible with "+reference.getName());
|
//System.out.println("Add "+x.getName() +" incompatible with "+reference.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,8 +63,10 @@ public class CompatibilityManagerImpl implements src.fr.api.CompatibilityManager
|
|||||||
}else{
|
}else{
|
||||||
if(incompa.contains(target)){
|
if(incompa.contains(target)){
|
||||||
incompa.remove(target);
|
incompa.remove(target);
|
||||||
|
|
||||||
|
// SyMéTrIe
|
||||||
//Remove target -> ref
|
//Remove target -> ref
|
||||||
this.getIncompatibilities(target).remove(reference);
|
//this.getIncompatibilities(target).remove(reference);
|
||||||
}else {
|
}else {
|
||||||
System.out.println("This part doesn't exist in incompatibilities list");
|
System.out.println("This part doesn't exist in incompatibilities list");
|
||||||
}
|
}
|
||||||
@@ -90,10 +94,11 @@ public class CompatibilityManagerImpl implements src.fr.api.CompatibilityManager
|
|||||||
//Ajout ref à x
|
//Ajout ref à x
|
||||||
require.add(x);
|
require.add(x);
|
||||||
System.out.println("Add "+reference.getName() +" compatible with "+x.getName());
|
System.out.println("Add "+reference.getName() +" compatible with "+x.getName());
|
||||||
|
|
||||||
|
//Symétrie
|
||||||
//Ajoute x à ref
|
//Ajoute x à ref
|
||||||
this.getRequirements(x).add(reference);
|
//this.getRequirements(x).add(reference);
|
||||||
System.out.println("Add "+x.getName() +" compatible with "+reference.getName());
|
//System.out.println("Add "+x.getName() +" compatible with "+reference.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,8 +118,10 @@ public class CompatibilityManagerImpl implements src.fr.api.CompatibilityManager
|
|||||||
}else{
|
}else{
|
||||||
if(require.contains(target)){
|
if(require.contains(target)){
|
||||||
require.remove(target);
|
require.remove(target);
|
||||||
|
|
||||||
|
// SyMéTrIe
|
||||||
//Remove target -> ref
|
//Remove target -> ref
|
||||||
this.getRequirements(target).remove(reference);
|
//this.getRequirements(target).remove(reference);
|
||||||
}else {
|
}else {
|
||||||
System.out.println("This part doesn't exist in compatibilities list");
|
System.out.println("This part doesn't exist in compatibilities list");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ public class test {
|
|||||||
cm.removeIncompatibility(XM, EG100);
|
cm.removeIncompatibility(XM, EG100);
|
||||||
assertFalse(cm.getIncompatibilities(XM).contains(EG100));
|
assertFalse(cm.getIncompatibilities(XM).contains(EG100));
|
||||||
Set<PartType> setEG100 = new HashSet<PartType>();
|
Set<PartType> setEG100 = new HashSet<PartType>();
|
||||||
|
System.out.println(setEG100.size());
|
||||||
setEG100.add(EG100);
|
setEG100.add(EG100);
|
||||||
cm.addIncompatibilities(EG100, setEG100);
|
cm.addIncompatibilities(EG100, setEG100);
|
||||||
System.out.println(cm.getIncompatibilities(XM) + "//////////");
|
System.out.println(cm.getIncompatibilities(XM) + "//////////");
|
||||||
|
|||||||
Reference in New Issue
Block a user