Can we use Pyomo for goal programming using python - pyomo

I am working on building an inventory management system having multiple objectives like price, lead time, quality, etc and want to use goal programming. Wanted to know if we can use Pyomo for implementing goal programming

Related

Object detection using python

I am working on my college project and for that I have to recognize different hand gestures, so can any one tell me that how can I learn this image recognization quickly using python?
If you're using Python, I think you would better use Tensorflow.
Check https://github.com/tensorflow/models/tree/master/object_detection.
It is easy to follow instructions and they provide convenient script for retraining a detection model.
If you need to train a model with custom data, you have to prepared images dataset annotated with bounding boxes.

Simple GUI interface and web services for database

I've looked around and haven't found just quite what I'm looking for. I help teach a health IT course that often involves doctors and nurses who don't have much experience programming. We are planning to teach students about extending clinical information systems by developing a database and exposing it for queries and use using Web services. This is something which is often done by those with technical experience. We would like to teach students this concept with hands on exercises. However we would like the students to focus more on the concept than coding. Is there a free or open source database program that allows users to create a simple database, develop a simple GUI for their database (for hypothetical data collection), and expose their data using Web services. Mind you, this needs to be simple enough for non-programmers to be able to use with minimal coding experience.
Thank you for your comments and recommendations!
well, really broad question, the database word doesn't say much about the final task and it's really generic, but I suggest Base from the libreoffice suite or the equivalent counterpart from openoffice and both are basically the same product if you care about the core features.

Starting with Data Mining

I have started learning Data Mining and wish to create a small project in C++/Java that allows me to utilize a database, say from twitter and then publish a particular set of results (for eg. all the news items on a feed). I want to know how to go about it? Where should I start?
This is a really broad question, so it's hard to answer. Here are some things to consider:
Where are you going to get the data? You mention twitter, but you'll still need to collect the data in some way. There are probably libraries out there for listening to twitter streams, or you could probably buy the data if someone is selling it.
Where are you going to store the data? Depending on how much you'll have and what you plan to do with it, a traditional relational database may or may not be the best fit. You may be better off with something that supports running mapreduce jobs out-of-the box.
Based on the answers to those questions, the choice of programming languages and libraries will be easier to make.
If you're really set on Java, then I think a Hadoop cluster is probably what you want to start out with. It supports writing mapreduce jobs in Java, and works as an effective platform for other systems such as HBase, a column-oriented datastore.
If your data are going to be fairly regular (that is, not much variation in structure from one record to the next), maybe Hive would be a better fit. With Hive, you can write SQL-like queries, given only data files as input. I've never used Mahout, but I understand that its machine learning capabilities are suited for data mining tasks.
These are just some ideas that come to mind. There are lots of options out there and choosing between them has as much to do with the particular problem you're trying to solve and your own personal tastes as anything else.
If you just want to start learning about Data Mining there are two books that I particularly really enjoy:
Pattern Recognition and Machine Learning. Christopher M. Bishop. Springer.
And this one, which is for free:
http://infolab.stanford.edu/~ullman/mmds.html
Good references for you are
AI course taught by people who actually know the subject,Weka website, Machine Learning datasets, Even more datasets, Framework for supporting the mining of larger datasets.
The first link is a good introduction on AI taught by Peter Norvig and Sebastian Thrun, Google's Research Director, and Stanley's creator (the autonomous car), respectively.
The second link you get you to Weka website. Download the software - which is pretty intuitive - and get the book. Make sure you understand all the concepts: what's data mining, what's machine learning, what are the most common tasks, and what are the rationales behind them. Play a lot with the examples - the software package bundles some datasets - until you understand what generated the results.
Next, go to real datasets and play with them. When tackling massive datasets, you may face several performance issues with Weka - which is more of a learning tool as far as my experience can tell. Thus I recommend you to take a look at the fifth link, which will get you to Apache Mahout website.
It's far from being a simple topic, however, it's quite interesting.
I can tell you how I did it.
1) I got the data using twitter4j.
2) I analyzed the data using JUNG.
You have to define a class representing edges and a class representing vertices.
These classes will contain the attributes of the edges and vertices.
3) Then, there is a simple function to add an edge g.addedge(V1,V2,edgeFromV1ToV2) or to add a vertex g.addVertex(V).
The class that defines edges or vertices is easy to create. As an example :
`public class MyEdge {
int Id;
}`
The same is done for vertices.
Today I would do it with R, but if you don't want to learn a new programming language, just import jung which is a java library.
Data mining is broad fields with many different techniques; classification, clustering, association and pattern mining, outlier detection, etc.
You should first decide what you want to do and then decide wich algorithm you need.
If you are new to data mining, I would recommend to read some books like Introduction to Data Mining by Tan, Steinbach and Kumar.
I would like to suggest you to use python or R for data mining process. Doing work with java or c , it bit difficult in the sense you need to do a lot coding

Should I be using scripting in this circumstance?

I am writing a game. it is in c++ an direct x and I think I am making my own engine as I am programming from winproc up.
I have made large amounts of progress such as sound, collision detection, AI specific to my game settings, dynamic graphics creation from tile sheets.
after doing some research on event programming I have been told to "script it". I have researched this and as far as i see scripting is used so non programmers can add to the project.
I an a prety good programmer and I have no intention of having anyone else work on the game except on outside things such as graphics or map design. I already had a function where I can read in maps from csv files. these contain not just the tile layout but the npc data, entrances/exits. other files of the same nature control monster and item data so I can update the contents without a recompile.
So I am asking for the view of experienced programmers and maybe real world examples that relate to my circumstances as to why I should or should not use scripting in my game?
The NPC and monster data need to be able to contain some simple logic like "if the player has this item", "if the player has been to somewhere", "if the player is comming from the right" etc. And for this you'll need ability to define some composed actions and conditionals. That is called scripting and is best done by incorporating some existing script language interpreter like Lua, Python, some variant of JavaScript, whatever.
There are several reasons to use a scripting system in a game, not just as you pointed out, to allow non-programmers to add game content. The first game I worked on professionally used a scripting system and the only people who were writing scripts were the programmers who created the scripting system. There were two reasons they used it:
build times
New data files/script files can be tested quickly. This particular engine didn't support it, but some allow for script files to be reloaded while the game is running. The more times you can iterate through the build-deploy-test cycle, the more you will be able to tweek your game and end up with a much better game.
power of expression
A custimized scripting system can allow you to easily express/code concepts that are cumbersome in traditional programming. For example, the game engine I am working with now allows me to easily control concurrent animations in script.
I don't think scripting is entirely necessary in your case. The bonus behind adding scripting support an engine have been listed up and down this page.
It gives you a simple langue to work with
It is more accessible to someone without training
It can be compiled on the fly, hot
swapped at runtime
For lots of high end games with large teams these items are very important. But it really comes down to the goals for your engine. If you are not considering sharing your engine and plan to work on the game just yourself then scripting does loose some of its benefits. Adding a scripting language also has some down sides.
Add complexity and creation time to your engine
Increase debug time, even if the scripting language has a wonderful debugger, switching between 2 languages is never smooth.
As long as you still have a data driven design (keeping stats and types in separate files which can be swapped out during runtime) you retain the ability to hot-swap out data for rapid iteration.
definitivly add scripting. Its a pita to recompile the whole game, just because your player does 0.8 damage instead of 1.0. Also, If you want to have a door open under certain circumstances, you need it definitfly. I would do most of the game in a scripting language, Its just more flexible.
Big names are using scripting languages. For example Eve Online is written in stackless python. Other examples can be found here: http://wiki.python.org/moin/PythonGames

Choosing a 3D game engine [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to start this as a hobby in developing a desktop game. I have found several engines, but I am not sure whether it does the initial job I am looking at.
Initially I want to do the following:
Create a figure (avatar), and let the user dress the avatar
Load the avatar in the game
In later stages, I want to develop this as a multi-player game.
What should I do?
I also recommend Ogre. Ogre can do this, it provides everything needed in regards of mesh and animation support, but not as a drop-in solution. You have to write lots of code for this to be done.
For our project we implemented something like you do. The main character and any other character can be dressed with different weapons and armor and the visuals of the character avatar change accordingly.
As a start hint for how to go about this: In your modeling tool (Blender, Maya, 3ds max, etc.) you model your avatar and all its clothes you need and rig them to the same skeleton. Then export everything individually to Ogre's mesh format.
At runtime you can then attach the clothing meshes the user chooses to the skeleton instance so that they together form the avatar. This is not hard to do via Ogre-API, but for even easier access to this you can use MeshMagick Ogre extension's meshmerge tool. It has been developed for exactly this purpose.
If you want to change other characteristics like facial features, this is possible too, as Ogre supports vertex pose animations out of the box, so you can prepare pathes for certain characteristics of the face and let the user change the face by sliders or somthing like this. (e.g like in Oblivion)
One thing to be aware regarding Ogre: It is a 3d graphics engine, not a game engine. So you can draw stuff to the screen with it and animate and light and in any way change the visuals, but it doesn't do input or physics or sound. For this you have to use other libs and integrate them. Several pre-bundled game engines based on Ogre are available though.
If you are good with C++ you should use Ogre, it's the best open-source engine, continuously been updated by it's creators, with a lot of tutorials and a very helpful community.
http://www.ogre3d.org/
It's more of a GFX engine, but it has all the prerequisites you desire.
Good luck!
No engine is likely to do this for you. What they do is generally allow you to load and render 3d models. But combining them, the way you'd need to do to "dress them" is up to you. And creating them, or letting the user do so, is ultimately up to you. The engine might offer a number of tools to make the task easier (for example, rendering the model while the user is designing it), but a game engine is not a magic "make a game" box where you just have to press a button, and your custom game comes out.
A couple of people have said Ogre3D, I'll offer up Irrlicht as an alternative.
You might want to take a look at http://www.crystalspace3d.org/ - I have to admit it was more of an exploratory matter for me, but it seemed like a pretty nice engine - with physics and scripting included. They have an project which shows the avatar walking in the spacestation-like building with very smooth camera effects.
OTOH: depending on how far you want to push this, you might find yourself recreating the SecondLife(tm)-like kind of environment. If that's a fair assumption, then you might take a look at OpenSimulator and the associated opensource viewer projects and see if this may be of interest to you - and work there with the existing team to develop the code further, rather than working on your own.
If you good with C++, I suggest the C4 Engine. From my experiences, existing game engines are either too rigid or just nothing more than a collection of libraries.
Ogre is a good way to go if you are just interested in getting something to show. As some have already stated here, Ogre is a rendering engine. There are lots of add-ons and functions to complete common tasks like Audio, Input and whatnot. This is perfectly fine if your just aiming at playing around or creating a prototype.
Should you want to start a long-term project that will be developed over a longer period of time (which would be pretty likely considering you probably being the only developer and games being complex applications), you should really start thinking about what it is that you want to do. Then, based on you're goals, look for several engines that can tackle your needs (there's always some API to accomplish XYZ). Then it's up to you how you manage your game and where you use existing libraries - you'd basically tie up your own engine according to your needs.
It get's a bit more difficult if you start looking for a real game engine in terms of "engine for all my game-dev needs". Check out the nice list of 3d game engines at devmasters (http://www.devmaster.net/engines/), you'll find lots of alpha status game engines trying to accomplish this, although you should keep in mind that support and documentation usually isn't first class in those cases.
I personally never used it, but I evaluated the open source engine Delta3D (delta3d.org) for my project and was impressed by it's cool architecture. It encapsulates a whole bunch of other quality open source frameworks for stuff like graphics (OpenSceneGraph: openscenegraph.org) or physics (ODE: ode.org). That's probably as close as you'll get to a free and flexible game engine as far as I know. It was developed at an air force university, and due to it's academic background comes with lots of detailed documentation.
If you're good with C++ you can write your own engine :P
Ogre is the best of Irrlicht and Crystalspace, and the reasoning behind that is simple - Ogre has actually been used in a production pipeline by the game industry. It actually has a lot of weight behind it, whereas Irrlicht and Crystalspace are more or less applications that don't do a lot out of the box. Crystalspace however has a branch project that implements a game engine right into Blender 3d allowing the artist to play the role of programmer without leaving the actual software.
I'm not very big on Irrlicht - there is a lot of sneakiness behind its motives. For an open source project it branches out into many different derivatives that are either complete game engines or WYSWYG editors and they find ways to lock you into paying somehow.
Ogre excels at being a graphics engine rather than a library, and it has to be compiled to individual needs. The tradeoff is you can implement Ogre into any design work flow or even create a new one. Where it takes the load off your shoulders is having to write graphics code of any kind thus making it a very slick rapid prototyping engine in its basic form.
One engine that you could try is the Torque 3D game engine www.garagegames.com which, although not being freeware, allows for out of the box usability. While the functionality that you seek in terms of being able to fully customise the character is not instantly available within the engine, if you are willing to create the models yourself it should not be too hard to add them into the game and the utilise the game engine to change the 'skins' of the avatar. One thing that I feel will set this apart from the other engines is the fact that it comes with networking functionality pre-installed (from what you have described in your question I am guessing that you are attempting to either make an RTS or MMO, and if so I wish you good luck).
While it may seem strange that the engine is based around a shooting game, there are guides witin the Torque forums that allow you to add the coding for sword based combat and other things associated with a fantasy based game (if, that is, what you are planing on making).
But anyway... good luck with your project. If you are attempting what I think you are attempting it is no easy feat. But I'm sure you know what you are doing =)
Hope this helped
If you are interested in using the Irrlicht 3D engine, you can find a number of tutorials that step you through the process of creating simple 3D applications here.
I also suggest Irrlicht. It's easier to begin with, but it does not have half of the Ogre3D support though.