scipplan 0.2.1a0__tar.gz → 0.2.2a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scipplan-0.2.1a0/scipplan.egg-info → scipplan-0.2.2a0}/PKG-INFO +1 -1
- scipplan-0.2.2a0/scipplan/__init__.py +5 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/parse_model.py +3 -2
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/scipplan.py +18 -16
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/zero_crossing.py +2 -1
- {scipplan-0.2.1a0 → scipplan-0.2.2a0/scipplan.egg-info}/PKG-INFO +1 -1
- scipplan-0.2.2a0/scipplan.egg-info/top_level.txt +5 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/setup.py +2 -2
- scipplan-0.2.1a0/scipplan/__init__.py +0 -5
- scipplan-0.2.1a0/scipplan.egg-info/top_level.txt +0 -1
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/LICENSE +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/MANIFEST.in +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/README.md +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/config.py +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/helpers.py +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/plan_model.py +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/odes_navigation_1.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/odes_navigation_2.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/odes_navigation_3.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/solutions_navigation_1.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/solutions_navigation_2.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/translation/solutions_navigation_3.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan/variables.py +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan.egg-info/SOURCES.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan.egg-info/dependency_links.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan.egg-info/entry_points.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan.egg-info/not-zip-safe +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/scipplan.egg-info/requires.txt +0 -0
- {scipplan-0.2.1a0 → scipplan-0.2.2a0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: scipplan
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.2a0
|
4
4
|
Summary: Metric Hybrid Factored Planning in Nonlinear Domains with Constraint Generation in Python.
|
5
5
|
Author: Ari Gestetner, Buser Say
|
6
6
|
Author-email: ari.gestetner@monash.edu, buser.say@monash.edu
|
@@ -204,7 +204,8 @@ class ParseModel:
|
|
204
204
|
else:
|
205
205
|
aux_var: Variable = self.expressions.aux_vars[idx]
|
206
206
|
|
207
|
-
|
207
|
+
if self.params.add_aux_vars is True:
|
208
|
+
aux_vars.append(aux_var)
|
208
209
|
self.variables[aux_var.name] = aux_var.model_var
|
209
210
|
|
210
211
|
expr1, expr2 = linearise(expr, aux_var)
|
@@ -280,4 +281,4 @@ if __name__ == "__main__":
|
|
280
281
|
# print(calc(
|
281
282
|
# """
|
282
283
|
# a + b + c >= 5 or a - b - c == 10
|
283
|
-
# """))
|
284
|
+
# """))
|
@@ -68,7 +68,8 @@ class SCIPPlan:
|
|
68
68
|
"zero_crossing_coefficient": zero_cross.coef,
|
69
69
|
"new_dt_val": zero_cross.new_dt_val,
|
70
70
|
"horizon": zero_cross.horizon,
|
71
|
-
"iteration": zero_cross.iteration
|
71
|
+
"iteration": zero_cross.iteration,
|
72
|
+
"constraint_idx": zero_cross.constraint_idx
|
72
73
|
})
|
73
74
|
|
74
75
|
if self.config.show_output is True:
|
@@ -80,19 +81,19 @@ class SCIPPlan:
|
|
80
81
|
|
81
82
|
self.scip_model.freeTransform()
|
82
83
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
84
|
+
t = zero_cross.horizon
|
85
|
+
idx = zero_cross.constraint_idx
|
86
|
+
constraint = self.plan.translations["temporal_constraints"][idx]
|
87
|
+
aux_vars = self.plan.aux_vars["temporal_constraints"][idx][t]
|
88
|
+
# Only add aux vars if there are no aux vars added for the specific constraint
|
89
|
+
params = self.plan.get_parser_params(horizon=t, add_aux_vars=aux_vars is None)
|
90
|
+
params.variables[self.config.dt_var] *= zero_cross.coef
|
91
|
+
exprs = PM(params).evaluate(constraint, aux_vars=aux_vars)
|
92
|
+
if const_gen_aux_vars[idx][t] is None:
|
93
|
+
const_gen_aux_vars[idx][t] = exprs.aux_vars
|
94
|
+
|
95
|
+
for eqtn_idx, eqtn in enumerate(exprs):
|
96
|
+
self.plan.model.addCons(eqtn, f"{constraint}_{idx}_{eqtn_idx}")
|
96
97
|
|
97
98
|
iteration += 1
|
98
99
|
|
@@ -104,7 +105,7 @@ class SCIPPlan:
|
|
104
105
|
for h in range(self.config.horizon):
|
105
106
|
dt = self.scip_model.getVal(self.plan.variables[(self.config.dt_var, h)].model_var)
|
106
107
|
|
107
|
-
for constraint in self.plan.translations["temporal_constraints"]:
|
108
|
+
for idx, constraint in enumerate(self.plan.translations["temporal_constraints"]):
|
108
109
|
is_violated = False
|
109
110
|
|
110
111
|
for time in iterate(0, dt, self.config.epsilon):
|
@@ -129,6 +130,7 @@ class SCIPPlan:
|
|
129
130
|
start=cross_interval[0],
|
130
131
|
end=cross_interval[1],
|
131
132
|
dt_interval=dt,
|
133
|
+
constraint_idx = idx,
|
132
134
|
)
|
133
135
|
|
134
136
|
return ZeroCrossing(is_violated=False)
|
@@ -213,4 +215,4 @@ def main():
|
|
213
215
|
print(f"Total time: {solve_time:.3f}")
|
214
216
|
|
215
217
|
if __name__ == "__main__":
|
216
|
-
main()
|
218
|
+
main()
|
@@ -11,6 +11,7 @@ class ZeroCrossing:
|
|
11
11
|
dt_interval: float = None
|
12
12
|
coef: float = field(init=False, default=None)
|
13
13
|
new_dt_val: float = field(init=False, default=None)
|
14
|
+
constraint_idx: int = None
|
14
15
|
|
15
16
|
def __post_init__(self):
|
16
17
|
if self.is_violated is True:
|
@@ -25,4 +26,4 @@ class ZeroCrossing:
|
|
25
26
|
"""))
|
26
27
|
avg_interval = (self.start + self.end) / 2.0
|
27
28
|
self.coef = avg_interval / self.dt_interval
|
28
|
-
self.new_dt_val = self.coef * self.dt_interval
|
29
|
+
self.new_dt_val = self.coef * self.dt_interval
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: scipplan
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.2a0
|
4
4
|
Summary: Metric Hybrid Factored Planning in Nonlinear Domains with Constraint Generation in Python.
|
5
5
|
Author: Ari Gestetner, Buser Say
|
6
6
|
Author-email: ari.gestetner@monash.edu, buser.say@monash.edu
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import scipplan
|
2
2
|
|
3
|
-
from setuptools import setup,
|
3
|
+
from setuptools import setup, find_namespace_packages
|
4
4
|
|
5
5
|
def readme():
|
6
6
|
with open("README.md") as f:
|
@@ -15,7 +15,7 @@ setup(
|
|
15
15
|
license="MIT License",
|
16
16
|
author=scipplan.__author__,
|
17
17
|
author_email=scipplan.__email__,
|
18
|
-
packages=
|
18
|
+
packages=find_namespace_packages(), # Automatically find all packages
|
19
19
|
include_package_data=True,
|
20
20
|
package_data={
|
21
21
|
# "": ["translation/*.txt"],
|
@@ -1 +0,0 @@
|
|
1
|
-
scipplan
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|