Relaxed the prohibition on ((S != 1) && (M != 1)) in device

network parallel/series networks.  Instead, added a global option
with command "property tolerance strict|relaxed" to reinstate the
original (strict) behavior on demand, while relaxing it by default.
This allows certain series/parallel networks to match numerically
even though the schematic netlist may have combined individual
devices.
This commit is contained in:
Tim Edwards
2023-02-27 15:26:18 -05:00
parent 45712a04f1
commit cd013621a7
4 changed files with 54 additions and 9 deletions
+14 -6
View File
@@ -162,6 +162,10 @@ int right_col_end = 87;
/* if TRUE, always partition ALL classes */
int ExhaustiveSubdivision = 0;
/* if TRUE, enforce that networks (e.g., resistor) must match */
/* topologically, as opposed to just matching numerically. */
int ExactTopology = 0;
#ifdef TEST
static void PrintElement_List(struct Element *E)
{
@@ -4932,13 +4936,17 @@ int PropertyOptimize(struct objlist *ob, struct nlist *tp, int run, int series,
}
}
if (kl == NULL) {
/* Prevent setting both M > 1 and S > 1 in any one */
/* device, as it is ambiguous. */
/* Setting both M > 1 and S > 1 is topologically */
/* ambiguous. If global option ExactTopology is */
/* enabled, then this will cause a failure. */
/* Otherwise, it is allowed. */
if ((*matchfunc)(vl->key, other)) {
if (vl->type == PROP_INTEGER)
if (vl->value.ival > 1)
fail = 1;
if (ExactTopology) {
if ((*matchfunc)(vl->key, other)) {
if (vl->type == PROP_INTEGER)
if (vl->value.ival > 1)
fail = 1;
}
}
}
else if (kl != NULL) {
+1
View File
@@ -7,6 +7,7 @@ extern struct nlist *Circuit1;
extern struct nlist *Circuit2;
extern int ExhaustiveSubdivision;
extern int ExactTopology;
extern int left_col_end;
extern int right_col_end;