componavt / math_migration Goto Github PK
View Code? Open in Web Editor NEWMigration of the population with system of differential equations
License: Apache License 2.0
Migration of the population with system of differential equations
License: Apache License 2.0
Зачем кавычки в названии файла?
При запуске программы:
python zadacha_s_malen\'kimi_chislami.py
Получил сообщение об ошибке:
File "zadacha_s_malen'kimi_chislami.py", line 535
SyntaxError: Non-ASCII character '\xd0' in file zadacha_s_malen'kimi_chislami.py on line 535, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Два вопроса:
File:
newoptimize/optimize_with_4_parameters.py
Line 10:
a = np.array([20.,10.,10.,0.,20.,0. ])#arrive to region,when time is 0,1,2 in 1 and 2 region respectively between 1 b 2 region
Я с Вами теперь согласен, что нужно задачу ещё упростить до одного региона. То есть будет два параметра (убывает, привывает) для одного региона.
И вторая просьба. Сразу после расчёта средних значений прибывающих и убывающих (строки 19-23), выведите на экран эти значения, например так:
Average number of population, who arrives to region 1 is ТУТ_БУДЕТ_ЧИСЛО
Average number of population, who leaves region 1 is ТУТ_БУДЕТ_ЧИСЛО
Заодно прилагаю рисунок с условиями задачи для удобства работы.
У меня есть впечатление, что в этом файле proverka_metoda_1.py
много лишнего и ненужного кода. Попробую сформулировать вопросы, чтобы найти эти лишние строки и удалить их.
Вопросы к коду файла proverka_metoda_1.py
Строка 43. Если вместо 0.01 написать 1, то ничего не изменится. Почему?
ivpoptim.dt0 = 1#time step
В конце работы программы получаем ошибку:
`/usr/lib/python2.7/dist-packages/matplotlib/legend.py:634: UserWarning: Unrecognized location "central". Falling back on "best"; valid locations are
right
center left
upper right
lower right
best
center
lower left
center right
upper left
upper center
lower center
% (loc, '\n\t'.join(self.codes)))`
Питон жалуется, что нет такого слова "central".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.