Comments (4)
Can confirm that the bug can be avoided by using unique directory names. Not really a satisfactory solution, though.
from casadi.
from casadi.
The suggestion to explicitly remove the files rather than overwriting them seems to resolve the issue:
mofile = 'vdp.mo'
fmu_file = 'vdp.fmu'
import zipfile
import os
import shutil
# Unzip FMU
unzipped_name = mofile[:mofile.find('.')]
#unzipped_name += '_mod'
unzipped_path = os.path.join(os.getcwd(), unzipped_name)
# Remove any existing directory with this name
if os.path.isdir(unzipped_path): shutil.rmtree(unzipped_path)
# Unzip
with zipfile.ZipFile(fmu_file, 'r') as zip_ref: zip_ref.extractall(unzipped_name)
print('Unzipped %s into %s' % (fmu_file, unzipped_path))
Should update the FMU examples and notebook accordingly.
from casadi.
Oh waw, it's doing mmap on the file rather than loading😮
from casadi.
Related Issues (20)
- separate_linear: split constant/linear/nonlinear parts of an expression graph
- Jacobian Error. Evaluating Jacobian of inequality constraints at user provided starting point. No scaling factors.
- Can Not Access to "casadi.sourceforge.net " (class reference)
- Adding a 0-by-0 MX / zerobyzero / empty HOT 2
- Evaluation of custom bspline using pchip and makima
- Interpolant returns inconsistent results HOT 1
- How to use Debugging features
- Trying to use MA27 HOT 1
- Unreliable git clones of external modules due to performing full clone
- Bug in ca.jtimes when vector of size 0x1 is used HOT 1
- Unable to use allow_free option in Opti::to_function in Python HOT 3
- Problem with installation on Matlab r2023b HOT 7
- Outdated note in user guide
- OpenCL Support
- ipopt warm start
- Sign glitch in `detect_simple_bounds`? HOT 1
- Using external function in nlpsol codegen
- Support for BaseModelica symbolic import
- Update OpenModelica XML import into DaeBuilder
- Refactor handling of event dynamics in DaeBuilder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from casadi.