-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the breaks by New version of ModelingToolkit #139
Fixed the breaks by New version of ModelingToolkit #139
Conversation
@JuliaRegistrator register() |
Error while trying to register: Register Failed |
@JuliaRegistrator register() |
Error while trying to register: Register Failed |
docs/src/index.md
Outdated
- variables: Symbol[:x, :y, :z] | ||
- expression: y() + z() | ||
``` | ||
We can make object (of type `Separator` or `Contractor`)by just using function name (Note: you have to specify variables explicitly as discussed above when you make objects by using function name). We can also use polynomial function to make objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make object (of type `Separator` or `Contractor`)by just using function name (Note: you have to specify variables explicitly as discussed above when you make objects by using function name). We can also use polynomial function to make objects. | |
We can make objects (of type `Separator` or `Contractor`) by just using the function name (Note: you have to specify variables explicitly as discussed above in this case). We can also use a polynomial function as shown below. |
docs/src/index.md
Outdated
- expression: x() + y() == [-∞, 1] | ||
``` | ||
#### BasicContractor | ||
Object of type `Contractor` have four feilds (variables, forward, backward and expression), among them data of two feilds (forward, backward) are useful (i.e forward and backward functions) for further usage of that object, thats why it is preferred to use an object of type `BasicContractor` in place of `Contractor` which only contain these two feilds for less usage of memory by unloading all the extra stuff.(Note: Like object of `Contractor` type,`BasicContractor`'s object will also have all the properties which are discussed above). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object of type `Contractor` have four feilds (variables, forward, backward and expression), among them data of two feilds (forward, backward) are useful (i.e forward and backward functions) for further usage of that object, thats why it is preferred to use an object of type `BasicContractor` in place of `Contractor` which only contain these two feilds for less usage of memory by unloading all the extra stuff.(Note: Like object of `Contractor` type,`BasicContractor`'s object will also have all the properties which are discussed above). | |
Objects of type `Contractor` have four fields (variables, forward, backward and expression), among them data of two fields (forward, backward) are useful (i.e. forward and backward functions) for further usage of that object, that's why it is preferred to use an object of type `BasicContractor` in place of `Contractor` which only contain these two fields for less usage of memory by unloading all the extra stuff. (Note: Like object of `Contractor` type,`BasicContractor`'s object will also have all the properties which are discussed above). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very silly mistake, thanks for pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats why it is preferred to use an object of type
BasicContractor
in place ofContractor
In which context is it preferred? Like, from the user perspective, for library code? I think that dwelling a bit into some of these details, or giving another example, would improve that paragraph.
Also i guess that the other two fields of Contractor
do have a reason to exist and they are "useful" in some sense (at least internally). I think that this sentence could be improved a bit: "... only contain these two fields for less usage of memory by unloading all the extra stuff..".
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I already mentioned in the paragraph, using BasicContractor
is better because of less usage of memory and for less time complexity.
Other two fields are their just to give information about variables and expression used, which has no usage in contracting the interval w.r.t given constraint for which the object is used which is done by just using forward and backward function. Yes, Internally information about variables and expression is necessary after all only they are used to make forward and backward function but finally we just need these two functions. And these forward and backward functions are present in object .of type BasicContractor
.
test/runtests.jl
Outdated
@@ -59,10 +59,10 @@ end | |||
C2 = Contractor(vars, y+z) | |||
@test C2(A,X) == IntervalBox(0.5..1.5, 0.5..0.5, 0.5..0.5) | |||
|
|||
C1 = Contractor([:x,:y,:z], x+y) | |||
C1 = Contractor([x,y,z], x+y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spaces: [x, y, z]
.
@test C1(A,X) == IntervalBox(0.5..0.5, 0.5..0.5, 0.5..1.5) | ||
|
||
C2 = Contractor([:x,:y,:z], y+z) | ||
C2 = Contractor([x,y,z], y+z) | ||
@test C2(A,X) == IntervalBox(0.5..1.5, 0.5..0.5, 0.5..0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make this result be different from the previous one in order to check that x + y
and y + z
actually give different results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already shown that results are different for x+y
and y+z
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C1(A,X) and C2(A,X) are giving different results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, sorry -- my mistake.
You seem to have added extra docs files in the latest commit that I don't think should be there? |
@JuliaRegistrator register() |
Error while trying to register: Register Failed |
Project.toml
Outdated
@@ -0,0 +1,25 @@ | |||
name = "IntervalConstraintProgramming" | |||
uuid = "138f1668-1576-5ad7-91b9-7425abbf3153" | |||
version = "0.1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.11, not 0.1.1
docs/build/assets/arrow.svg
Outdated
@@ -0,0 +1,63 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are files that are generated in the build process and should not be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh. I'll delete them
docs/src/index.md
Outdated
@@ -59,6 +59,95 @@ julia> outer | |||
([-100, 100],[-100, 100]) | |||
``` | |||
|
|||
### Without using Macros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macros
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
Project.toml
Outdated
IntervalContractors = "≥ 0.3.0" | ||
IntervalRootFinding = "≥ 0.4.0" | ||
MacroTools = "≥ 0.4.0" | ||
julia = "≥ 1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we requiring Julia 1.1? And ModelingToolkit 0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh Right, Sorry its by mistake.
But Isn't for ModelingToolkit it should be autogenerated ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's because you hadn't put a lower bound in to REQUIRE.
Just add it by hand.
Did you see my comment about Project.toml and the versions we require? |
Yes I did |
Thanks! |
Solves Issue #138