BlockResearchGroup / compas_cra

Coupled Rigid-Block Analysis: Stability-Aware Design of Complex Discrete-Element Assemblies
https://blockresearchgroup.github.io/compas_cra
MIT License
21 stars 7 forks source link

new pyomo does not work with the package #2

Closed Pirouz-Nourian closed 1 year ago

Pirouz-Nourian commented 1 year ago

Describe the bug

Some namespaces have been renamed apparently in the new pyomo and so the package does not work with the new version of pyomo (6.5). I need to every back to an older version equal to the one used at the time of development but I don't know what version that is. While you are working on an update, could you please kindly mention the version of pyomo or export your conda environment as a yml file to help avoid similar issues? To Reproduce

Steps to reproduce the behavior:

I am running your code in a Jupyter Notebook. Try running this with a new pyomo (6.5):

from compas_cra.equilibrium import cra_solve
cra_solve(assembly, verbose=True, timer=True)

see error: AttributeError: module 'pyomo.environ' has no attribute 'ConcreteModel'

GeneKao commented 1 year ago

Which version of CRA are you using? The current version uses pyomo ==6.4.2.

You can find this information in the requirements.txt, which should already be automatically set. If you want to install CRA through conda yal file, you can follow this instruction: A quicker way - from .yml file.