Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
58c34c0
Feature: merge `Expr` and `GenExpr`
Zeroto521 Oct 28, 2025
4cbc603
Rename _unary to _to_unary_expr in expr.pxi
Zeroto521 Oct 28, 2025
188b3ef
Remove `Variable.create`
Zeroto521 Oct 28, 2025
193ec1c
Specify type of _lhs and _rhs as object in ExprCons
Zeroto521 Nov 7, 2025
c70e305
Merge branch 'master' into issue/1074
Zeroto521 Nov 8, 2025
d8d63d2
lint codes
Zeroto521 Nov 8, 2025
a0086d2
Change Variable constructor to use __cinit__
Zeroto521 Nov 8, 2025
123f36e
MAINT: Support return solution
Zeroto521 Nov 10, 2025
c961db5
Add return type annotations to _normalize methods
Zeroto521 Nov 10, 2025
0b01b08
Remove adding 0
Zeroto521 Nov 10, 2025
28e6673
MAINT: use class inner method to instead
Zeroto521 Nov 10, 2025
e4f48b5
Replace 'terms' with 'children' in Expr usage
Zeroto521 Nov 10, 2025
7d85fd0
lint codes
Zeroto521 Nov 10, 2025
f7159a0
Correct `_evaluate` cython syntax
Zeroto521 Nov 17, 2025
69737c0
Correct name: `PowerExpr` → `PowExpr`
Zeroto521 Nov 18, 2025
09a222b
Refactor expression to node conversion
Zeroto521 Nov 18, 2025
2b0fa85
Merge branch 'master' into issue/1074
Zeroto521 Nov 18, 2025
0b7ee70
Revert 188b3efa "Remove `Variable.create`"
Zeroto521 Nov 18, 2025
cc28588
Refactor Expr to standard Python class
Zeroto521 Nov 18, 2025
8719b91
Simplify comparison
Zeroto521 Nov 18, 2025
84886b3
Revert "MAINT: use class inner method to instead"
Zeroto521 Nov 18, 2025
955a9e0
Change cdef classes to Python classes in expr.pxi
Zeroto521 Nov 18, 2025
88aa0b4
lint codes
Zeroto521 Nov 18, 2025
d4bf9b7
Remove unused Expr class from scip.pxd
Zeroto521 Nov 18, 2025
b5f0435
Refactor ExprCons to Python class with type hints
Zeroto521 Nov 18, 2025
ece0ce0
Remove Cython related annotations
Zeroto521 Nov 18, 2025
7811406
Refactor tests to use Expr instead of GenExpr
Zeroto521 Nov 18, 2025
72efd0a
Remove `GenExpr`
Zeroto521 Nov 18, 2025
73777a4
Add __hash__ method to Variable class
Zeroto521 Nov 18, 2025
c0c14ae
Replace > and < with <= and >=
Zeroto521 Nov 18, 2025
900bc81
Support Variable type in matrix comparison
Zeroto521 Nov 18, 2025
003f3a6
Move degree() method from subclasses to Expr base class
Zeroto521 Nov 18, 2025
810a60d
support `Expr() + 1`
Zeroto521 Nov 18, 2025
0c406bb
Update degree test for empty expression
Zeroto521 Nov 18, 2025
dd2b02d
Replace `.terms` with `.children`
Zeroto521 Nov 18, 2025
c139de4
Replace `.vartuple` with `.vars`
Zeroto521 Nov 18, 2025
a7ba203
Fix operator overloads in Expr class
Zeroto521 Nov 18, 2025
3fbd24f
Replace __ge__ with __eq__ in Expr class
Zeroto521 Nov 18, 2025
ea9bb38
Support `variable[variable]`
Zeroto521 Nov 19, 2025
c17e4a5
Add iterator support to Variable class
Zeroto521 Nov 19, 2025
790319e
Refactor objective expression type handling
Zeroto521 Nov 19, 2025
7373021
Empty Expr * other Expr return empty Expr
Zeroto521 Nov 20, 2025
8876f64
Revert "support `Expr() + 1`"
Zeroto521 Nov 20, 2025
e1e1dac
support `_to_nodes`
Zeroto521 Nov 20, 2025
f5a4144
Support `__rpow__`
Zeroto521 Nov 20, 2025
3e3f2bd
Sort methods
Zeroto521 Nov 20, 2025
b9936f0
Merge branch 'master' into issue/1074
Joao-Dionisio Nov 20, 2025
e60e3ce
Support `__abs__`
Zeroto521 Nov 20, 2025
162f6f2
Expr requires Variable, Term, or Expr
Zeroto521 Nov 20, 2025
b3698de
`to_const_or_var` → `from_const_or_var`
Zeroto521 Nov 20, 2025
718fb67
Allow __getitem__ to accept non-Expr keys
Zeroto521 Nov 20, 2025
33695c4
Allow Term objects as keys in Expr __getitem__
Zeroto521 Nov 20, 2025
73a5a21
Use PolynomialExpr in quicksum and quickprod
Zeroto521 Nov 20, 2025
da49cca
Fix division logic for Expr with hash check
Zeroto521 Nov 22, 2025
2977310
Filter 0 coefficient from SumExpr
Zeroto521 Nov 22, 2025
b270aa8
Use Hashable for hash check in Expr division
Zeroto521 Nov 23, 2025
bb3f871
Improve type checks and constructors in expression classes
Zeroto521 Nov 23, 2025
29a7e2a
Term support return `_to_nodes`
Zeroto521 Nov 23, 2025
7f75a55
Add type annotations to expression classes and functions
Zeroto521 Nov 23, 2025
bd00b91
Refactor number type checks to use numbers.Number
Zeroto521 Nov 23, 2025
337803b
Handle Number type in UnaryExpr constructor
Zeroto521 Nov 23, 2025
d0776b1
Add type annotations to expression classes
Zeroto521 Nov 23, 2025
d74fbfa
Move `_to_unary_expr` to UnaryExpr class inner
Zeroto521 Nov 23, 2025
882a1b1
Update exception type in power operation test
Zeroto521 Nov 23, 2025
b971304
Refactor quicksum and quickprod implementations
Zeroto521 Nov 23, 2025
d56b5db
Improve addition logic for Expr classe
Zeroto521 Nov 23, 2025
ca5aae2
Refactor degree calculation in expression classes
Zeroto521 Nov 23, 2025
3a599a5
Fix node construction logic in expression classes
Zeroto521 Nov 23, 2025
0e7223b
Fix degree calculation for empty expression children
Zeroto521 Nov 23, 2025
86d60f7
Improve ExprCons initialization and validation
Zeroto521 Nov 23, 2025
659fb2b
Set default CONST term in Expr children
Zeroto521 Nov 25, 2025
36f46cc
Fix degree test for empty expression
Zeroto521 Nov 25, 2025
726561c
Update expected values in equation tests
Zeroto521 Nov 25, 2025
0edf545
Remove unused test_degree (it for GenExpr)
Zeroto521 Nov 25, 2025
1b4719e
Improve multiplication logic in Expr class
Zeroto521 Nov 25, 2025
1b481eb
Update inequality test assertions in test_expr.py
Zeroto521 Nov 25, 2025
cb9e8c2
Revert "Set default CONST term in Expr children"
Zeroto521 Nov 25, 2025
a679683
Refactor zero-removal logic in SumExpr and PolynomialExpr
Zeroto521 Nov 25, 2025
835feeb
Fix addition behavior for Expr with no children
Zeroto521 Nov 25, 2025
1cf3a79
Update degree test for empty expression
Zeroto521 Nov 25, 2025
fe7027e
Refactor Expr and ProdExpr multiplication logic
Zeroto521 Nov 26, 2025
64097ee
Merge SumExpr into Expr
Zeroto521 Nov 26, 2025
a0f3f57
Reorder imports and reformat addMatrixVar and addCons loop
Zeroto521 Nov 26, 2025
8c9d155
Speed up via avoid copying dict itself
Zeroto521 Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/finished/logical.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
def printFunc(name, m):
"""prints results"""
print("* %s *" % name)
objSet = bool(m.getObjective().terms.keys())
objSet = bool(m.getObjective().children.keys())
print("* Is objective set? %s" % objSet)
if objSet:
print("* Sense: %s" % m.getObjectiveSense())
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorial/logical.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _init():
def _optimize(name, m):
m.optimize()
print("* %s constraint *" % name)
objSet = bool(m.getObjective().terms.keys())
objSet = bool(m.getObjective().children.keys())
print("* Is objective set? %s" % objSet)
if objSet:
print("* Sense: %s" % m.getObjectiveSense())
Expand Down
Loading
Loading