Project-Platypus / Platypus

A Free and Open Source Python Library for Multiobjective Optimization
GNU General Public License v3.0
565 stars 153 forks source link

Creating multiple variables #116

Closed Erison356 closed 1 year ago

Erison356 commented 4 years ago

Hello!

In my program, I have about 400 variables that will be considered in my NSGA-II problem. Is there any way how to assign such huge amount of variables with vars[] without writing different variable names over and over again? And another thing, how does vars[] work in multivariate multiobjective optimization? Please enlighten me.

clementb7596 commented 4 years ago

I have the same problem

myzjy8 commented 4 years ago

fighting, I've been stuck for almost two months,sad

domingo-valdes commented 4 years ago

Im solving for 4500 variables. Just do something like this:

for i in range(1000):
    my_list.append(solution.variables[i])

then you can access the variables in my_list

github-actions[bot] commented 1 year ago

This issue is stale and will be closed soon. If you feel this issue is still relevant, please comment to keep it active. Please also consider working on a fix and submitting a PR.