Mike Mc Dermott

Michael McDermott

100 Reputation

5 Badges

18 years, 155 days
Self Employed
Circuit Analysis Engineer
Kokomo, Indiana, United States

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by Mike Mc Dermott

@acer 

Thanks for the answer. it's probably just as easy to create a Table from other commands. I think it would be a good feature to add to allow an optional arguement to the Tabulate command to set column widths.

I don't mean with the gui, with a command.

@acer Matrix(r,c,init)


 

restart; with(Syrup)

[About, Draw, GetParameters, Library, Print, Solve, ToModelica, ToSpice]

(1)

NULL

test

Error, missing operator or `;`

I can get a solution by hard-coding a value '10' in 2 places for i1

sol := Solve("ec:CodeEditRegion0")

{v[1] = 12, v[2] = RootOf(10*ifelse(Vclamp < _Z, (RClamp*ileak-Vclamp+_Z)/RClamp, ileak)-12+_Z)}

(2)

allvalues(eval[recurse](v[2], `union`(sol, {RClamp = .1, Vclamp = 10, ileak = 10^(-6), v1 = 12})))

10.01980188, 11.99999000+0.4909875000e-35*I

(3)

If all values numeric, then the real solution is what we are looking for, so we know that Syrup can solve the problem numerically.
Syrup can't solve using symbolic option.

solSymbolic := solve("ec:CodeEditRegion0", symbolic)

Error, invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), {list, set}({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received ec:CodeEditRegion0

 

````

NULL
My question is if there is a way to somehow put placeholders in the netlist, and assign values to the placeholders before submitting to Solve.
A work-around would be do do this with sort of manually by a procedure that would replace the placeholders in the netlist with numeric values before the Solve command. This procedure would be inside the optimization loop to get the extreme result values based on the ranges of the parameters.
 


 

Download SyrupConditional.mw

The 2nd link is more complete.

1 2 Page 2 of 2